Esempio n. 1
0
 private void DeleteInfo()
 {
     if ((Interactive.LInfoWarning("Are you sure you want to Delete ?", "Enrollment") == DialogResult.Yes))
     {
         myE = new EnrollmentInfo();
         EnrollmentInfo.RegNo = lblRegNo.Text.Trim();
         if (myE.RemoveEnrollment())
         {
             Load500Enrollments();
         }
         return;
     }
 }
Esempio n. 2
0
 private void LiveDeleteInfo()
 {
     if ((Interactive.LInfoWarning("Are you sure you want to Delete ?", "") == DialogResult.Yes))
     {
         myR        = new RoleInfo();
         myR.RoleID = lblID.Text.Trim();
         if (myR.Remove())
         {
             Interactive.LInfo("Information deleted successfully", "");
             LiveLoad();
         }
         return;
     }
 }
Esempio n. 3
0
 private void DeleteInfo()
 {
     if ((Interactive.LInfoWarning("Are you sure you want to Delete ?", "Appointment") == DialogResult.Yes))
     {
         myA = new AppointmentInfo();
         AppointmentInfo.AppointmentID = Convert.ToInt64(lblAppointmentID.Text);
         if (myA.RemoveAppointment())
         {
             LoadHistory();
             LiveClear();
         }
         return;
     }
 }
Esempio n. 4
0
 private void dtpAvialDate_Leave(object sender, EventArgs e)
 {
     if (dtpAvialDate.Checked)
     {
         CheckDate(dtpAvialDate);
         if (!CheckTheDate)
         {
             if ((Interactive.LInfoWarning("Would you like to check for next available date ?", "Appointment date is not avilable") == DialogResult.Yes))
             {
                 ConfirmDate(dtpAvialDate);
             }
         }
     }
 }
Esempio n. 5
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (dtpAvialDate.Checked)
            {
                TimeSpan tscheck  = dtpAvialDate.Value.Date - dtpVisitDate.Value.Date;
                TimeSpan tscheck2 = DateTime.Today - dtpVisitDate.Value.Date;
                if ((tscheck.Days < 0) || (tscheck2.Days < 0))
                {
                    Interactive.LInfoError("Visit date is cannot be greater than Appointment date or todays date", "");
                    {
                        return;
                    }
                }

                CheckDate(dtpAvialDate);
                if (!CheckTheDate)
                {
                    if ((Interactive.LInfoWarning("Would you like to check for next available date ?", "Appointment date is not avilable") == DialogResult.Yes))
                    {
                        ConfirmDate(dtpAvialDate);
                    }
                }
                TimeSpan ts = dtpAvialDate.Value.Date - DateTime.Today;
                if (ts.Days > 90)
                {
                    if ((Interactive.LInfoWarning("Would you like to change ?", "Appointment date is more than 3 months") == DialogResult.Yes))
                    {
                        return;
                    }
                }
            }


            this.Cursor = Cursors.WaitCursor;
            SaveInfo();
            this.Cursor = Cursors.Default;
        }