Exemplo n.º 1
0
        public StatisticsUC()
        {
            StatisticsVM VM = new StatisticsVM();

            DataContext = VM;
            InitializeComponent();
        }
        private async void Start()
        {
            await Loading.Show();

            StatisticsVM     = new StatisticsVM();
            this.DataContext = StatisticsVM;
            InitializeComponent();
        }
Exemplo n.º 3
0
        public ActionResult Statistics()
        {
            StatisticsVM svm = new StatisticsVM();

            svm.Tasks    = db.Tasks.ToList();
            svm.Students = db.Students.ToList();
            svm.Status   = db.Status.ToList();
            //get task deadline and compare it to status dateSubmitted, count only from completed tasks

            return(View(svm));
        }
Exemplo n.º 4
0
        public IActionResult Index()
        {
            StatisticsVM model = new StatisticsVM();

            model.Title    = "Наша Бригада";
            model.ListData = new List <DataChartVM>
            {
                new DataChartVM
                {
                    Id    = 1,
                    Value = "100",
                    Label = "20 серпня 2019р."
                },
                new DataChartVM
                {
                    Id    = 2,
                    Value = "300",
                    Label = "21 серпня 2019р."
                },
                new DataChartVM
                {
                    Id    = 3,
                    Value = "200",
                    Label = "22 серпня 2019р."
                },
                new DataChartVM
                {
                    Id    = 3,
                    Value = "250",
                    Label = "23 серпня 2019р."
                },
                new DataChartVM
                {
                    Id    = 4,
                    Value = "50",
                    Label = "24 серпня 2019р."
                },
                new DataChartVM
                {
                    Id    = 4,
                    Value = "-20",
                    Label = "25 серпня 2019р."
                },
                new DataChartVM
                {
                    Id    = 4,
                    Value = "400",
                    Label = "26 серпня 2019р."
                },
            };
            return(View(model));
        }
Exemplo n.º 5
0
 public StatisticsCommand(StatisticsVM VM)
 {
     CurrentVM = VM;
 }
Exemplo n.º 6
0
        internal static void printNote(StatisticsVM statisticsVM, DrivePrinter mPrinter)
        {
            if (statisticsVM == null)
            {
                return;
            }
            if (mPrinter == null)
            {
                return;
            }
            if (mPrinter.pageWidth == "small")
            {
                mPrinter.PrintString("             收银对账             \n");
            }
            else
            {
                mPrinter.PrintString("                      收银对账                    \n");
            }
            StringBuilder sb = new StringBuilder();

            if (mPrinter.pageWidth == "small")
            {
                sb.Append("------------------------------\n");
            }
            else
            {
                sb.Append("----------------------------------------------\n");
            }
            sb.Append(Resources.R.branch_name + statisticsVM.branchname + "\n");
            sb.Append(Resources.R.time + DateTime.Now.ToString("D") + "\n");
            sb.Append(Resources.R.date_time + statisticsVM.starttime + "至" + statisticsVM.endtime + "\n");
            sb.Append(Resources.R.shop_cashier_num + statisticsVM.cashiername + "\n");
            sb.Append(Resources.R.ticketnums + statisticsVM.ticketnums + "\n");
            sb.Append(Resources.R.ticketamount + statisticsVM.ticketamount + "\n");
            sb.Append(Resources.R.returnnums + statisticsVM.returnnums + "\n");
            sb.Append(Resources.R.returnamount + statisticsVM.returnamount + "\n");
            sb.Append(Resources.R.rechargeamount + statisticsVM.rechargeamount + "\n");
            sb.Append(Resources.R.subtotal + statisticsVM.subtotal + "\n");
            if (mPrinter.pageWidth == "small")
            {
                sb.Append("------------------------------\n");
            }
            else
            {
                sb.Append("----------------------------------------------\n");
            }
            //mPrinter.PrintString(sb.ToString());

            StringBuilder sbtb = new StringBuilder();

            sbtb.Append(tableFormat(Resources.R.payType, true, 15, false));
            sbtb.Append(tableFormat(Resources.R.mumber, false, 8, false));
            sbtb.Append(tableFormat(Resources.R.money, false, 8, false));
            sbtb.Append("\n");
            sbtb.Append(tableFormat("现金", true, 15, false));
            sbtb.Append(tableFormat(statisticsVM.cashnums, false, 8, true));
            sbtb.Append(tableFormat(statisticsVM.cashamount, false, 8, true));
            sbtb.Append("\n");
            sbtb.Append(tableFormat("支付宝", true, 15, false));
            sbtb.Append(tableFormat(statisticsVM.alinums, false, 8, true));
            sbtb.Append(tableFormat(statisticsVM.aliamount, false, 8, true));
            sbtb.Append("\n");
            sbtb.Append(tableFormat("微信", true, 15, false));
            sbtb.Append(tableFormat(statisticsVM.wxnums, false, 8, true));
            sbtb.Append(tableFormat(statisticsVM.wxamount, false, 8, true));
            sbtb.Append("\n");

            foreach (ZidingyizhifuBean zidingyizhifuBean in statisticsVM.zidingyizhifu)
            {
                sbtb.Append(tableFormat(zidingyizhifuBean.zidingyiname, true, 15, false));
                sbtb.Append(tableFormat(zidingyizhifuBean.zidingyinums, false, 8, true));
                sbtb.Append(tableFormat(zidingyizhifuBean.zidingyiamount, false, 8, true));
                sbtb.Append("\n");
            }
            sbtb.Append(tableFormat("合计", true, 15, false));
            sbtb.Append(tableFormat("", false, 8, true));
            sbtb.Append(tableFormat(statisticsVM.subtotal, false, 8, true));
            sbtb.Append("\\n\\n\\n");
            //驱动打印改为一次性打印
            sb.Append(sbtb);
            mPrinter.PrintString(sb.ToString() + "\\n\\n\\n\\n\\n");
            //mPrinter.PrintString("\n\n\n\n\n");
        }