private void GetSysRemind() { int count = 5; Chain.BLL.Mem bllMem = new Chain.BLL.Mem(); DataTable dtBirhtday = bllMem.GetBirthdayList(0, this.shopID, count).Tables[0]; this.gvMemBirthday.DataSource = dtBirhtday; this.gvMemBirthday.DataBind(); StartPage.RepeaterBindSerial(this.gvMemBirthday, 0); DataTable dtMemPastTime = bllMem.GetMemPastTime(" and DATEDIFF(day,getdate(),MemPastTime) = 0 ", this.shopID, count).Tables[0]; this.gvMemPastTime.DataSource = dtMemPastTime; this.gvMemPastTime.DataBind(); StartPage.RepeaterBindSerial(this.gvMemPastTime, 0); DataTable dtMemPointRest = bllMem.GetMemPointReset(string.Format("MemPoint>0 and DATEDIFF(day,isnull(MemConsumeLastTime,MemCreateTime),getdate()) >= '{0}' and MemShopID = '{1}' ", PubFunction.curParameter.intPointPeriod, this.shopID), 0, count).Tables[0]; this.gvdMemPontReset.DataSource = dtMemPointRest; this.gvdMemPontReset.DataBind(); StartPage.RepeaterBindSerial(this.gvdMemPontReset, 0); DataTable dtGoods = new Chain.BLL.Goods().GetStockRemind(string.Format("Number < = '{0}' and GoodsType = '0' and ShopID = '{1}'", PubFunction.curParameter.intStockCount, this.shopID), count).Tables[0]; this.gvGoods.DataSource = dtGoods; this.gvGoods.DataBind(); StartPage.RepeaterBindSerial(this.gvGoods, 0); DataTable dtCustomRemind = new Chain.BLL.SysCustomRemind().GetList("CustomReminder like '%" + PubFunction.UserIDTOName(this.userid) + "%' and DATEDIFF(day,CustomRemindTime,getdate())<=0 ", count).Tables[0]; this.gvCustomRemind.DataSource = dtCustomRemind; this.gvCustomRemind.DataBind(); StartPage.RepeaterBindSerial(this.gvCustomRemind, 0); }
private int GetSysRemind(int shopID, int userid) { int sumCount = 0; int count = 100000; Chain.BLL.Mem bllMem = new Chain.BLL.Mem(); DataTable dtBirhtday = bllMem.GetBirthdayList(0, shopID, count).Tables[0]; sumCount += dtBirhtday.Rows.Count; DataTable dtMemPastTime = bllMem.GetMemPastTime(" and DATEDIFF(day,getdate(),MemPastTime) = 0 ", shopID, count).Tables[0]; sumCount += dtMemPastTime.Rows.Count; DataTable dtMemPointRest = bllMem.GetMemPointReset(string.Format("MemPoint>0 and DATEDIFF(day,isnull(MemConsumeLastTime,MemCreateTime),getdate()) >= '{0}' and MemShopID = '{1}' ", PubFunction.curParameter.intPointPeriod, shopID), 0, count).Tables[0]; sumCount += dtMemPointRest.Rows.Count; DataTable dtGoods = new Chain.BLL.Goods().GetStockRemind(string.Format("Number < = '{0}' and GoodsType = '0' and ShopID = '{1}'", PubFunction.curParameter.intStockCount, shopID), count).Tables[0]; sumCount += dtGoods.Rows.Count; DataTable dtCustomRemind = new Chain.BLL.SysCustomRemind().GetList("CustomReminder like '%" + PubFunction.UserIDTOName(userid) + "%' and DATEDIFF(day,CustomRemindTime,getdate())<=0 ", count).Tables[0]; return(sumCount + dtCustomRemind.Rows.Count); }