Esempio n. 1
0
 //close deviation
 private void deviationSchliessenToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.DeviationDataGridView.CurrentRow != null)
     {
         String deviationRef = this.DeviationDataGridView.CurrentRow.Cells[0].Value.ToString();
         if (deviationRef != "" || deviationRef != null)
         {
             if (MessageBox.Show("Close Deviation Means You Will Not Be Able Later To Make Any Change On It, Are You Sure You Wish To Make This Action ?", "Close Deviation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 String result = deviationModel.closeDeviation(deviationRef);
                 if (result == "closed")
                 {
                     MessageBox.Show("The Deviation Was Succesfuly Closed.", "Infos", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 else
                 {
                     MessageBox.Show("Error The Deviation Cloud Not Be Closed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 }
             }
         }
     }
 }
 //close Deviation
 private void closeDeviation_Click(object sender, EventArgs e)
 {
     if (this.DeviationDataGridView.CurrentRow != null)
     {
         String deviationRef = this.DeviationDataGridView.CurrentRow.Cells[0].Value.ToString();
         if (deviationRef != "" || deviationRef != null)
         {
             if (MessageBox.Show(this.languageModel.getString("alertCloseDeviation"), "Close Deviation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 String result = deviationModel.closeDeviation(deviationRef);
                 if (result == "closed")
                 {
                     MessageBox.Show(this.languageModel.getString("deviationWasClosed"), "Infos", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 else
                 {
                     MessageBox.Show(this.languageModel.getString("errorCloseDeviation"), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 }
             }
         }
     }
 }
Esempio n. 3
0
        //Close Deviation
        private void closeDeviation_Click(object sender, EventArgs e)
        {
            String deviationRef = this.deviationNO.Text;

            if (deviationRef != "" || deviationRef != null)
            {
                if (MessageBox.Show(this.languageModel.getString("alertCloseDeviation"), "Close Deviation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    if (deviationModel.closeDeviation(deviationRef) == null)
                    {
                        MessageBox.Show(this.languageModel.getString("deviationNotExist"), "Infos", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
        }