public Object CreateObject() { HotGoods HotGoods = new HotGoods { PromotionTime = new PromotionTime() }; return(HotGoods); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HotGoods.DataSource = data.GetDataReader("select top 8 * from ShangPinInfo order by ShangPinDate desc "); HotGoods.DataBind(); DataList1.DataSource = data.GetDataReader("select top 8 * from ShangPinInfo order by ShangPinClick desc "); DataList1.DataBind(); } }