예제 #1
0
        public ActionResult MergeStates(ModelMasterState model)
        {
            _IMasterState.Admin_MergeStates(model.SourceStateId, model.DestinationStateId);
            Response.Redirect("ManageState");

            return(View(model));
        }
예제 #2
0
        public ActionResult MergeStates()
        {
            var getResult          = _IMasterState.Admin_MasterStateGetOnCountryId(userEntity.MasterCountryId);
            ModelMasterState model = new ModelMasterState();

            model.States = getResult;

            return(View(model));
        }
예제 #3
0
        public ActionResult UpdateState(int stateId)
        {
            ModelMasterState model = new ModelMasterState();

            if (stateId > 0)
            {
                MasterStateDTO _adminUser = _IMasterState.Admin_MasterStateGetOnStateId(stateId);
                model.CountryId      = _adminUser.CountryId;
                model.IsDefault      = _adminUser.IsDefault;
                model.StateId        = _adminUser.StateId;
                model.StateName      = _adminUser.StateName;
                model.StateShortName = _adminUser.StateShortName;
            }

            return(View(model));
        }
예제 #4
0
        public ActionResult UpdateState(ModelMasterState model)
        {
            MasterStateDTO _dto = new MasterStateDTO();

            _dto.CountryId      = userEntity.MasterCountryId;
            _dto.IsDefault      = model.IsDefault;
            _dto.StateId        = model.StateId;
            _dto.StateName      = model.StateName;
            _dto.StateShortName = model.StateShortName;

            if (_IMasterState.Admin_MasterStateCheckExists(_dto).Count > 0)
            {
                model.ErrorMessage = "State name already existed";
            }
            else
            {
                _IMasterState.Admin_MasterStateUpdate(_dto);
                Response.Redirect("ManageState");
            }
            return(View(model));
        }