• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Referrer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Referrer的典型用法代码示例。如果您正苦于以下问题:C# Referrer类的具体用法?C# Referrer怎么用?C# Referrer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Referrer类属于命名空间,在下文中一共展示了Referrer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InsertReferrer

        /// <summary>
        /// Inserts a Referrer.
        /// </summary>
        /// <param name="referrer">
        /// Must be a valid Referrer object.
        /// </param>
        public override void InsertReferrer(Referrer referrer)
        {
            Referrer.Referrers.Add(referrer);

            referrer.MarkOld();
            var day = Referrer.Referrers.FindAll(r => r.Day.ToShortDateString() == referrer.Day.ToShortDateString());
            this.WriteReferrerFile(day, referrer.Day);
        }
开发者ID:CharlesZHENG,项目名称:BlogEngine.NET,代码行数:14,代码来源:Referrers.cs


示例2: GetFileInfo

    public static BulkLetterSendingQueueAdditionalLetter GetFileInfo(Letter.FileFormat fileFormat, Booking booking, Patient patient, HealthCard hc, Letter.TreatmentLetterType treatmentLetterType, Booking.InvoiceType invType, int fieldID, int siteID, int staffID, Referrer referrer, bool keepInHistory, int letterPrintHistorySendMethodID)
    {
        // 1. Add to healthcardaction
        int healthCardActionID = -1;
        if (treatmentLetterType == Letter.TreatmentLetterType.First || treatmentLetterType == Letter.TreatmentLetterType.Last || treatmentLetterType == Letter.TreatmentLetterType.LastWhenReplacingEPC)
            healthCardActionID = HealthCardActionDB.Insert(hc.HealthCardID, Letter.GetHealthCardActionTypeID(treatmentLetterType), DateTime.Now);

        // 2.create document and put it in history
        int letterID = Letter.GetLetterIDByTreatmentLetterTypeAndInvoiceType(treatmentLetterType, invType, fieldID, siteID);
        if (letterID == -1)
            return null;

        string lettersDir = Letter.GetLettersDirectory();
        if (!Directory.Exists(lettersDir))
            throw new CustomMessageException("Letters directory doesn't exist");

        Letter letter = LetterDB.GetByID(letterID);
        bool useDefaultDocs = letter.Organisation == null ? true : !LetterDB.OrgHasdocs(letter.Organisation.OrganisationID);
        string sourceTemplatePath = lettersDir + (useDefaultDocs ? @"Default\" + letter.Site.SiteID + @"\" : letter.Organisation.OrganisationID + @"\") + letter.Docname;
        if (!File.Exists(sourceTemplatePath))
            throw new CustomMessageException("File doesn't exist: " + Path.GetFileName(sourceTemplatePath));

        // get temp directory
        string tmpLettersDirectory = Letter.GetTempLettersDirectory();
        if (!Directory.Exists(tmpLettersDirectory))
            throw new CustomMessageException("Temp letters directory doesn't exist");

        return new BulkLetterSendingQueueAdditionalLetter(
            -1,
            -1,
            letter.LetterID,
            keepInHistory && Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["StoreLettersHistoryInDB"]),
            keepInHistory && Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["StoreLettersHistoryInFlatFile"]),
            letterPrintHistorySendMethodID,
            Letter.GetLettersHistoryDirectory(booking.Organisation.OrganisationID),
            letter.Docname.Replace(".dot", ".doc"),
            siteID,
            booking.Organisation.OrganisationID,
            booking.BookingID,
            patient.PatientID,
            -1, // register_referrer_id_to_use_instead_of_patients_reg_ref
            staffID,
            healthCardActionID,
            sourceTemplatePath,
            tmpLettersDirectory + letter.Docname.Replace(".dot", ".doc"),
            true,
            "",
            ""
            );
    }
开发者ID:nblaurenciana-md,项目名称:Websites,代码行数:50,代码来源:ReferrerEPCLetters_ReprintV2.aspx.cs


