public ActionResult Edit(SalesModel model) { GetDefaultData(); ViewBag.Islook = ""; if (!ModelState.IsValid) { return(View(model)); } try { model.ModifyBy = CurrenUser.Id; model.DateModify = DateTime.Now; salesServices.Update(model); return(RedirectToAction("Edit", new { id = model.VoucherId })); } catch (Exception ex) { model.UserSubmited = model.UserSubmited ?? new User(); model.UserChecked = model.UserChecked ?? new User(); model.UserApproved = model.UserApproved ?? new User(); ModelState.AddModelError(string.Empty, ex.Message); return(View(model)); } }