Esempio n. 1
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         ADODatabaseService service = new ADODatabaseService();
         Appointment        ap      = service.GetAppointment(txtPatientFirstName.Text, txtPatientLastName.Text, txtDoctorFirstName.Text, txtDoctorLastName.Text);
         if (ap == null)
         {
             lblResult.Text = "Not found";
         }
         else
         {
             txtDate.Text                 = ap.AppointmentDateAndTime.Date.ToShortDateString();
             txtTime.Text                 = ap.AppointmentDateAndTime.TimeOfDay.ToString();
             txtClinicName.Text           = ap.ClinicName;
             txtDoctorFirstName.ReadOnly  = true;
             txtDoctorLastName.ReadOnly   = true;
             txtPatientFirstName.ReadOnly = true;
             txtPatientLastName.ReadOnly  = true;
             txtClinicName.ReadOnly       = true;
         }
     }
     catch (Exception ex)
     {
         lblResult.Text = ex.Message;
     }
 }
Esempio n. 2
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         string             firstName = txtSearchFirstName.Text;
         string             lastName  = txtSearchLastName.Text;
         ADODatabaseService service   = new ADODatabaseService();
         Patient            p         = service.GetPatientInfo(firstName, lastName);
         if (p != null)
         {
             txtInsuranceNo.Text = p.HealthInsuranceNO;
             txtFirstName.Text   = p.FirstName;
             txtLastName.Text    = p.LastName;
             txtPhoneNumber.Text = p.PhoneNumber.ToString();
             txtAddress.Text     = p.Address;
             txtEmail.Text       = p.Email;
             lblMessage.Text     = "";
         }
         else
         {
             txtInsuranceNo.Text = "";
             txtFirstName.Text   = "";
             txtLastName.Text    = "";
             txtPhoneNumber.Text = "";
             txtAddress.Text     = "";
             txtEmail.Text       = "";
             lblMessage.Text     = "Not found";
         }
     }
     catch (Exception ex)
     {
         lblResult.Text = ex.Message;
     }
 }
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         string             firstName = txtSearchFirstName.Text;
         string             lastName  = txtSearchLastName.Text;
         ADODatabaseService service   = new ADODatabaseService();
         Doctor             d         = service.GetDoctorInfo(firstName, lastName);
         if (d != null)
         {
             txtRegistrationNo.Text = d.MedicalRegistrationNO;
             txtFirstName.Text      = d.FirstName;
             txtLastName.Text       = d.LastName;
             txtPhoneNumber.Text    = d.PhoneNumber.ToString();
             txtProfession.Text     = d.HealthProfession;
             txtEmail.Text          = d.Email;
             lblMessage.Text        = "";
         }
         else
         {
             txtRegistrationNo.Text = "";
             txtFirstName.Text      = "";
             txtLastName.Text       = "";
             txtPhoneNumber.Text    = "";
             txtProfession.Text     = "";
             txtEmail.Text          = "";
             lblMessage.Text        = "Not found";
         }
     }
     catch (Exception ex)
     {
         lblResult.Text = ex.Message;
     }
 }
Esempio n. 4
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         ADODatabaseService service = new ADODatabaseService();
         bool success = service.AppointmentBooking(txtPatientFirstName.Text, txtPatientLastName.Text, txtDoctorFirstName.Text, txtDoctorLastName.Text, Convert.ToDateTime(txtDate.Text + " " + txtTime.Text), txtClinicName.Text);
         if (success)
         {
             lblResult.Text = "Save Successfully";
         }
     }
     catch (Exception ex)
     {
         lblResult.Text = ex.Message;
     }
 }
Esempio n. 5
0
 protected void btnReschedule_Click(object sender, EventArgs e)
 {
     try
     {
         ADODatabaseService service = new ADODatabaseService();
         bool success = service.AppointmentReschedule(txtPatientFirstName.Text, txtPatientLastName.Text, txtDoctorFirstName.Text, txtDoctorLastName.Text, Convert.ToDateTime(txtDate.Text + " " + txtTime.Text));
         if (success)
         {
             lblResult.Text = "Updated Successfully";
         }
         else
         {
             lblResult.Text = "Exception Happened";
         }
     }
     catch (Exception ex)
     {
         lblResult.Text = ex.Message;
     }
 }
Esempio n. 6
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         Patient p = new Patient();
         p.HealthInsuranceNO = txtInsuranceNo.Text;
         p.FirstName         = txtFirstName.Text;
         p.LastName          = txtLastName.Text;
         p.PhoneNumber       = Convert.ToInt32(txtPhoneNumber.Text);
         p.Address           = txtAddress.Text;
         p.Email             = txtEmail.Text;
         ADODatabaseService service = new ADODatabaseService();
         if (service.PatientRegistration(p))
         {
             lblResult.Text = "Saved successfully";
         }
     }
     catch (Exception ex)
     {
         lblResult.Text = ex.Message;
     }
 }
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         Doctor d = new Doctor();
         d.MedicalRegistrationNO = txtRegistrationNo.Text;
         d.FirstName             = txtFirstName.Text;
         d.LastName         = txtLastName.Text;
         d.PhoneNumber      = Convert.ToInt32(txtPhoneNumber.Text);
         d.HealthProfession = txtProfession.Text;
         d.Email            = txtEmail.Text;
         ADODatabaseService service = new ADODatabaseService();
         if (service.DoctorRegistration(d))
         {
             lblResult.Text = "Saved successfully";
         }
     }
     catch (Exception ex)
     {
         lblResult.Text = ex.Message;
     }
 }