Ejemplo n.º 1
0
 private void btnSubOne_Click(object sender, EventArgs e)
 {
     if (cmbActive.Text == "Register" && mainRegister != null)
     {
         mainRegister.Sub();
         GlobalMethods.AddMessageToTextbox(mainRegister.GetLastMessage(), txtMessages);
     }
     else if (cmbActive.Text == "Diagnose" && mainDiagnose != null)
     {
         mainDiagnose.Sub();
         GlobalMethods.AddMessageToTextbox(mainDiagnose.GetLastMessage(), txtMessages);
     }
 }
Ejemplo n.º 2
0
 private void btnCreateDiagnosis_Click(object sender, EventArgs e)
 {
     if (mainDiagnose == null)
     {
         mainDiagnose = new Diagnose();
         GlobalMethods.AddValToCombo("Diagnose", cmbActive);
         GlobalMethods.AddMessageToTextbox("Diagnose Create Successfully", txtMessages);
         GlobalMethods.SetLabelTextAndColor(lblDiagnosisStatus);
     }
     else
     {
         GlobalMethods.AddMessageToTextbox("Diagnose is already created.", txtMessages);
     }
 }
Ejemplo n.º 3
0
 private void btnCreateRegister_Click(object sender, EventArgs e)
 {
     if (mainRegister == null)
     {
         mainRegister = new Register();
         GlobalMethods.AddValToCombo("Register", cmbActive);
         GlobalMethods.AddMessageToTextbox("Register Create Successfully", txtMessages);
         GlobalMethods.SetLabelTextAndColor(lblRegisterStatus);
     }
     else
     {
         GlobalMethods.AddMessageToTextbox("Register is already created.", txtMessages);
     }
 }
Ejemplo n.º 4
0
 private void btnLoopToMax_Click(object sender, EventArgs e)
 {
     if (cmbActive.Text == "Register" && mainRegister != null)
     {
         for (int i = mainRegister.GetCounter(); i < mainRegister.GetMaxVal(); i++)
         {
             mainRegister.Add();
             GlobalMethods.AddMessageToTextbox(mainRegister.GetLastMessage(), txtMessages);
         }
     }
     else if (cmbActive.Text == "Diagnose" && mainDiagnose != null)
     {
         for (int i = mainDiagnose.GetCounter(); i < mainDiagnose.GetMaxVal(); i++)
         {
             mainDiagnose.Add();
             GlobalMethods.AddMessageToTextbox(mainDiagnose.GetLastMessage(), txtMessages);
         }
     }
 }