private void btnAdd_Click(object sender, EventArgs e) { frmAddModifyVendor addModifyVendorForm = new frmAddModifyVendor(); addModifyVendorForm.addVendor = true; DialogResult result = addModifyVendorForm.ShowDialog(); if (result == DialogResult.OK) { vendor = addModifyVendorForm.vendor; txtVendorID.Text = vendor.VendorID.ToString(); this.DisplayVendor(); } }
private void btnAdd_Click(object sender, EventArgs e) { frmAddModifyVendor addModifyVendorForm = new frmAddModifyVendor(); addModifyVendorForm.addVendor = true; DialogResult result = addModifyVendorForm.ShowDialog(); if (result == DialogResult.OK) { selectedVendor = addModifyVendorForm.vendor; txtVendorID.Text = selectedVendor.VendorID.ToString(); this.DisplayVendor(); } }
private void btnModify_Click(object sender, EventArgs e) { frmAddModifyVendor addModifyVendorForm = new frmAddModifyVendor(); addModifyVendorForm.addVendor = false; addModifyVendorForm.vendor = selectedVendor; DialogResult result = addModifyVendorForm.ShowDialog(); if (result == DialogResult.OK || result == DialogResult.Retry) { selectedVendor = addModifyVendorForm.vendor; this.DisplayVendor(); } else if (result == DialogResult.Abort) { txtVendorID.Text = ""; this.ClearControls(); } }
private void btnModify_Click(object sender, EventArgs e) { frmAddModifyVendor addModifyVendorForm = new frmAddModifyVendor(); addModifyVendorForm.addVendor = false; addModifyVendorForm.vendor = vendor; DialogResult result = addModifyVendorForm.ShowDialog(); if (result == DialogResult.OK) { vendor = addModifyVendorForm.vendor; this.DisplayVendor(); } else if (result == DialogResult.Retry) { this.ClearControls(); this.GetVendor(vendor.VendorID); } }