Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public DataTable Get_StateMaster(int CountryId, string StateCode, string StateName, ref PaginationInfo pager)
 {
     return(_stateRepo.GetStates(CountryId, StateCode, StateName, ref pager));
 }