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(); } }
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(); }