Example #1
0
        public ActionResult CreateTehsil(string TehsilName, int DistrictID, int TehsilID)
        {
            // var sig = UtilityClass.GetSession(UserSession.ESSSession);
            string message = string.Empty, status = string.Empty;

            try
            {
                if (TehsilID == 0)
                {
                    MngDistrictandTehsils mobj = new MngDistrictandTehsils();
                    mobj.CreateTehsil(TehsilName, DistrictID);
                    message = BusinessLayer.MdlClasses.UtilityClass.UtilityMessages.successmessage.ToString();
                    status  = BusinessLayer.MdlClasses.UtilityClass.Enums.ErrorClass.success.ToString();
                }
                else
                {
                    MngDistrictandTehsils mobj = new MngDistrictandTehsils();
                    mobj.UpdateTehsil(TehsilName, DistrictID, TehsilID);
                    message = BusinessLayer.MdlClasses.UtilityClass.UtilityMessages.updatemessage.ToString();
                    status  = BusinessLayer.MdlClasses.UtilityClass.Enums.ErrorClass.success.ToString();
                }
            }
            catch (Exception ex)
            {
                message = ex.Message;// BusinessLayer.MdlClasses.UtilityClass.UtilityMessages.errormessage.ToString();
                status  = BusinessLayer.MdlClasses.UtilityClass.Enums.ErrorClass.error.ToString();
            }
            return(Json(new { status = status.ToString(), message = message.ToString() }));
        }
Example #2
0
        public ActionResult UpdateDistrictModle(int Id)
        {
            MdlDistrictandTehsils Pmodel = new MdlDistrictandTehsils();
            MngDistrictandTehsils mobj   = new MngDistrictandTehsils();

            Pmodel = mobj.EditDistrict(Id);
            return(PartialView("~/Views/Home/PartialViews/_CreateDistrictModle.cshtml", Pmodel));
        }
Example #3
0
        public ActionResult CreateTehsilsModle()
        {
            MdlDistrictandTehsils Pmodel = new MdlDistrictandTehsils();
            MngDistrictandTehsils ObjApp = new MngDistrictandTehsils();

            Pmodel.GetAllDistrictsDrp = ObjApp.GetAllDistrict(0);
            return(PartialView("~/Views/Home/PartialViews/_CreateTehsilModel.cshtml", Pmodel));
        }
Example #4
0
        public ActionResult UpdateTeshilModle(int Id)
        {
            MdlDistrictandTehsils Pmodel = new MdlDistrictandTehsils();
            MngDistrictandTehsils ObjApp = new MngDistrictandTehsils();

            Pmodel = ObjApp.EditTehsil(Id);
            Pmodel.GetAllDistrictsDrp = ObjApp.GetAllDistrict(Pmodel.DistrictID);
            return(PartialView("~/Views/Home/PartialViews/_CreateTehsilModel.cshtml", Pmodel));
        }
Example #5
0
        public ActionResult Setups()
        {
            if (sig != null)
            {
                MngDistrictandTehsils objApp    = new MngDistrictandTehsils();
                MdlDistrictandTehsils modellist = new MdlDistrictandTehsils();
                modellist.DistrictList = objApp.GetAllDistrictsList();
                modellist.TehsilList   = objApp.GetAllTehsilList();


                return(View(modellist));
            }
            else
            {
                return(RedirectToAction("Index", "Login"));
            }
        }