示例3: FillReferrers

        /// <summary>
        /// Gets all Referrers from the database.
        /// </summary>
        /// <returns>
        /// List of Referrers.
        /// </returns>
        public override List<Referrer> FillReferrers()
        {
            this.DeleteOldReferrers();

            var referrers = new List<Referrer>();

            var connString = ConfigurationManager.ConnectionStrings[this.connStringName].ConnectionString;
            var providerName = ConfigurationManager.ConnectionStrings[this.connStringName].ProviderName;
            var provider = DbProviderFactories.GetFactory(providerName);

            using (var conn = provider.CreateConnection())
            {
                if (conn != null)
                {
                    conn.ConnectionString = connString;
                    conn.Open();
                    using (var cmd = conn.CreateCommand())
                    {
                        var sqlQuery = string.Format("SELECT ReferrerId, ReferralDay, ReferrerUrl, ReferralCount, Url, IsSpam FROM {0}Referrers ", this.tablePrefix);
                        cmd.CommandText = sqlQuery;
                        cmd.CommandType = CommandType.Text;

                        using (var rdr = cmd.ExecuteReader())
                        {
                            if (rdr.HasRows)
                            {
                                while (rdr.Read())
                                {
                                    var refer = new Referrer
                                        {
                                            Id = rdr.GetGuid(0),
                                            Day = rdr.GetDateTime(1),
                                            ReferrerUrl = new Uri(rdr.GetString(2)),
                                            Count = rdr.GetInt32(3),
                                            Url = rdr.IsDBNull(4) ? null : new Uri(rdr.GetString(4)),
                                            PossibleSpam = rdr.IsDBNull(5) ? false : rdr.GetBoolean(5)
                                        };

                                    referrers.Add(refer);
                                    refer.MarkOld();
                                }
                            }
                        }
                    }
                }
            }

            return referrers;
        }
开发者ID:karanbhasin,项目名称:blogEngine.Common,代码行数:55,代码来源:DbBlogProvider.cs


示例4: FillReferrers

        /// <summary>
        /// Gets all Referrers from the database.
        /// </summary>
        /// <returns>List of Referrers.</returns>
        public override List<Referrer> FillReferrers()
        {
            deleteOldReferrers();

            List<Referrer> referrers = new List<Referrer>();

            string connString = ConfigurationManager.ConnectionStrings[connStringName].ConnectionString;
            string providerName = ConfigurationManager.ConnectionStrings[connStringName].ProviderName;
            DbProviderFactory provider = DbProviderFactories.GetFactory(providerName);

            using (DbConnection conn = provider.CreateConnection())
            {
                conn.ConnectionString = connString;
                conn.Open();
                using (DbCommand cmd = conn.CreateCommand())
                {
                    string sqlQuery = "SELECT ReferrerId, ReferralDay, ReferrerUrl, ReferralCount, Url, IsSpam " +
                        "FROM " + tablePrefix + "Referrers ";
                    cmd.CommandText = sqlQuery;
                    cmd.CommandType = CommandType.Text;

                    using (DbDataReader rdr = cmd.ExecuteReader())
                    {
                        if (rdr.HasRows)
                        {
                            while (rdr.Read())
                            {
                                Referrer refer = new Referrer()
                                {
                                    Id = rdr.GetGuid(0),
                                    Day = rdr.GetDateTime(1),
                                    ReferrerUrl = new Uri(rdr.GetString(2)),
                                    Count = rdr.GetInt32(3),
                                    Url = rdr.IsDBNull(4) ? null : new Uri(rdr.GetString(4)),
                                    PossibleSpam = rdr.IsDBNull(5) ? false : rdr.GetBoolean(5)
                                };

                                referrers.Add(refer);
                                refer.MarkOld();
                            }
                        }
                    }
                }
            }

            return referrers;
        }
开发者ID:rajgit31,项目名称:RajBlog,代码行数:51,代码来源:DbBlogProvider.cs


