public ActionResult CreateMails(string treckNumber, string from, string to, string systemMail, string desc) { var mng = new ContractsManager(); int statusID = 1; var item = new Mikhailova_mails { id = 0, treckNumber = treckNumber, date = DateTime.Now.Date, from = from, to = to, statusID = statusID, systemMail = systemMail, treckNumberReplay = "", dateReplay = DateTime.Now.Date, desc = desc }; mng.SaveMail(item); return(Json(new { result = item.id > 0, savedID = item.id, }, JsonRequestBehavior.AllowGet)); }
public ActionResult EditMails(Mikhailova_mails item) { var mng = new ContractsManager(); mng.SaveMail(item); return(Json(new { result = true })); }