Example #1
0
 //show deviation
 private void deviationAnzeigenToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.DeviationDataGridView.CurrentRow != null)
     {
         String    deviationRef = this.DeviationDataGridView.CurrentRow.Cells[0].Value.ToString();
         Deviation deviation    = deviationModel.getDeviationWithRef(deviationRef);
         //The user can update the deviation if signature attribut of the deviation has the user name
         if (deviation != null)
         {
             //show Deviation
             SaveDeviation saveDeviation = new SaveDeviation("showDeviation", null, this);
             saveDeviation.showDeviation(deviation);
         }
         else
         {
             MessageBox.Show("Deviation dos not exist!");
         }
     }
     else
     {
         MessageBox.Show("Please Choose a Deviation Before makimg this Action!");
     }
 }
 //Show Deviation
 private void showDeviation_Click(object sender, EventArgs e)
 {
     if (this.DeviationDataGridView.CurrentRow != null)
     {
         String    deviationRef = this.DeviationDataGridView.CurrentRow.Cells[0].Value.ToString();
         Deviation deviation    = deviationModel.getDeviationWithRef(deviationRef);
         //The user can update the deviation if signature attribut of the deviation has the user name
         if (deviation != null)
         {
             //show Deviation
             SaveDeviation saveDeviation = new SaveDeviation("showDeviation", this, null);
             saveDeviation.showDeviation(deviation);
         }
         else
         {
             MessageBox.Show(this.languageModel.getString("deviationNotExist"));
         }
     }
     else
     {
         MessageBox.Show(this.languageModel.getString("chooseDeviation"));
     }
 }
Example #3
0
 //Remind Groups
 private void button4_Click(object sender, EventArgs e)
 {
     if (this.actionType == "newDeviation")
     {
         MessageBox.Show(this.languageModel.getString("alertSaveDeviationFirst"), "Infos", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         Deviation deviation = deviationModel.getDeviationWithRef(this.deviationNO.Text);
         if (deviation != null)
         {
             //send email to Groups that they did not yet approve
             var result = this.emailSender.sentEmailToGroups(deviation);
             if (result == "sent")
             {
                 MessageBox.Show(this.languageModel.getString("emailSent"), "Infos", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
         }
     }
 }