示例5: UpdateReferrer

        /// <summary>
        /// Saves an existing Referrer to the database.
        /// </summary>
        /// <param name="referrer">Referrer to be saved.</param>
        public override void UpdateReferrer(Referrer referrer)
        {
            List<Referrer> referrers = Referrer.Referrers;
            referrers.Remove(referrer);
            referrers.Add(referrer);

            string connString = ConfigurationManager.ConnectionStrings[connStringName].ConnectionString;
            string providerName = ConfigurationManager.ConnectionStrings[connStringName].ProviderName;
            DbProviderFactory provider = DbProviderFactories.GetFactory(providerName);

            using (DbConnection conn = provider.CreateConnection())
            {
                conn.ConnectionString = connString;
                conn.Open();
                using (DbCommand cmd = conn.CreateCommand())
                {
                    string sqlQuery = "UPDATE " + tablePrefix + "Referrers " +
                                      "SET ReferralDay = @ReferralDay, " +
                                      "ReferrerUrl = @ReferrerUrl, " +
                                      "ReferralCount = @ReferralCount, " +
                                      "Url = @Url, " +
                                      "IsSpam = @IsSpam " +
                                      "WHERE ReferrerId = @ReferrerId";
                    if (parmPrefix != "@")
                        sqlQuery = sqlQuery.Replace("@", parmPrefix);
                    cmd.CommandText = sqlQuery;
                    cmd.CommandType = CommandType.Text;

                    addReferrersParametersToCommand(referrer, provider, cmd);

                    cmd.ExecuteNonQuery();
                }
            }
        }
开发者ID:rajgit31,项目名称:RajBlog,代码行数:38,代码来源:DbBlogProvider.cs


示例6: Portal_SavePatient

    public void Portal_SavePatient(Patient patient, Referrer referrer)
    {
        dl = new DataLayer(pConnectionString);
        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "Portal_SavePatient";

        cmd.Parameters.AddWithValue("@ID", patient.ID);
        cmd.Parameters.AddWithValue("@FirstName", patient.FirstName);
        cmd.Parameters.AddWithValue("@LastName", patient.LastName);
        cmd.Parameters.AddWithValue("@DateOfBirth", patient.DateOfBirth);
        cmd.Parameters.AddWithValue("@Gender", patient.Gender);
        cmd.Parameters.AddWithValue("@Ethnicity", patient.Ethnicity);
        cmd.Parameters.AddWithValue("@MedicaidNumber", patient.MedicaidNumber);
        cmd.Parameters.AddWithValue("@SocialSecurityNumber", patient.MedicaidNumber);
        cmd.Parameters.AddWithValue("@ResidingWithName", patient.ResidingWithName);
        cmd.Parameters.AddWithValue("@ResidingWithRelationship", patient.ResidingWithRelationship);
        cmd.Parameters.AddWithValue("@SchoolName", patient.SchoolName);
        cmd.Parameters.AddWithValue("@SchoolGrade", patient.SchoolName);
        cmd.Parameters.AddWithValue("@SchoolPhone", patient.SchoolPhone);
        cmd.Parameters.AddWithValue("@EmployerName", patient.EmployerName);
        cmd.Parameters.AddWithValue("@Occupation", patient.Occupation);
        cmd.Parameters.AddWithValue("@ClientOnProbation", patient.ClientOnProbation);
        cmd.Parameters.AddWithValue("@EmailAddress", patient.EmailAddress);
        cmd.Parameters.AddWithValue("@Diagnosis", patient.Diagnosis);
        cmd.Parameters.AddWithValue("@ServiceRequested", patient.ServiceRequested);
        cmd.Parameters.AddWithValue("@LocationofServices", patient.LocationofServices);
        cmd.Parameters.AddWithValue("@FinanciallyResponsiblePerson", patient.FinanciallyResponsiblePerson);
        cmd.Parameters.AddWithValue("@PaymentMethod", patient.PaymentMethod);
        cmd.Parameters.AddWithValue("@Email", patient.EmailAddress);
        cmd.Parameters.AddWithValue("@ReferralSourceName", referrer.ReferralSourceName);
        cmd.Parameters.AddWithValue("@ReferralSourceAgency", referrer.ReferralSourceAgency);
        cmd.Parameters.AddWithValue("@ReferrerPhone", referrer.ReferrerPhone);
        cmd.Parameters.AddWithValue("@ReferralFax", referrer.ReferralFax);
        cmd.Parameters.AddWithValue("@ReferralStreet", referrer.Street);
        cmd.Parameters.AddWithValue("@ReferralSuite", referrer.Suite);
        cmd.Parameters.AddWithValue("@ReferralCity", referrer.City);
        cmd.Parameters.AddWithValue("@ReferralState", referrer.State);
        cmd.Parameters.AddWithValue("@ReferralZipCode", referrer.ZipCode);
        cmd.Parameters.AddWithValue("@ReferralCountry", referrer.Country);
        cmd.Parameters.AddWithValue("@PatientStreet", patient.PatientStreet);
        cmd.Parameters.AddWithValue("@PatientSuite", patient.PatientSuite);
        cmd.Parameters.AddWithValue("@PatientCity", patient.PatientCity);
        cmd.Parameters.AddWithValue("@PatientState", patient.PatientState);
        cmd.Parameters.AddWithValue("@PatientZipCode", patient.PatientZipCode);
        cmd.Parameters.AddWithValue("@PatientCountry", patient.PatientCountry);

        dl.Execute(cmd);

        return;
    }
