public FormAddCustomer(Customer customer) { InitializeComponent(); _customer = customer; _fillForm(); _isNew = false; txtName.Enabled = false; }
private void btnBrowseCustomer_Click(object sender, EventArgs e) { new FormListing(Contract.Customer, x => _customerToInclude = x as Customer).ShowDialog(); if (_customerToInclude != null) { txtCustomerCode.Text = _customerToInclude.Id.ToString(); txtCustomerName.Text = _customerToInclude.Name; } }