public ActionResult MessageDelete(int id) { ViewBag.MenuGroup = "ML"; ViewBag.MenuTitle = "留言列表"; BLLMEnterpriseMessage.DeleteMEnterriseMessage(id); return(RedirectToAction("MessageList")); }
public ActionResult MessageDetail(int id, string read) { ViewBag.MenuGroup = "MI"; ViewBag.MenuTitle = "留言详情"; if (id <= 0) { return(null); } if (!string.IsNullOrEmpty(read)) { BLLMEnterpriseMessage.UpdateMEnterriseMessage(id, read == "是" ? true : false); ViewBag.result = "success"; } MEnterpriseMessage message = BLLMEnterpriseMessage.GetMEnterriseMessage(id); return(View(message)); }
public ActionResult CasesDetail(int id, string show) { ViewBag.MenuGroup = "AC"; ViewBag.MenuTitle = "案例详情"; if (id <= 0) { return(null); } if (!string.IsNullOrEmpty(show)) { BLLMEnterpriseMessage.UpdateMEnterriseMessage(id, show == "是" ? true : false); ViewBag.result = "success"; } MEnterpriseCases cases = BLLMEnterpriseCases.GetMEnterpriseCases(id); return(View(cases)); }
public ActionResult SendMessage(string Mname, string Mtel, string Memail, string Mmessage) { MEnterpriseMessage message = new MEnterpriseMessage(); message.MessageEnterpriseName = Mname; message.MessageEnterpriseTel = Mtel; message.MessageEnterpriseEmail = Memail; message.Message = Mmessage; message.MessageIsRead = false; ViewBag.Menu = "AU"; if (string.IsNullOrEmpty(Mname)) { ViewBag.MnameEorror = "请输入公司名称"; } if (string.IsNullOrEmpty(Mtel)) { ViewBag.MtelEorror = "请输入联系电话"; } if (string.IsNullOrEmpty(Mmessage)) { ViewBag.MmessageEorror = "请输入您的留言"; } if (string.IsNullOrEmpty(Memail)) { ViewBag.MemailEorror = "请输入邮箱地址"; } else { Regex reg = new Regex(@"^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})"); if (!reg.IsMatch(Memail)) { ViewBag.MemailError = "请输入正确的邮箱地址"; } } if (!string.IsNullOrEmpty(ViewBag.MnameEorror) || !string.IsNullOrEmpty(ViewBag.MtelEorror) || !string.IsNullOrEmpty(ViewBag.MmessageEorror) || !string.IsNullOrEmpty(ViewBag.MemailEorror)) { return(View("AboutUs")); } BLLMEnterpriseMessage.SetMEnterriseMessage(message); return(View("AboutUs")); }
public ActionResult MessageList(int?pageindex) { ViewBag.MenuGroup = "MI"; if (!BLLMEnterpriseAdmin.IsLogin()) { return(Redirect("~/AdminAccount/Login")); } ViewBag.MenuTitle = "留言列表"; PageHelper page = new PageHelper(); if (!pageindex.HasValue) { pageindex = 1; } page.TotalCount = BLLMEnterpriseMessage.GetMEnterriseMessage().Count; page.PageNext = pageindex.Value + 1; page.PageCurrent = pageindex.Value; page.PagePre = pageindex.Value - 1; List <MEnterpriseMessage> messageList = BLLMEnterpriseMessage.GetPageMessage(page, pageindex.Value); ViewBag.Page = page; return(View(messageList)); }