public string FindMaterialIsSpotGoodByPage(Guid ID) { Guid LinkMainCID = ID; //定义查询参数 int PageIndex = 1; int PageSize = 30; string Keyword = string.Empty; Guid MatBrandID = Guid.Empty; int IsSpotGood = 0; try { PageIndex = Convert.ToInt32(Request.QueryString["PageIndex"]); if (PageIndex <= 0) { PageIndex = 1; } } catch { PageIndex = 1; } try { PageSize = Convert.ToInt32(Request.QueryString["PageSize"]); if (PageSize <= 0) { PageSize = 30; } } catch { PageSize = 30; } try { Keyword = Request.QueryString["Keyword"].Trim(); } catch { Keyword = string.Empty; } try { MatBrandID = new Guid(Request.QueryString["MatBrandID"].Trim()); } catch { MatBrandID = Guid.Empty; } try { IsSpotGood = Convert.ToInt32(Request.QueryString["IsSpotGood"].Trim()); } catch { IsSpotGood = 0; } int TotalRecord = 0; List<Material> ML = IM.FindMaterialIsSpotGoodByPage(PageIndex, PageSize, out TotalRecord, Keyword, MatBrandID, IsSpotGood, LinkMainCID).ToList(); MaterialPageList MPageList = new MaterialPageList(); MPageList.TotalRecord = TotalRecord; MPageList.PageIndex = PageIndex; MPageList.PageSize = PageSize; MPageList.Rows = ML; return JsonConvert.SerializeObject(MPageList); }
public string FindMaterialForCustomerByPage(Guid ID) { Guid LinkMainCID = ID; //定义查询参数 int PageIndex = 1; int PageSize = 30; string Keyword = string.Empty; string MatBrand = string.Empty; string CatName = string.Empty; string IsStatUs = string.Empty; Guid MatBrandID = Guid.Empty; Guid CustomerID = Guid.Empty; int TotalRecord; try { PageIndex = Convert.ToInt32(Request.QueryString["PageIndex"]); if (PageIndex <= 0) { PageIndex = 1; } } catch { PageIndex = 1; } try { PageSize = Convert.ToInt32(Request.QueryString["PageSize"]); if (PageSize <= 0) { PageSize = 30; } } catch { PageSize = 30; } try { Keyword = Request.QueryString["Keyword"].Trim(); } catch { Keyword = string.Empty; } try { MatBrand = Request.QueryString["MatBrand"].Trim(); } catch { MatBrand = string.Empty; } try { CatName = Request.QueryString["CatName"].Trim(); } catch { CatName = string.Empty; } try { IsStatUs = Request.QueryString["IsStatUs"].Trim(); } catch { IsStatUs = string.Empty; } try { MatBrandID = new Guid(Request.QueryString["MatBrandID"].Trim()); } catch { MatBrandID = Guid.Empty; } try { CustomerID = new Guid(Request.QueryString["CustomerID"].Trim()); } catch { CustomerID = Guid.Empty; } List<Material> ML = IM.FindMaterialForCustomerByPage(PageIndex, PageSize, out TotalRecord, Keyword, MatBrand, CatName, MatBrandID, IsStatUs, CustomerID, LinkMainCID); MaterialPageList MPageList = new MaterialPageList(); MPageList.PageIndex = PageIndex; MPageList.PageSize = PageSize; MPageList.Rows = ML; MPageList.TotalRecord = TotalRecord; return JsonConvert.SerializeObject(MPageList); }