网上购物系统(Task005)——自定义DateList控件分页显示商品信息
一、数据集Model添加商品信息类ItemInfo.cs。
[csharp] using System;
namespace WestGarden.Model
{
public class ItemInfo
{
private int itemid;
private string categoryid;
private string name;
private decimal price;
private string image;
private string categoryname;
public ItemInfo() { }
public ItemInfo(int itemid, string categoryid, string name, decimal price, string image, string categoryname)
{
this.itemid = itemid;
this.categoryid = categoryid;
this.name = name;
this.price = price;
this.image = image;
this.categoryname = categoryname;
}
public int ItemId
{
get { return itemid; }
set { itemid = value; }
}
public string CategoryId
{
get { return categoryid; }
set { categoryid = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public decimal Price
{
get { return price; }
set { price = value; }
}
public string Image
{
get { return image; }
set { image = value; }
}
public string CategoryName
{
get { return categoryname; }
set { categoryname = value; }
}
}
}
using System;
namespace WestGarden.Model
{
public class ItemInfo
{
private int itemid;
private string categoryid;
private string name;
private decimal price;
private string image;
private string categoryname;
public ItemInfo() { }
public ItemInfo(int itemid, string categoryid, string name, decimal price, string image, string categoryname)
{
this.itemid = itemid;
this.categoryid = categoryid;
this.name = name;
this.price = price;
this.image = image;
this.categoryname = categoryname;
}
public int ItemId
{
get { return itemid; }
set { itemid = value; }
}
public string CategoryId
{
get { return categoryid; }
set { categoryid = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public decimal Price
{
get { return price; }
set { price = value; }
}
public string Image
{
get { return image; }
set { image = value; }
}
public string CategoryName
{
get { return categoryname; }
set { categoryname = value; }
}
}
}
二、数据访问层DAL中添加类Item.cs,并添加函数GetItemsB
补充:Web开发 , ASP.Net ,