예제 #1
0
        private void btnAddNewCustomer_Click(object sender, EventArgs e)
        {
            frmParty frm = new frmParty(this.SelectedPartyType);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                PopulateParties();
            }
        }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }