本文整理汇总了C#中CloudSalesDAL.ProductsDAL.GetProductList方法的典型用法代码示例。如果您正苦于以下问题:C# ProductsDAL.GetProductList方法的具体用法?C# ProductsDAL.GetProductList怎么用?C# ProductsDAL.GetProductList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CloudSalesDAL.ProductsDAL
的用法示例。
在下文中一共展示了ProductsDAL.GetProductList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetProductList
/// <summary>
/// 获取产品列表
/// </summary>
/// <param name="keyWords">关键词</param>
/// <param name="pageSize">页Size</param>
/// <param name="pageIndex">页码</param>
/// <param name="totalCount">总数</param>
/// <param name="pageCount">总页数</param>
/// <param name="clientID">客户端ID</param>
/// <returns></returns>
public List<Products> GetProductList(string keyWords, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string clientID)
{
var dal = new ProductsDAL();
DataSet ds = dal.GetProductList(keyWords, pageSize, pageIndex, ref totalCount, ref pageCount, clientID);
List<Products> list = new List<Products>();
foreach (DataRow dr in ds.Tables[0].Rows)
{
Products model = new Products();
model.FillData(dr);
list.Add(model);
}
return list;
}
示例2: GetProductList
public List<Products> GetProductList(string categoryid, string beginprice, string endprice, string keyWords, string orderby, bool isasc, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string clientID)
{
var dal = new ProductsDAL();
DataSet ds = dal.GetProductList(categoryid, beginprice, endprice, keyWords, orderby, isasc ? 1 : 0, pageSize, pageIndex, ref totalCount, ref pageCount, clientID);
List<Products> list = new List<Products>();
foreach (DataRow dr in ds.Tables[0].Rows)
{
Products model = new Products();
model.FillData(dr);
list.Add(model);
}
return list;
}
示例3: GetProductListDataTable
public DataTable GetProductListDataTable(string categoryid, string beginprice, string endprice, string keyWords,
string orderby, bool isasc, int pageSize, int pageIndex, ref int totalCount, ref int pageCount,
string clientID)
{
DataTable dt=new DataTable();
var dal = new ProductsDAL();
DataSet ds = dal.GetProductList(categoryid, beginprice, endprice, keyWords, orderby, isasc ? 1 : 0, pageSize, pageIndex, ref totalCount, ref pageCount, clientID);
if (ds.Tables.Count > 0)
{
dt = ds.Tables[0];
}
return dt;
}