コード例 #1
0
ファイル: BillList.cs プロジェクト: ljbbean/project
        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");
            }
        }
コード例 #2
0
ファイル: StockBill.cs プロジェクト: ljbbean/project
 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
     });
 }
コード例 #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;
        }
コード例 #4
0
ファイル: BillList.cs プロジェクト: ljbbean/project
 public list(Login.User user) : base(AppUtils.ConnectionString)
 {
     this.user = user;
 }
コード例 #5
0
ファイル: StockBill.cs プロジェクト: ljbbean/project
 public list(Login.User user, bool isSample = false)
     : base(AppUtils.ConnectionString)
 {
     this.user     = user;
     this.isSample = isSample;
 }