public ActionResult Add(MESSAGE_HISTORY model) { try { // 增加数据 if (ModelState.IsValid) { //etMgr.AddToMESSAGE_HISTORY(msg); if (etMgr.SaveChanges() != 0) { return(RedirectToAction("Index")); } else { return(RedirectToAction("Add")); } } return(RedirectToAction("Add")); } catch (Exception ex) { Com.Mxm.WriteTxt.WriteText(ex.Message + ex.StackTrace); return(View()); } }
public AddMsg(MESSAGE_HISTORY msg, List <MSG_RECEIVE_LIST> reveiveLst) { this.msg = msg; this.receiveLst = receiveLst; }