本文整理汇总了C#中DataLayer.DeleteNonMember方法的典型用法代码示例。如果您正苦于以下问题:C# DataLayer.DeleteNonMember方法的具体用法?C# DataLayer.DeleteNonMember怎么用?C# DataLayer.DeleteNonMember使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataLayer
的用法示例。
在下文中一共展示了DataLayer.DeleteNonMember方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
}
示例2: btnSubmit_Click
//.........这里部分代码省略.........
mm = new MailMessage();
mm.BodyFormat = MailFormat.Html;
mm.To = tbxEmail.Text;
mm.From = "[email protected]";
mm.Subject = "Someone posted a comment on your profile!";
mm.Body = "Walt Ford posted a comment on your profile.";
mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
SmtpMail.Send(mm);
}
//////////////////////////////////////////////////////////////
mm = new MailMessage();
mm.BodyFormat = MailFormat.Html;
mm.To = "[email protected];[email protected]";
mm.From = "[email protected]";
mm.Subject = "Someone signed up on ReferralNetworX.com!";
mm.Body = tbxName.Text + " signed up on ReferralNetworX.com.";
mm.Body += "<br /><br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
SmtpMail.Send(mm);
mm = new MailMessage();
mm.BodyFormat = MailFormat.Html;
mm.To = tbxEmail.Text;
mm.From = "[email protected]";
mm.Subject = "Welcome to ReferralNetworX.com!";
mm.Body = "Welcome " + dl.GetMemberNameBy_Email(tbxEmail.Text) + ",<br /><br />";
mm.Body += " We are dedicated to helping you and your business succeed. I truly hope RNX helps you to grow to new heights and accomplish your goals. I am confident that you will provide a lot of value to the RNX community and that your knowledge will benefit everyone! Please <a href=\"http://www.referralnetworx.com/referralnetworx/Topic.aspx?topic=50\">visit our forums to say hi</a> to fellow members and get to know everyone. Also, be sure to log in and edit your profile. The more information you provide about yourself and your business, the more you will get noticed and more opportunities will be presented to you.<br /><br />Here is your username and temporary password:<br />Password - " + iPassword.ToString() + " (You can change this after logging in)<br />Username - " + tbxEmail.Text + "<br /><br />Alex Ford<br />Referral NetworX Administrator";
SmtpMail.Send(mm);
try
{
dl.DeleteNonMember(tbxEmail.Text);
}
catch { }
Session["resultColor"] = "#007700";
Session["resultTitle"] = "Member Added";
Session["resultMessage"] = "Member Added Successfuly";
Session["resultReturnURL"] = "ManageMembers.aspx";
Response.Redirect("Result.aspx");
}
else
{
if (cbxDeleteMember.Checked)
{
DataLayer dl = new DataLayer();
dl.DeleteMember(lbxMembers.SelectedValue);
Session["resultColor"] = "#007700";
Session["resultTitle"] = "Member Deleted";
Session["resultMessage"] = "Member Deleted Successfuly";
Session["resultReturnURL"] = "ManageMembers.aspx";
Response.Redirect("Result.aspx");
}
else
{
DataLayer dl = new DataLayer();
DataTable dt = dl.GetMemberBy_Email(lbxMembers.SelectedValue);
string sTwitterFeedStyles = dt.Rows[0].ItemArray[32].ToString();
string sPersonalAvatar = dt.Rows[0].ItemArray[3].ToString();
string sMemberAvatar = dt.Rows[0].ItemArray[3].ToString();
string sPhone = dt.Rows[0].ItemArray[4].ToString();
string sInterests = dt.Rows[0].ItemArray[5].ToString();
string sWebsite = dt.Rows[0].ItemArray[6].ToString();
string sPersonalBio = dt.Rows[0].ItemArray[7].ToString();
示例3: btnSubmit_Click
//.........这里部分代码省略.........
dl.AddComment("[email protected]", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
dl.AddThumbsUp(tbxEmail.Text);
//mm = new MailMessage();
//mm.IsBodyHtml = true;
//mm.To.Add(tbxEmail.Text);
//mm.From = new MailAddress("[email protected]");
//mm.Subject = "Someone posted a comment on your profile!";
//mm.Body = "Alex Ford posted a comment on your profile.";
//mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
//smtp.Send(mm);
}
else if (iPerson == 1)
{
int iComment = rand.Next(6);
string sComment = "";
if (iComment == 0)
{
sComment = "Hi and welcome to Referral NetworX! Our mission is your success!<br /><br />- Walt";
}
else if (iComment == 1)
{
sComment = "Welcome to Referral NetworX! I am really looking forward to networking with you. Here's to you continued success!<br /><br />- Walt";
}
else if (iComment == 2)
{
sComment = "Its great to have you as a member of Referral NetworX! We are here to help you with your continued success!<br /><br />- Walt";
}
else if (iComment == 3)
{
sComment = "Congratulations! You are now a member of Referral NetworX. Our mission is your success!<br /><br />- Walt";
}
else if (iComment == 4)
{
sComment = "Welcome! Referral NetworX is your beginning to expanding your personal network! Relationship, Relationship, Relationship!<br /><br />- Walt";
}
else if (iComment == 5)
{
sComment = "Welcome to Referral NetworX! Your journey to building quality relationships and expanding your network has begun!<br /><br />- Walt";
}
dl.AddComment("[email protected]", DateTime.Now, sComment, "Member", true, -1, tbxEmail.Text);
dl.AddThumbsUp(tbxEmail.Text);
//mm = new MailMessage();
//mm.IsBodyHtml = true;
//mm.To.Add(tbxEmail.Text);
//mm.From = new MailAddress("[email protected]");
//mm.Subject = "Someone posted a comment on your profile!";
//mm.Body = "Walt Ford posted a comment on your profile.";
//mm.Body += "<br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
//smtp.Send(mm);
}
#endregion
#region -= Email notifcation of new member =-
//mm = new MailMessage();
//mm.IsBodyHtml = true;
//mm.To.Add("[email protected]");
//mm.To.Add("[email protected]");
//mm.From = new MailAddress("[email protected]");
//mm.Subject = "Someone signed up on ReferralNetworX.com!";
//mm.Body = tbxName.Text + " signed up on ReferralNetworX.com.";
//mm.Body += "<br /><br />How they heard about us: " + ddlHeardAboutUs.SelectedValue;
//mm.Body += "<br /><br /><a href=\"http://www.referralnetworx.com/profile.aspx?member=" + tbxEmail.Text + "\">Click to view</a>";
//smtp.Send(mm);
//mm = new MailMessage();
//mm.IsBodyHtml = true;
//mm.To.Add(tbxEmail.Text);
//mm.From = new MailAddress("[email protected]");
//mm.Subject = "Welcome to ReferralNetworX.com!";
//mm.Body = "Welcome " + dl.GetMemberNameBy_Email(tbxEmail.Text) + ",<br /><br />";
//mm.Body += " We are dedicated to helping you and your business succeed. I truly hope RNX helps you to grow to new heights and accomplish your goals. I am confident that you will provide a lot of value to the RNX community and that your knowledge will benefit everyone! Please <a href=\"http://www.referralnetworx.com/referralnetworx/Topic.aspx?topic=50\">visit our forums to say hi</a> to fellow members and get to know everyone. Also, be sure to log in and edit your profile. The more information you provide about yourself and your business, the more you will get noticed and more opportunities will be presented to you.<br /><br />Alex Ford<br />Referral NetworX Administrator";
//smtp.Send(mm);
#endregion
try
{
dl.DeleteNonMember(tbxEmail.Text);
}
catch { }
FormsAuthentication.SetAuthCookie(tbxEmail.Text, false);
Response.Redirect("~/");
}
else
{
CustomValidator1.IsValid = false;
}
}
else
{
CustomValidator2.IsValid = false;
}
}
}