示例#1
0
        public JsonResult GetFacilityTypes(FacilityTypeViewModel ftViewModel)
        {
            PaginationInfo pager = new PaginationInfo();

            pager = ftViewModel.Pager;

            PaginationViewModel pViewModel = new PaginationViewModel();

            try
            {
                pViewModel.dt = _ftRepo.GetFacilityTypes(ftViewModel.FacilityType.FacilityTypeName, ref pager);

                pViewModel.Pager = pager;

                Logger.Debug("FacilityType Controller GetFacilityTypes");
            }

            catch (Exception ex)
            {
                ftViewModel.FriendlyMessage.Add(MessageStore.Get("SYS01"));

                Logger.Error("FacilityType Controller - GetFacilityTypes" + ex.ToString());
            }

            return(Json(JsonConvert.SerializeObject(pViewModel), JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public static IEnumerable <facility_type> GetFacilityTypes()
 {
     return(facilityType.GetFacilityTypes());
 }