private void btnAddNewCustomer_Click(object sender, EventArgs e) { frmParty frm = new frmParty(this.SelectedPartyType); if (frm.ShowDialog() == DialogResult.OK) { PopulateParties(); } }
private void btnEditCustomers_Click(object sender, EventArgs e) { try { frmParty frm = new frmParty(this.SelectedPartyID); if (frm.ShowDialog() == DialogResult.OK) { PopulateParties(); } } catch (Exception ex) { string strErr = ex.Message; if (ex.InnerException != null) { strErr += string.Format("\n{0}", ex.InnerException.Message); } MessageBox.Show(strErr, "pageParties::btnEditCustomers_Click", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnAddNewSiteClient_Click(object sender, EventArgs e) { try { frmParty frm = new frmParty("C"); if (frm.ShowDialog() == DialogResult.OK) { PopulateSiteClients(); cboSiteClient.SelectedItem = ((List <SelectListItem>)cboSiteClient.DataSource).Where(x => x.ID == frm.SelectedID).FirstOrDefault(); } } catch (Exception ex) { string errMessage = ex.Message; if (ex.InnerException != null) { errMessage += string.Format("\n{0}", ex.InnerException.Message); } MessageBox.Show(errMessage, "frmAddEditProject::btnAddNewSiteClient_Click", MessageBoxButtons.OK, MessageBoxIcon.Error); } }