Exemple #1
0
 private void metroButton1_Click(object sender, EventArgs e)
 {
     if (txticContractType.Text != string.Empty && txticServiceName.Text != string.Empty && dmServiceLevel.Text != string.Empty && txticServiceAvailable.Text != string.Empty)
     {
         contract.ContractType        = cmbContractType.Text;
         contract.ServiceName         = txticServiceName.Text;
         contract.ServiceLevel        = dmServiceLevel.Text;
         contract.ServiceAvailability = txticServiceAvailable.Text;
         contract.EquipmentName       = cmbicEquipmentName.Text;
         contract.EquipmentModel      = cmbicEquipmentModel.Text;
         contract.ContractIdentifier  = txtucContractCode.Text;
         if (contract.ManageContractTypeAvailable() == true)
         {
             Message += new Display.myDelegate(Display.Success);
             Message.Invoke();
         }
         else
         {
             Message += new Display.myDelegate(Display.Failure);
             Message.Invoke();
         }
     }
     else
     {
         Message += new Display.myDelegate(Display.Error);
         Message.Invoke();
     }
 }