コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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));
            }
        }
コード例 #3
0
 public SPUpdateDistrict_Result UpdateDistrict(TblDistrictMst _dist)
 {
     return(DAO.UpdateDistrict(_dist));
 }