public ActionResult CreateUpdateAccount(UserSingleModel model) { AccountDropdownlist(); if (ModelState.IsValid) { if (model.Id > 0) { bool result = userService.Edit(model); if (result == true) { ViewBag.Message = "ສຳເລັດ"; return(View(model)); } else { ViewBag.Message = "ບໍ່ສຳເລັດ ກະລຸນາລອງໃຫມ່ອີກຄັ້ງ"; return(View(model)); } } else { bool result = userService.Create(model); if (result == true) { ViewBag.Message = "ສຳເລັດ"; return(View()); } else { ViewBag.Message = "ບໍ່ສຳເລັດ ກະລຸນາລອງໃຫມ່ອີກຄັ້ງ"; return(View(model)); } } } else { return(View()); } }
protected override void SaveData(SystemUser obj) { systemUserServiceInstance.Create(obj); }