Beispiel #1
0
        private void InitBaseInfo()
        {
            ShiftInfoService service = new ShiftInfoService();
            tbLastShiftTime.Text = service.GetLastShiftTime(1);
            tbUserName.Text = App.userName;

            BillInfoService bService = new BillInfoService();
            DateTime dt = dtDay.Value;
            List<BillInfo> bills = bService.GetBillInfosByTime(dt.ToString("yyyy-MM-dd 10:00:00"),dt.AddDays(1).ToString("yyyy-MM-dd 10:00:00"));

            float shMoneySum = 0.0f;
            float SHcashSum = 0.0f;
            float SHvesaSum = 0.0f;
            float preMoneySum = 0.0f;
            float disMoneySum = 0.0f;
            float runMoneySum = 0.0f;
            foreach (BillInfo b in bills)
            {

                // 2 挂账
                if (b.status == 2)
                {
                    runMoneySum += b.billMoney;
                }
                else
                {
                    shMoneySum += b.SHmoney;
                    SHcashSum += b.SHcash;
                    SHvesaSum += b.SHvesa;
                    preMoneySum += b.preMoney;
                    disMoneySum += b.disMoney;

                }
            }

            tbBillCount.Text = bills.Count + "";
            tbTurnover.Text = shMoneySum + "";
            tbCashSum.Text = SHcashSum + "";
            tbVesaSum.Text = SHvesaSum + "";
            tbPreSum.Text = preMoneySum + "";
            tbRunSum.Text = runMoneySum + "";
            tbDisSum.Text = disMoneySum + "";
        }
Beispiel #2
0
        private void InitBaseInfo()
        {
            ShiftInfoService service = new ShiftInfoService();
            tbLastShiftTime.Text = service.GetLastShiftTime(0);
            tbUserName.Text = App.userName;

            BillInfoService bService = new BillInfoService();
            List<BillInfo> bills = bService.GetBillInfosByTime(tbLastShiftTime.Text, tbTime.Text);

            float shMoneySum = 0.0f;
            float SHcashSum = 0.0f;
            float SHvesaSum = 0.0f;
            float preMoneySum = 0.0f;
            float disMoneySum = 0.0f;
            float runMoneySum = 0.0f;
            foreach (BillInfo b in bills)
            {

                // 2 挂账
                if (b.status == 2)
                {
                    runMoneySum += b.billMoney;
                }
                else
                {
                    shMoneySum += b.SHmoney;
                    SHcashSum += b.SHcash;
                    SHvesaSum += b.SHvesa;
                    preMoneySum += b.preMoney;
                    disMoneySum += b.disMoney;

                }
            }

            tbBillCount.Text = bills.Count + "";
            tbTurnover.Text = shMoneySum + "";
            tbCashSum.Text = SHcashSum + "";
            tbVesaSum.Text = SHvesaSum + "";
            tbPreSum.Text = preMoneySum + "";
            tbRunSum.Text = runMoneySum + "";
            tbDisSum.Text = disMoneySum + "";
        }