本文整理汇总了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;
}
}
示例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);
}
示例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);
}
}
}