开发者ID:lchambaka,项目名称:WorkPad,代码行数:51,代码来源:Lib.cs


示例7: FillReferrers

        /// <summary>
        /// Gets all Referrers from the database.
        /// </summary>
        /// <returns>
        /// List of Referrers.
        /// </returns>
        public override List<Referrer> FillReferrers()
        {
            this.DeleteOldReferrers();

            var referrers = new List<Referrer>();

            using (var conn = this.CreateConnection())
            {
                if (conn.HasConnection)
                {
                    using (var cmd = conn.CreateTextCommand(string.Format("SELECT ReferrerId, ReferralDay, ReferrerUrl, ReferralCount, Url, IsSpam FROM {0}Referrers WHERE BlogId = {1}blogid ", this.tablePrefix, this.parmPrefix)))
                    {
                        cmd.Parameters.Add(conn.CreateParameter(FormatParamName("blogid"), Blog.CurrentInstance.Id.ToString()));

                        using (var rdr = cmd.ExecuteReader())
                        {
                            while (rdr.Read())
                            {
                                var refer = new Referrer
                                    {
                                        Id = rdr.GetGuid(0),
                                        Day = rdr.GetDateTime(1),
                                        ReferrerUrl = new Uri(rdr.GetString(2)),
                                        Count = rdr.GetInt32(3),
                                        Url = rdr.IsDBNull(4) ? null : new Uri(rdr.GetString(4)),
                                        PossibleSpam = rdr.IsDBNull(5) ? false : rdr.GetBoolean(5)
                                    };

                                referrers.Add(refer);
                                refer.MarkOld();
                            }
                        }
                    }
                }
            }

            return referrers;
        }
开发者ID:mukhtiarlander,项目名称:git_demo_torit,代码行数:44,代码来源:DbBlogProvider.cs


示例8: UpdateReferrer

        /// <summary>
        /// Saves an existing Referrer to the database.
        /// </summary>
        /// <param name="referrer">
        /// Referrer to be saved.
        /// </param>
        public override void UpdateReferrer(Referrer referrer)
        {
            var referrers = Referrer.Referrers;
            referrers.Remove(referrer);
            referrers.Add(referrer);

            using (var conn = this.CreateConnection())
            {
                if (conn.HasConnection)
                {
                    var sqlQuery = string.Format("UPDATE {0}Referrers SET ReferralDay = {1}ReferralDay, ReferrerUrl = {1}ReferrerUrl, ReferralCount = {1}ReferralCount, Url = {1}Url, IsSpam = {1}IsSpam WHERE BlogId = {1}BlogId AND ReferrerId = {1}ReferrerId", this.tablePrefix, this.parmPrefix);

                    using (var cmd = conn.CreateTextCommand(sqlQuery))
                    {
                        this.AddReferrersParametersToCommand(referrer, conn, cmd);

                        cmd.ExecuteNonQuery();
                    }
                }
            }
        }
开发者ID:mukhtiarlander,项目名称:git_demo_torit,代码行数:27,代码来源:DbBlogProvider.cs


