/// <summary> /// IP정보 리턴 JSON /// </summary> /// 2013-11-28 김두성 /// <param name="Ip_Class_Code"></param> /// <returns></returns> //[HttpPost] public JsonResult GetIpList(string searchType, string searchText, int? page, int? rows) { string paramSearchType = string.IsNullOrEmpty(searchType) ? string.Empty : searchType; string paramSearchText = string.IsNullOrEmpty(searchText) ? string.Empty : searchText; int paramPageNo = page == null ? 1 : page.Value; int paramPageSize = rows == null ? 10 : rows.Value; IpBiz ipBiz = new IpBiz(); int nTotalCount = ipBiz.CountIpList(paramSearchType, paramSearchText); int nRecord = nTotalCount <= paramPageSize ? 1 : (int)Math.Ceiling((double)(nTotalCount / paramPageSize)); Models.JqGridModel model = new Models.JqGridModel { page = paramPageNo, total = nRecord, records = nTotalCount, rows = ipBiz.GetAssetSelectIpInfoList(paramSearchType, paramSearchText, paramPageNo, paramPageSize) }; return Json(model); }
public JsonResult GetCommonCodeList(string asset_group_type, string type) { List<AssetCommonCodeT> assetCommonCodeList = new List<AssetCommonCodeT>(); using (CodeBiz codeBiz = new CodeBiz()) { assetCommonCodeList = codeBiz.GetCommonCodeByAssetType(asset_group_type, type); } Models.JqGridModel model = new Models.JqGridModel { page = 0, total = assetCommonCodeList.Count, records = assetCommonCodeList.Count, rows = assetCommonCodeList }; return Json(model); }
public JsonResult GetAssetStorageVenderCodeList() { List<AssetStorageVenderCodeT> assetStorageVenderCodeList = new List<AssetStorageVenderCodeT>(); using (CodeBiz codebiz = new CodeBiz()) { assetStorageVenderCodeList = codebiz.GetAssetStorageVenderCode(); } Models.JqGridModel model = new Models.JqGridModel { page = 0, total = assetStorageVenderCodeList.Count, records = assetStorageVenderCodeList.Count, rows = assetStorageVenderCodeList }; return Json(model); }
public JsonResult GetAssetServerVenderCodeList(int? page, int? rows) { int paramPageNo = page == null ? 1 : page.Value; int paramPageSize = rows == null ? 10 : rows.Value; int nTotalCount = codeBiz.GetAssetServerVenderCode().Count; int nRecord = nTotalCount <= paramPageSize ? 1 : (int)Math.Ceiling((double)(nTotalCount / paramPageSize)); List<AssetServerVenderCodeT> assetServerVenderCodeList = new List<AssetServerVenderCodeT>(); using(CodeBiz codebiz = new CodeBiz()){ assetServerVenderCodeList = codebiz.GetAssetServerVenderCode(); } Models.JqGridModel model = new Models.JqGridModel { page = paramPageNo, total = nRecord, records = nTotalCount, rows = codeBiz.GetAssetServerVenderCode() }; return Json(model); }