Example #1
0
        private void BindPointChange()
        {
            PointRate bllPointRate = new PointRate();

            this.hidLevel.Value = bllPointRate.GetPointRate().PointRateLevel.ToString();
            string sbWhere = this.QueryCondition();

            sbWhere  = sbWhere.Replace("POINTLOG.PointChangeType =9", "(POINTLOG.PointChangeType =9 or POINTLOG.PointChangeType =12)");
            sbWhere += "  and PointLog.PointShopID = SysShop.ShopID and PointLog.PointMemID = Mem.MemID and Mem.MemLevelID=MemLevel.LevelID and PointLog.PointUserID = SysUser.UserID";
            sbWhere  = PubFunction.GetShopAuthority(this._UserShopID, "PointShopID", sbWhere);
            int    intPoint = bllPointRate.GetPointRateNumber(sbWhere + " and datediff(day,PointCreateTime,getdate())=0");
            string strPoint = string.Format("{0}", intPoint);

            this.lblToday.Text = strPoint;
            intPoint           = bllPointRate.GetPointRateNumber(sbWhere + " and datediff(week,PointCreateTime,getdate())=0");
            strPoint           = string.Format("{0}", intPoint);
            this.lblWeek.Text  = strPoint;
            intPoint           = bllPointRate.GetPointRateNumber(sbWhere + " and datediff(month,PointCreateTime,getdate())=0");
            strPoint           = string.Format("{0}", intPoint);
            this.lblMonth.Text = strPoint;
            intPoint           = bllPointRate.GetPointRateNumber(sbWhere);
            strPoint           = string.Format("{0}", intPoint);
            this.lblTotal.Text = strPoint;
        }