Пример #1
0
 private void btnEditQuotation_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.SelectedQuotationID == 0)
         {
             MessageBox.Show("Select a valid SalesQuotation for Editing", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         frmSalesQuotation frm = new frmSalesQuotation(this.SelectedQuotationID);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateSalesQuotations();
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "pageSalesQuotation::btnEditQuotation_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
 private void btnAddNewQuotation_Click(object sender, EventArgs e)
 {
     try
     {
         frmSalesQuotation frm = new frmSalesQuotation();
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateSalesQuotations();
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "pageSalesQuotation::btnAddNewQuotation_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }