private void btnSearch_Click(object sender, EventArgs e) { int intTemp; switch (((ComboBoxItem)cmbAddressType.SelectedItem).Value) { case CUSTOMERVALUE: frmCustomers objCustomersForm; objCustomersForm = new frmCustomers(txtNo.Text); objCustomersForm.ShowDialog(); if (objCustomersForm.SelectedCustomerAddress != null) { txtNo.Text = objCustomersForm.SelectedCustomerAddress.CustomerNumber; if (int.TryParse(objCustomersForm.SelectedCustomerAddress.CustomerNumber, out intTemp)) { mintCustomerOrVendorNumber = intTemp; } LoadCustomerAddresses(); } break; case VENDORVALUE: frmVendors objVendorsForm; objVendorsForm = new frmVendors(txtNo.Text); objVendorsForm.ShowDialog(); if (objVendorsForm.SelectedVendorAddress != null) { txtNo.Text = objVendorsForm.SelectedVendorAddress.VendorNumber; if (int.TryParse(objVendorsForm.SelectedVendorAddress.VendorNumber, out intTemp)) { mintCustomerOrVendorNumber = intTemp; } LoadVendorAddresses(); } break; } }
private void btnCustomerSearch_Click(object sender, EventArgs e) { frmCustomers objCustomersForm; int intTemp; objCustomersForm = new frmCustomers(txtCustomer.Text); objCustomersForm.ShowDialog(); if (objCustomersForm.SelectedCustomerAddress != null) { txtCustomer.Text = objCustomersForm.SelectedCustomerAddress.CustomerNumber.Trim(); if (int.TryParse(objCustomersForm.SelectedCustomerAddress.CustomerNumber, out intTemp)) mintCustomerNumber = intTemp; LoadCustomerAddresses(); } }
private void btnCustomerSearch_Click(object sender, EventArgs e) { frmCustomers objCustomersForm; int intTemp; objCustomersForm = new frmCustomers(txtCustomer.Text); objCustomersForm.ShowDialog(); if (objCustomersForm.SelectedCustomerAddress != null) { txtCustomer.Text = objCustomersForm.SelectedCustomerAddress.CustomerNumber.Trim(); if (int.TryParse(objCustomersForm.SelectedCustomerAddress.CustomerNumber, out intTemp)) { mintCustomerNumber = intTemp; } LoadCustomerAddresses(); } }
private void btnSearch_Click(object sender, EventArgs e) { int intTemp; switch (((ComboBoxItem)cmbAddressType.SelectedItem).Value) { case CUSTOMERVALUE: frmCustomers objCustomersForm; objCustomersForm = new frmCustomers(txtNo.Text); objCustomersForm.ShowDialog(); if (objCustomersForm.SelectedCustomerAddress != null) { txtNo.Text = objCustomersForm.SelectedCustomerAddress.CustomerNumber; if (int.TryParse(objCustomersForm.SelectedCustomerAddress.CustomerNumber, out intTemp)) mintCustomerOrVendorNumber = intTemp; LoadCustomerAddresses(); } break; case VENDORVALUE: frmVendors objVendorsForm; objVendorsForm = new frmVendors(txtNo.Text); objVendorsForm.ShowDialog(); if (objVendorsForm.SelectedVendorAddress != null) { txtNo.Text = objVendorsForm.SelectedVendorAddress.VendorNumber; if (int.TryParse(objVendorsForm.SelectedVendorAddress.VendorNumber, out intTemp)) mintCustomerOrVendorNumber = intTemp; LoadVendorAddresses(); } break; } }