示例9: GetFilesInfo

    protected static BulkLetterSendingQueueAdditionalLetter[] GetFilesInfo(Booking booking, Letter.FileFormat fileFormat, Patient patient, HealthCard hc, int fieldID, Referrer referrer, bool keepInHistory, bool needToGenerateFirstLetter, bool needToGenerateLastLetter, bool needToGenerateTreatmentLetter, int siteID, int staffID, int letterPrintHistorySendMethodID)
    {
        System.Collections.ArrayList lettersList = new System.Collections.ArrayList();

        if (needToGenerateFirstLetter)
            lettersList.Add(GetFileInfo(fileFormat, booking, patient, hc, Letter.TreatmentLetterType.First, Booking.InvoiceType.Medicare, fieldID, siteID, staffID, null, keepInHistory, letterPrintHistorySendMethodID));
        if (needToGenerateLastLetter)
            lettersList.Add(GetFileInfo(fileFormat, booking, patient, hc, Letter.TreatmentLetterType.Last, Booking.InvoiceType.Medicare, fieldID, siteID, staffID, null, keepInHistory, letterPrintHistorySendMethodID));
        if (needToGenerateTreatmentLetter)
            lettersList.Add(GetFileInfo(fileFormat, booking, patient, hc, Letter.TreatmentLetterType.TreatmentNotes, Booking.InvoiceType.Medicare, fieldID, siteID, staffID, referrer, keepInHistory, letterPrintHistorySendMethodID));

        return (BulkLetterSendingQueueAdditionalLetter[])lettersList.ToArray(typeof(BulkLetterSendingQueueAdditionalLetter));
    }
开发者ID:nblaurenciana-md,项目名称:Websites,代码行数:13,代码来源:ReferrerEPCLetters_ReprintV2.aspx.cs


示例10: UpdateReferrer

 /// <summary>
 /// Updates an existing Referrer.
 /// </summary>
 /// <param name="referrer">
 /// The referrer to update.
 /// </param>
 public static void UpdateReferrer(Referrer referrer)
 {
     LoadProviders();
     provider.UpdateReferrer(referrer);
 }
开发者ID:karanbhasin,项目名称:blogEngine.Common,代码行数:11,代码来源:BlogService.cs


示例11: InsertReferrer

 /// <summary>
 /// Persists a new Referrer in the current provider.
 /// </summary>
 /// <param name="referrer">
 /// The referrer to insert.
 /// </param>
 public static void InsertReferrer(Referrer referrer)
 {
     LoadProviders();
     provider.InsertReferrer(referrer);
 }
开发者ID:karanbhasin,项目名称:blogEngine.Common,代码行数:11,代码来源:BlogService.cs


示例12: Index

        public ActionResult Index(string token)
        {
            var ownerUser = _usersService.GetUserByEmailHash(token);

            if (ownerUser != null)
            {
                if (Request.Cookies["owner"] == null)
                {
                    var cookie = new HttpCookie("owner");
                    cookie.Value = ownerUser.Id.ToString(CultureInfo.InvariantCulture);
                    cookie.Expires = DateTime.Now.AddHours(1);
                    ControllerContext.HttpContext.Response.Cookies.Add(cookie);

                    // Если есть реферальный url, то сохраняем в статистику
                    if (HttpContext.Request.UrlReferrer != null)
                    {
                        var urlReferrer = HttpContext.Request.UrlReferrer;

                        // Создаем новые cookie
                        if (Request.Cookies["Host"] == null)
                        {
                            var hostCookie = new HttpCookie("Host");
                            hostCookie.Values["shortHost"] = urlReferrer.Host;
                            hostCookie.Values["fullHostUrl"] = urlReferrer.OriginalString;
                            hostCookie.Expires = DateTime.Now.AddHours(1);
                            ControllerContext.HttpContext.Response.Cookies.Add(hostCookie);
                        }
                        else // или обновляем имеющиеся
                        {
                            Response.Cookies["Host"]["shortHost"] = urlReferrer.Host;
                            Response.Cookies["Host"]["fullHostUrl"] = urlReferrer.OriginalString;
                            Response.Cookies["Host"].Expires = DateTime.Now.AddHours(1);
                        }

                        var entity = new Referrer
                        {
                            Host = urlReferrer.Host,
                            FullReferrerUrl = urlReferrer.OriginalString,
                            Date = DateTime.Now,
                            IsDeleted = false,
                            OwnerId = ownerUser.Id,
                            Registered = false
                        };

                        _statService.AddReferrer(entity);
                    }
                    else
                    {
                        Response.Cookies["Host"]["shortHost"] = "undefined";
                        Response.Cookies["Host"]["fullHostUrl"] = "undefined";
                        Response.Cookies["Host"].Expires = DateTime.Now.AddHours(1);

                        var entity = new Referrer
                        {
                            Host = "undefined",
                            FullReferrerUrl = "",
                            Date = DateTime.Now,
                            IsDeleted = false,
                            OwnerId = ownerUser.Id,
                            Registered = false
                        };

                        _statService.AddReferrer(entity);
                    }
                }
                else
                {
                    Response.Cookies["owner"].Value = ownerUser.Id.ToString(CultureInfo.InvariantCulture);
                    Response.Cookies["owner"].Expires = DateTime.Now.AddHours(1);
                }
            }

            return View();
        }
