Ejemplo n.º 1
0
 private void insertCustom_Click(object sender, EventArgs e)
 {
     if (conditionService.isExistCondition(gradeTextBox.Text))
     {
         MessageBox.Show("condition already exists", "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         ConditionInsertSdi conditionInsertSdi = new ConditionInsertSdi();
         conditionInsertSdi.Grade   = gradeTextBox.Text;
         conditionInsertSdi.Percent = Convert.ToInt32(percentTextBox.Text);
         Condition condition = conditionService.insertCondition(conditionInsertSdi);
         if (condition != null)
         {
             this.Close();
             conditionForm.addDataToTable(condition);
         }
     }
 }
Ejemplo n.º 2
0
 public bool isExistGradeInCondition(string grade)
 {
     return(conditionService.isExistCondition(grade));
 }