public ActionResult Create(DIC_TINH model) { if (ModelState.IsValid) { try { model.Cap = model.GetCapById(model.Cap); var result = model.Insert(); if (result == data.enums.SqlResultType.OK) { this.ShowNotification(data.enums.MessageObjectType.Success, "", "Tạo mới tỉnh/thành thành công."); return(RedirectToAction("Index")); } else { this.GetMessageFromSqlState(result, "Mã tỉnh"); return(View(model)); } } catch (Exception ex) { this.HanderException(ex); return(View(model)); } } else { return(View(model)); } }