本文整理汇总了C#中Bobs.Usr.DeleteProfilePic方法的典型用法代码示例。如果您正苦于以下问题:C# Usr.DeleteProfilePic方法的具体用法?C# Usr.DeleteProfilePic怎么用?C# Usr.DeleteProfilePic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bobs.Usr
的用法示例。
在下文中一共展示了Usr.DeleteProfilePic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!Usr.Current.IsAdmin)
throw new Exception("");
Usr u = new Usr(ContainerPage.Url["UsrK"]);
u.DeleteProfilePic();
Mailer sm = new Mailer();
sm.UsrRecipient = u;
sm.TemplateType = Mailer.TemplateTypes.AnotherSiteUser;
sm.Body = "<p>Your profile photo has been deleted</p>";
sm.Body += "<p>This could have been for one of several reasons:</p>";
sm.Body += "<ul>";
sm.Body += "<li>Profile pictures <b>MUST BE OF YOUR FACE</b>.</li>";
sm.Body += "<li>Profile pictures must show your face clearly - make sure you <b>ZOOM IN</b>.</li>";
sm.Body += "<li>The face must match your sex";
if (u.IsMale || u.IsFemale)
sm.Body += " (you currently have <b>" + (u.IsMale ? "MALE" : "FEMALE") + "</b> selected as your sex)";
sm.Body += " - see the <a href=\"[LOGIN(/pages/mydetails)]\">My details</a> page to change your selected sex.</li>";
sm.Body += "</ul>";
sm.Body += "<p>You can create a new profile picture on the <a href=\"[LOGIN(/pages/mypicture)]\">Create my picture</a> page.</p>";
sm.Subject = "Your DontStayIn profile photo has been deleted";
sm.RedirectUrl = "/pages/mypicture";
sm.Send();
Response.Redirect(u.Url());
}