public SPUpdateDistrict_Result UpdateDistrict(TblDistrictMst _dist) { try { using (var db = new DBEntities()) { var Data = db.SPUpdateDistrict(_dist.StateID, _dist.DistrictCode, _dist.DistrictName, Convert.ToInt32(_dist.UserCode)).FirstOrDefault(); return(Data); } } catch (Exception ex) { throw null; } }
public ActionResult DistrictMaster(TblDistrictMst _dist) { SPUpdateDistrict_Result Data = new SPUpdateDistrict_Result(); try { string userType = Convert.ToString(Session["UserTypeID"]); if (string.IsNullOrEmpty(userType)) { return(RedirectToAction("MainIndex", "Login")); } if (ModelState.IsValid) { _dist.UserCode = Session["UserCode"].ToString(); Data = _DistBuss.UpdateDistrict(_dist); return(Json(Data, JsonRequestBehavior.AllowGet)); } else { Data = new SPUpdateDistrict_Result() { Code = "001", Message = "Please fill All the fields" }; return(Json(Data, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { Data = new SPUpdateDistrict_Result() { Code = "001", Message = ex.Message.ToString() }; return(Json(Data, JsonRequestBehavior.AllowGet)); } }
public SPUpdateDistrict_Result UpdateDistrict(TblDistrictMst _dist) { return(DAO.UpdateDistrict(_dist)); }