public JsonResult GetStates(StateViewModel sViewModel) { PaginationInfo pager = new PaginationInfo(); pager = sViewModel.Pager; PaginationViewModel pViewModel = new PaginationViewModel(); try { pViewModel.dt = _sRepo.GetStates(sViewModel.State.CountryId, sViewModel.State.StateCode, sViewModel.State.StateName, ref pager); pViewModel.Pager = pager; Logger.Debug("State Controller GetStates"); } catch (Exception ex) { sViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01")); Logger.Error("State Controller - GetStates" + ex.ToString()); } return(Json(JsonConvert.SerializeObject(pViewModel), JsonRequestBehavior.AllowGet)); }
public DataTable Get_StateMaster(int CountryId, string StateCode, string StateName, ref PaginationInfo pager) { return(_stateRepo.GetStates(CountryId, StateCode, StateName, ref pager)); }