Exemple #1
0
 public DialogResult EditServiceCall(DataGridViewRow dr)
 {
     using (var serivceCalls = new ServiceCalls1(dr.Cells["idCallsServices"].Value.ToString(),
                                                 dr.Cells["idCompany_Service_Call"].Value.ToString(),
                                                 dr.Cells["companyName_Service_Call"].Value.ToString(),
                                                 dr.Cells["discriptions"].Value.ToString(),
                                                 dr.Cells["TypePriority"].Value.ToString(),
                                                 dr.Cells["idPriority"].Value.ToString(),
                                                 dr.Cells["status"].Value.ToString())
            )
     {
         IdCallsServices = dr.Cells["idCallsServices"].Value.ToString();
         // serivceCalls.btnAdd.Visible = false;
         // serivceCalls.txtbCompanyNumber.Enabled = false;
         var result = serivceCalls.ShowDialog();
         if (result == DialogResult.Cancel)
         {
             return(result);
         }
         else
         {
             MessageUtils.LogUtils.WriteToLog(" Edit Row Viewing All Customers: " +
                                              dr.Cells["companyName_Service_Call"].Value.ToString());
             MessageUtils.LogUtils.SystemEventLogsInformation(" Edit Row Viewing All Customers: " +
                                                              dr.Cells["companyName_Service_Call"].Value.ToString());
             return(result);
         }
     }
 }
Exemple #2
0
        public DialogResult AddServiceCall()
        {
            const bool isAddServiceCall = false;

            using (ServiceCalls1 serviceCalls = new ServiceCalls1(isAddServiceCall))
            {
                var result = serviceCalls.ShowDialog();
                if (result == DialogResult.Cancel)
                {
                    return(result);
                }
                MessageUtils.LogUtils.WriteToLog(" Add Row Service Calls ");
                MessageUtils.LogUtils.SystemEventLogsInformation(" Add Row Service Calls ");
                return(result);
            }
        }