开发者ID:richard-s-popov,项目名称:broccoli,代码行数:74,代码来源:HomeController.cs


示例13: UpdateReferrer

 /// <summary>
 /// Updates a Referrer.
 /// </summary>
 /// <param name="referrer">
 /// Must be a valid Referrer object.
 /// </param>
 public override void UpdateReferrer(Referrer referrer)
 {
     var day = Referrer.Referrers.FindAll(r => r.Day.ToShortDateString() == referrer.Day.ToShortDateString());
     this.WriteReferrerFile(day, referrer.Day);
 }
开发者ID:CharlesZHENG,项目名称:BlogEngine.NET,代码行数:11,代码来源:Referrers.cs


示例14: PopulateRow

 /// <summary>
 /// Populates the row.
 /// </summary>
 /// <param name="tableRow">
 /// The table row.
 /// </param>
 /// <param name="refer">
 /// The refer.
 /// </param>
 private void PopulateRow(DataRow tableRow, Referrer refer)
 {
     tableRow["url"] = this.Server.HtmlEncode(refer.ReferrerUrl.ToString());
     tableRow["shortUrl"] = this.MakeShortUrl(refer.ReferrerUrl.ToString());
     tableRow["target"] = this.Server.HtmlEncode(refer.Url.ToString());
     tableRow["shortTarget"] = this.MakeShortUrl(refer.Url.ToString());
     tableRow["hits"] = refer.Count;
 }
开发者ID:RajneeshVerma,项目名称:blogengine.net-mvc,代码行数:17,代码来源:referrers.aspx.cs


示例15: InsertReferrer

        /// <summary>
        /// Adds a new Referrer to the database.
        /// </summary>
        /// <param name="referrer">
        /// Referrer to add.
        /// </param>
        public override void InsertReferrer(Referrer referrer)
        {
            var referrers = Referrer.Referrers;
            referrers.Add(referrer);

            var connString = ConfigurationManager.ConnectionStrings[this.connStringName].ConnectionString;
            var providerName = ConfigurationManager.ConnectionStrings[this.connStringName].ProviderName;
            var provider = DbProviderFactories.GetFactory(providerName);

            using (var conn = provider.CreateConnection())
            {
                if (conn == null)
                {
                    return;
                }

                conn.ConnectionString = connString;
                conn.Open();
                using (var cmd = conn.CreateCommand())
                {
                    var sqlQuery = string.Format("INSERT INTO {0}Referrers (ReferrerId, ReferralDay, ReferrerUrl, ReferralCount, Url, IsSpam) VALUES (@ReferrerId, @ReferralDay, @ReferrerUrl, @ReferralCount, @Url, @IsSpam)", this.tablePrefix);
                    if (this.parmPrefix != "@")
                    {
                        sqlQuery = sqlQuery.Replace("@", this.parmPrefix);
                    }

                    cmd.CommandText = sqlQuery;
                    cmd.CommandType = CommandType.Text;

                    this.AddReferrersParametersToCommand(referrer, provider, cmd);

                    cmd.ExecuteNonQuery();
                }
            }
        }
开发者ID:karanbhasin,项目名称:blogEngine.Common,代码行数:41,代码来源:DbBlogProvider.cs


示例16: InsertReferrer

 /// <summary>
 /// Persists a new Referrer in the current provider.
 /// </summary>
 /// <param name="referrer">
 /// The referrer to insert.
 /// </param>
 public static void InsertReferrer(Referrer referrer)
 {
     Provider.InsertReferrer(referrer);
 }
开发者ID:raul-aguirre-flexit,项目名称:Carnaval-Radio,代码行数:10,代码来源:BlogService.cs


示例17: UpdateReferrer

 /// <summary>
 /// Updates an existing Referrer.
 /// </summary>
 /// <param name="referrer">
 /// The referrer to update.
 /// </param>
 public static void UpdateReferrer(Referrer referrer)
 {
     Provider.UpdateReferrer(referrer);
 }
