public virtual ActionResult EditMaster(MemberMasterModel model) { var master = new MemberMaster { Id = (long)model.Id, Date = model.Date.ToMiladiDate(), Name = model.Name }; var result = _memberManagementService.AddOrUpdateMaster(master, StateOperation.ویرایش); return(Json(new { IsError = !result.Item1, Message = result.Item2 })); }
public virtual ActionResult CreateMember(MemberMasterModel model) { if (!ModelState.IsValid) { return(Json(new { IsError = true, Message = "ورودی نامعتبر" })); } var master = new MemberMaster { Date = model.Date.ToMiladiDate(), Name = model.Name, RequestType = model.RequestType, UniversityId = Convert.ToInt64(User.LevelId()) }; var result = _memberManagementService.AddOrUpdateMaster(master, StateOperation.درج); return(Json(new { IsError = !result.Item1, Message = result.Item2, master.Id })); }