Exemple #1
0
        /// <summary>
        /// 初始化新订单
        /// </summary>
        public void initNewOrder()
        {
            Dictionary <string, object> row = new Dictionary <string, object>();

            row["shopcode"]  = SystemInfo.getConfig(SystemInfo.SHOP_CODE);
            row["cashier"]   = SystemInfo.getConfig(SystemInfo.CASHIER_CODE);
            row["count"]     = 100;
            row["poscode"]   = SystemInfo.getConfig(SystemInfo.POS_CODE);
            row["amount"]    = 0.0;
            row["count"]     = 0;
            row["disamount"] = 0;


            DataRow  dr  = orderService.createOrder(row);
            DateTime now = DateTime.Now;

            view.dateLabel.Text           = now.ToLongDateString().ToString();
            view.orderCodeLabel.Text      = dr["ordercode"].ToString();
            view.shopCodeLabel.Text       = SystemInfo.getConfig(SystemInfo.SHOP_CODE).ToString();
            view.cashierLabel.Text        = SystemInfo.getConfig(SystemInfo.CASHIER_NAME).ToString();
            view.dataGridView1.DataSource = null;
            SystemInfo.CurrentOrderId     = dr["orderid"].ToString();
            SystemInfo.CurrentOrderCode   = dr["ordercode"].ToString();
        }