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)
|
private void cmbInvoicePick_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var invoiceHeader = (Core.Model.Sale.InvoiceHeader)cmbInvoicePick.SelectedItem;
|
var invoiceHeader = (Core.Model.Sale.InvoiceHeader)cmbInvoicePick.SelectedItem;
|
||||||
txtInvoiceContact.Text = invoiceHeader.ContactName;
|
if (invoiceHeader != null)
|
||||||
txtInvoiceNetAmount.Text = (invoiceHeader.InvoiceTotal - invoiceHeader.TaxTotal).ToString("F") + " " + invoiceHeader.CurrencyCode;
|
{
|
||||||
txtInvoiceStatus.Text = invoiceHeader.Status;
|
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()
|
private void UpdateInvoiceCombo()
|
||||||
|
|||||||
Reference in New Issue
Block a user