开发者ID:raul-aguirre-flexit,项目名称:Carnaval-Radio,代码行数:10,代码来源:BlogService.cs


示例18: FinishRegister

        public ActionResult FinishRegister(UserProfilePoco model)
        {
            if (ModelState.IsValid)
            {
                var user = new Users
                    {
                        Name = model.Name,
                        Nickname = model.Nickname,
                        Email = model.Email,
                        Phone = model.Phone,
                        Country = model.Country,
                        City = model.City,
                        BirthDay = model.BirthDay,
                        Password = model.Password
                    };

                if (Request.Cookies["owner"] != null)
                {
                    user.OwnerId = Convert.ToInt64(Request.Cookies["owner"].Value);

                    var owner = _usersService.GetById((long)user.OwnerId);
                    if (owner != null)
                    {
                        // Если в куках есть информация о реферальном url, то добавляем эту информацию в статистику
                        var hostCookie = Request.Cookies["Host"];
                        if (hostCookie != null)
                        {
                            var host = hostCookie["shortHost"];
                            var fullHostUrl = hostCookie["fullHostUrl"];

                            var entity = new Referrer
                                {
                                    Host = host,
                                    FullReferrerUrl = fullHostUrl,
                                    Date = DateTime.Now,
                                    IsDeleted = false,
                                    OwnerId = owner.Id,
                                    Registered = true
                                };

                            _statService.AddReferrer(entity);
                        }
                    }
                }

                _usersService.Insert(user);

                return RedirectToAction("LogOn", "Account");
            }

            return this.View("RegisterForm");
        }
开发者ID:richard-s-popov,项目名称:broccoli,代码行数:52,代码来源:AccountController.cs


示例19: Submitlogin_Click


//.........这里部分代码省略.........
                SocialSecurityNumberPt3.Focus();
                return;
            }

            //validate School Phone
            if (!Helper.IsNumeric(txtSchoolPhonePt1.Text))
            {
                lblErrorMessage.Text = "Invalid School Phone number";
                txtSchoolPhonePt1.Focus();
                return;
            }

            if (!Helper.IsNumeric(txtSchoolPhonePt2.Text))
            {
                lblErrorMessage.Text = "Invalid School Phone number";
                txtSchoolPhonePt2.Focus();
                return;
            }

            if (!Helper.IsNumeric(txtSchoolPhonePt3.Text))
            {
                lblErrorMessage.Text = "Invalid School Phone number";
                txtSchoolPhonePt3.Focus();
                return;
            }

            //validate chkServiceRequested

            if (!chkServiceRequestedSelected())
            {
                lblErrorMessage.Text = "Service Requested is not specified";
                chkServiceRequested.Focus();
                return;
            }

            //string values = string.Join(",", chkServiceRequested.Items.Cast<ListItem>()
            //                                 .Where(i => i.Selected)
            //                                 .Select(i => i.Value));

            string ServiceRequested = string.Empty;
            foreach (ListItem oItem in chkServiceRequested.Items)
            {
                if (oItem.Selected) // if you want only selected
                {
                    ServiceRequested = ServiceRequested + oItem.Value + ",";
                }

            }

            ServiceRequested = ServiceRequested.Substring(0, ServiceRequested.Length - 1);

            Patient patient = new Patient
            {
                ID = Int64.Parse(txtPatientNo.Text),
                FirstName = txtFirstName.Text,
                LastName = txtLastName.Text,
                DateOfBirth = DateTime.Parse(drpDateOfBirthYear.SelectedValue + "," + drpDateOfBirthMonth.SelectedValue + "," + drpDateOfBirthDay.SelectedValue),
                Gender = drpGender.SelectedValue,
                Ethnicity = drpEthnicity.SelectedValue,
                MedicaidNumber = txtMedicaidNumber.Text,
                SocialSecurityNumber = SocialSecurityNumberPt1.Text + '-' + SocialSecurityNumberPt2.Text + '-' + SocialSecurityNumberPt3.Text,
                ResidingWithName = txtResidingWithName.Text,
                ResidingWithRelationship = txtResidingWithRelationship.Text,
                SchoolName = txtSchoolName.Text,
                SchoolGrade = txtSchoolGrade.Text,
                SchoolPhone = txtSchoolPhonePt0.Text + txtSchoolPhonePt1.Text + txtSchoolPhonePt2.Text + txtSchoolPhonePt3.Text,
                EmployerName = txtEmployer.Text,
                Occupation = txtOccupation.Text,
                ClientOnProbation = chkOnProbation.Checked,
                Diagnosis = txtDiagnosis.Text,
                ServiceRequested = ServiceRequested,
                LocationofServices = drpLocationOfServices.SelectedValue,
                FinanciallyResponsiblePerson = txtFinanciallyRep.Text,
                PaymentMethod = drpPaymentMethods.SelectedValue,
                EmailAddress = txtEmailAddress.Text,
                PatientStreet = txtClientStreet.Text,
                PatientSuite = txtClientSuiteApt.Text,
                PatientCity = txtClientCity.Text,
                PatientState = drpClientState.SelectedValue,
                PatientCountry = drpClientCountry.SelectedValue,
                PatientZipCode = txtClientZipCode.Text,

            };

            Referrer referrer = new Referrer
            {
                ReferralSourceName = txtReferrerName.Text,
                ReferralSourceAgency =  txtReferrerAgency.Text,
                ReferrerPhone = txtReferralPhonePt0.Text + txtReferralPhonePt1.Text + txtReferralPhonePt2.Text + txtReferralPhonePt3.Text,
                ReferralFax = txtReferralFaxPt0.Text + txtReferralFaxPt1.Text + txtReferralFaxPt2.Text + txtReferralFaxPt3.Text,
                Street = txtReferralStreet.Text,
                Suite = txtReferralSuiteApt.Text,
                City = txtReferralCity.Text,
                State = drpReferralState.SelectedValue,
                ZipCode = txtReferralZip.Text,
                Country = drpReferralCountry.SelectedValue,
            };

            controller.Portal_SavePatient(patient, referrer);
        }
