Beispiel #1
0
        public override void Initialize()
        {
            base.Initialize();
            Login.User user = (Login.User)Session["user"];
            Context["grid"] = new list(new Login.User()
            {
                Id = user.Id, Power = user.Power, Name = user.Name
            });
            DateTime time = DateTime.Now;

            Context["startDate"]   = new DateTime(time.Year, time.Month, 1);
            Context["backSection"] = user.Power == 99;
            using (DbHelper db = AppUtils.CreateDbHelper())
            {
                IHashObject data = db.SelectFirstRow("select sum(total) as total, sum(paytotal) as paytotal, max(month) as month from backsection");
                if (data == null)
                {
                    data = new HashObject();
                }
                Context["total"]      = data.GetValue <decimal>("total");
                Context["paytotal"]   = data.GetValue <decimal>("paytotal");
                Context["nopaytotal"] = data.GetValue <decimal>("total") - data.GetValue <decimal>("paytotal");
                Context["month"]      = data.GetValue <DateTime>("month").ToString("yyyy-MM");
            }
        }
Beispiel #2
0
 public override void Initialize()
 {
     base.Initialize();
     Context["time"] = new DateTime();
     Login.User user = (Login.User)Session["user"];
     Context["list"] = new list(new Login.User()
     {
         Id = user.Id, Power = user.Power, Name = user.Name
     });
 }
Beispiel #3
0
        public override void Initialize()
        {
            base.Initialize();
            Login.User user = (Login.User)Session["user"];
            var        list = new StockBill.list(new Login.User()
            {
                Id = user.Id, Power = user.Power, Name = user.Name
            }, true);
            IHashObject item = new HashObject();

            item["kind"] = "2";
            list.SetQueryParams(item);
            Context["list"] = list;
        }
Beispiel #4
0
 public list(Login.User user) : base(AppUtils.ConnectionString)
 {
     this.user = user;
 }
Beispiel #5
0
 public list(Login.User user, bool isSample = false)
     : base(AppUtils.ConnectionString)
 {
     this.user     = user;
     this.isSample = isSample;
 }