public ActionResult MergeStates(ModelMasterState model) { _IMasterState.Admin_MergeStates(model.SourceStateId, model.DestinationStateId); Response.Redirect("ManageState"); return(View(model)); }
public ActionResult MergeStates() { var getResult = _IMasterState.Admin_MasterStateGetOnCountryId(userEntity.MasterCountryId); ModelMasterState model = new ModelMasterState(); model.States = getResult; return(View(model)); }
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)); }
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)); }