Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        private void GetCustomRemindList()
        {
            Chain.BLL.SysCustomRemind bllCustomRemind = new Chain.BLL.SysCustomRemind();
            DataTable dtCustomRemind = bllCustomRemind.GetList("").Tables[0];

            this.gvCustomRemind.DataSource = dtCustomRemind;
            this.gvCustomRemind.DataBind();
        }
Ejemplo n.º 3
0
        private void GetCustomRemindInfo()
        {
            int intRemind = int.Parse(base.Request.QueryString["CID"]);

            Chain.Model.SysCustomRemind modeRemind = new Chain.BLL.SysCustomRemind().GetModel(intRemind);
            this.txtCustomRemindID.Value     = modeRemind.CustomRemindID.ToString();
            this.txtCustomRemindTitle.Value  = modeRemind.CustomRemindTitle;
            this.txtCustomRemindTime.Value   = modeRemind.CustomRemindTime.ToShortDateString();
            this.txtCustomRemindDetail.Value = modeRemind.CustomRemindDetail;
            string strReminder = modeRemind.CustomReminder;

            string[] str = strReminder.Split(new char[]
            {
                ','
            });
            string[] array = str;
            for (int i = 0; i < array.Length; i++)
            {
                string p = array[i];
                this.cblCustomReminder.Items.FindByValue(p).Selected = true;
            }
        }
Ejemplo n.º 4
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);
        }