コード例 #1
0
        private void Charge()
        {
            if (listView1.Items.Count == 0)
            {
                return;
            }

            var sale = new Sale();

            sale.SaleDetails = SaleDetails(listView1.Items);

            var customer = customersService.Find(txtTaxID.Text);

            var frmCharge = new frmCharge(this.User, customer, sale, Convert.ToDecimal(txtSubtotal.Text), Convert.ToDecimal(txtDiscount.Text), Convert.ToDecimal(txtTotal.Text));

            frmCharge.ShowDialog();

            if (frmCharge.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                StartNewSale();
            }
            else if (frmCharge.DialogResult == System.Windows.Forms.DialogResult.No)
            {
                frmCharge.Dispose();
            }
        }
コード例 #2
0
ファイル: frmSales.cs プロジェクト: njmube/PoS
        private void Charge()
        {
            if (listView1.Items.Count == 0)
                return;

            var sale = new Sale();
            
            sale.SaleDetails = SaleDetails(listView1.Items);

            var customer = customersService.Find(txtTaxID.Text);

            var frmCharge = new frmCharge(this.User, customer, sale, Convert.ToDecimal(txtSubtotal.Text), Convert.ToDecimal(txtDiscount.Text), Convert.ToDecimal(txtTotal.Text));
            frmCharge.ShowDialog();

            if (frmCharge.DialogResult == System.Windows.Forms.DialogResult.OK)
                StartNewSale();
            else if (frmCharge.DialogResult == System.Windows.Forms.DialogResult.No)
                frmCharge.Dispose();
        }