开发者ID:lchambaka,项目名称:WorkPad,代码行数:101,代码来源:ReferralForm.aspx.cs


示例20: SendTreatmentLetter

    public static Letter.FileContents SendTreatmentLetter(FileFormat fileFormat, Booking booking, Patient patient, HealthCard hc, Letter.TreatmentLetterType treatmentLetterType, Booking.InvoiceType invType, int fieldID, int siteID, int staffID, Referrer referrer, bool keepInHistory, int letterPrintHistorySendMethodID)
    {
        // 1. Add to healthcardaction
        int healthCardActionID = -1;
        if (treatmentLetterType == Letter.TreatmentLetterType.First || treatmentLetterType == Letter.TreatmentLetterType.Last || treatmentLetterType == Letter.TreatmentLetterType.LastWhenReplacingEPC)
            healthCardActionID = HealthCardActionDB.Insert(hc.HealthCardID, Letter.GetHealthCardActionTypeID(treatmentLetterType), DateTime.Now);

        // 2.create document and put it in history
        int letterID = Letter.GetLetterIDByTreatmentLetterTypeAndInvoiceType(treatmentLetterType, invType, fieldID, siteID);
        if (letterID == -1)
            return null;
        //string[] notes = (treatmentLetterType == TreatmentLetterType.TreatmentNotes) ? booking.GetNoteTextForTreatmentLetter(referrer) : null;
        string[] notes = null;
        Letter.FileContents fileContents = Letter.CreateLetter(fileFormat, SiteDB.GetByID(siteID), letterID, booking.Organisation.OrganisationID, patient.PatientID, staffID, booking.BookingID, healthCardActionID, 1, notes, keepInHistory, letterPrintHistorySendMethodID);
        return fileContents;

        //Letter.SendLetter(Response, SiteDB.GetByID(Convert.ToInt32(Session["SiteID"])), GetLetterID(treatmentLetterType, invType), booking.Organisation.OrganisationID, booking.Patient.PatientID, Convert.ToInt32(Session["StaffID"]), booking.BookingID, healthCardActionID, 1, null);
    }
开发者ID:mcep,项目名称:Mediclinic,代码行数:18,代码来源:Letter.cs



注:本文中的Referrer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ReflectedHttpActionDescriptor类代码示例发布时间:2022-05-24
下一篇:
C# ReferenceType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap