Exemplo n.º 1
0
        private async void btn_Cash_Click(object sender, RoutedEventArgs e)
        {
            string time = DateTime.Now.ToString("yy/MM/dd HH:mm:ss");

            Db_salesearch.InsertSaleSearch(new SaleSearch(Convert.ToInt32(tb_Receive.Text), Convert.ToInt32(tb_Receive.Text), 0, POS_main.managerID, time));
            foreach (Sale sale in DB_SaleList)
            {
                Db_salehistory.InsertSaleHistory(new SaleHistory(sale, time));
            }
            totalDiscount += Convert.ToInt32(tb_Discount.Text);
            POS_Sale_DeleteAllSale();
            POS_Sale_LV_Refresh();
            MessageDialog md = new MessageDialog("결제가 완료되었습니다.");
            await md.ShowAsync();
        }
Exemplo n.º 2
0
        private async void btn_Payment_Click(object sender, RoutedEventArgs e)
        {
            MessageDialog md;

            if (AllSaleList.Count > 0)
            {
                md = new MessageDialog("왼쪽 리스트 상품들의 결제 방식을 선택해주세요.");
                await md.ShowAsync();

                return;
            }

            string time = DateTime.Now.ToString("yy/MM/dd HH:mm:ss");

            Db_salesearch.InsertSaleSearch(new SaleSearch(cash + card, cash, card, POS_main.managerID, time));

            foreach (Sale sale in CashSaleList)
            {
                Db_salehistory.InsertSaleHistory(new SaleHistory(sale, time));
            }
            foreach (Sale sale in CardSaleList)
            {
                Db_salehistory.InsertSaleHistory(new SaleHistory(sale, time));
            }

            CashSaleList.Clear();
            CardSaleList.Clear();

            POS_compound_Refresh();
            md = new MessageDialog("결제가 완료되었습니다.");
            await md.ShowAsync();
        }