protected void btnEdit_Click(object sender, EventArgs e) { if (Session["TherapistId"] == null) { UserAlert.Text = "Select a Therapist"; return; } UserAlert.Text = ""; HideMainMenuButtons(); MassageTherapists massageTherapist = new MassageTherapists(Session["TherapistId"].ToString()); AddEditTherapists1.FindTherapist(massageTherapist); }
public void FindTherapist(MassageTherapists person) { TherapistTableManager therapistTableManager = new TherapistTableManager(); MassageTherapists therapist = null; MyTherapistEncryption.SecurityController dataEncryption = new SecurityController(); therapist = therapistTableManager.FindTherapist(person); if (therapist != null) { txtBoxTherapistName.Text = therapist.Name; txtBoxTherapistPassword.Text = therapist.Name; } if (TherapistFound != null) { TherapistFound(this, null); } }
protected void btnPatientCare_Click(object sender, EventArgs e) { DateTime result = DateTime.MinValue; TherapistTableManager therapistTableManager = new TherapistTableManager(); if (txtBoxUserName.Text.Equals("MyTherapist")) { MassageTherapists therapist = new MassageTherapists(txtBoxUserName.Text, txtBoxPassword.Text); MassageTherapists massagePerson = therapistTableManager.FindTherapist(therapist); if (massagePerson != null) { Response.Redirect("~/UserManagement/Therapists.aspx"); } else { lblInformationText.Text = "Invalid Logon"; lblInformationText.ForeColor = System.Drawing.Color.Red; } } else { MassageTherapists therapist = new MassageTherapists(txtBoxUserName.Text, txtBoxPassword.Text); MassageTherapists massagePerson = therapistTableManager.FindTherapist(therapist); if (massagePerson != null) { Session[CommonDefinitions.CommonDefinitions.THERAPIST_NAME] = massagePerson.Name; Session[txtBoxUserName.Text.ToUpper()] = massagePerson.Id; Response.Redirect("~/PatientCare/PatientCare.aspx"); } else { lblInformationText.Text = "Invalid Logon"; lblInformationText.ForeColor = System.Drawing.Color.Red; } } }