mirror of
https://github.com/stokebob/BealeEngineering.git
synced 2026-03-19 06:37:15 +00:00
Bug fix: disable combo on no record
This commit is contained in:
@@ -78,9 +78,20 @@ namespace BealeEngineering.Accounts
|
||||
private void cmbInvoicePick_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
var invoiceHeader = (Core.Model.Sale.InvoiceHeader)cmbInvoicePick.SelectedItem;
|
||||
txtInvoiceContact.Text = invoiceHeader.ContactName;
|
||||
txtInvoiceNetAmount.Text = (invoiceHeader.InvoiceTotal - invoiceHeader.TaxTotal).ToString("F") + " " + invoiceHeader.CurrencyCode;
|
||||
txtInvoiceStatus.Text = invoiceHeader.Status;
|
||||
if (invoiceHeader != null)
|
||||
{
|
||||
cmbInvoicePick.Enabled = true;
|
||||
txtInvoiceContact.Text = invoiceHeader.ContactName;
|
||||
txtInvoiceNetAmount.Text = (invoiceHeader.InvoiceTotal - invoiceHeader.TaxTotal).ToString("F") + " " + invoiceHeader.CurrencyCode;
|
||||
txtInvoiceStatus.Text = invoiceHeader.Status;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmbInvoicePick.Enabled = false;
|
||||
txtInvoiceContact.Text = "";
|
||||
txtInvoiceNetAmount.Text = "";
|
||||
txtInvoiceStatus.Text = "";
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateInvoiceCombo()
|
||||
|
||||
Reference in New Issue
Block a user