当前位置: 首页>>代码示例>>C#>>正文


C# DataLayer.AddNonMember方法代码示例

本文整理汇总了C#中DataLayer.AddNonMember方法的典型用法代码示例。如果您正苦于以下问题:C# DataLayer.AddNonMember方法的具体用法?C# DataLayer.AddNonMember怎么用?C# DataLayer.AddNonMember使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataLayer的用法示例。


在下文中一共展示了DataLayer.AddNonMember方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSubmit_Click

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (tbxCode.Text == Session["CaptchaImageText"].ToString())
        {
            if (this.IsValid)
            {
                DataLayer dl = new DataLayer();
                dl.AddNonMember(tbxNonMemberEmail.Text, tbxNonMemberName.Text, true, true);

                SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
                MailMessage mm;
                mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To = "[email protected];[email protected]";
                mm.From = "[email protected]";
                mm.Subject = "Someone signed up for the RNX free content.";
                mm.Body = tbxNonMemberName.Text + " subscribed to the RNX free content using this email: " + tbxNonMemberEmail.Text;
                SmtpMail.Send(mm);

                Session["resultColor"] = "#007700";
                Session["resultTitle"] = "Success!";
                Session["resultMessage"] = "You have successfully subscribed to the RNX free content!";
                Session["resultReturnURL"] = "Default.aspx";
                Response.Redirect("Result.aspx", true);
            }

        }
        else
        {
            cvInvalidCode.IsValid = false;
        }
    }
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:32,代码来源:Default.aspx.cs

示例2: btnSumbit_Click

 protected void btnSumbit_Click(object sender, EventArgs e)
 {
     DataLayer dl = new DataLayer();
     dl.AddNonMember(tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNewsletter.Checked);
     Session["resultColor"] = "#009900";
     Session["resultTitle"] = "Subscribed";
     Session["resultMessage"] = "Thanks for subscribing!";
     Session["resultReturnURL"] = "Default.aspx";
     Response.Redirect("Result.aspx", true);
 }
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:10,代码来源:Subscribe.aspx.cs

示例3: btnSubmit_Click

 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (lbxNonMembers.SelectedIndex == -1)
     {
         DataLayer dl = new DataLayer();
         dl.AddNonMember(tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNonMemberNewsletter.Checked);
         Session["resultColor"] = "#007700";
         Session["resultTitle"] = "Non-Member Added";
         Session["resultMessage"] = "Non-Member Added Successfuly";
         Session["resultReturnURL"] = "ManageNonMembers.aspx";
         Response.Redirect("Result.aspx", true);
     }
     else
     {
         if (cbxDeleteNonMember.Checked)
         {
             DataLayer dl = new DataLayer();
             dl.DeleteNonMember(lbxNonMembers.SelectedValue);
             Session["resultColor"] = "#007700";
             Session["resultTitle"] = "Non-Member Deleted";
             Session["resultMessage"] = "Non-Member Deleted Successfuly";
             Session["resultReturnURL"] = "ManageNonMembers.aspx";
             Response.Redirect("Result.aspx", true);
         }
         else
         {
             DataLayer dl = new DataLayer();
             dl.UpdateNonMember(lbxNonMembers.SelectedValue, tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNonMemberNewsletter.Checked);
             Session["resultColor"] = "#007700";
             Session["resultTitle"] = "Non-Member Updated";
             Session["resultMessage"] = "Non-Member Updated Successfuly";
             Session["resultReturnURL"] = "ManageNonMembers.aspx";
             Response.Redirect("Result.aspx", true);
         }
     }
 }
开发者ID:chevex-archived,项目名称:ReferralNetworX,代码行数:36,代码来源:ManageNonMembers.aspx.cs


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