public ActionResult Message() { IList <Inpinke_Message> list = DBMessageBLL.GetUserMessage(PageInfo, UserSession.CurrentUser.ID); if (list != null && list.Count() > 0) { ViewBag.MsgList = list; } return(View()); }
public ActionResult MsgDetail(int id, string msg) { IList <Inpinke_Message> list = DBMessageBLL.GetMsgDetail(id, UserSession.CurrentUser.ID); if (list != null && list.Count() > 0) { ViewBag.MsgDetail = list; } ViewBag.Msg = msg; return(View()); }
public ActionResult ReplyMsg(int id, FormCollection col) { string msg = col["Msg"]; if (string.IsNullOrEmpty(msg)) { msg = "内容不能为空,描述下您想咨询的事情吧!"; return(RedirectToAction("msgdetail", new { id = id, msg = msg })); } int touser = string.IsNullOrEmpty(col["ToUser"]) ? 0 : int.Parse(col["ToUser"]); Inpinke_Message model = new Inpinke_Message() { ReplyID = id, Msg = col["Msg"], FromUser = UserSession.CurrentUser.ID, ToUser = touser, MsgType = (int)MsgType.UserReply }; BaseResponse br = DBMessageBLL.SendMessage(model); return(RedirectToAction("msgdetail", new { id = id, msg = br.Message })); }