public void LoadPatientAppt() { DateTime dt = DateTime.MinValue; long id = 0; Guid patientGuid = Guid.Empty; PatientAppointment patientAppointmentInformation = new PatientAppointment(); PatientAppointmentInformationTableManager patApptMgr = new PatientAppointmentInformationTableManager(); if ((Session["EditPatientAppt"] != null) && (Session["EditPatientAppt"].ToString() == "true")) { patientAppointmentInformation.ApptId = Guid.Parse(Session[CommonDefinitions.CommonDefinitions.PATIENT_HISTORY_GUID].ToString()); patientAppointmentInformation = patApptMgr.FindPatientAppointment(patientAppointmentInformation); if (!string.IsNullOrEmpty(patientAppointmentInformation.PulseRLU.Trim())) { RLU.SelectedValue = patientAppointmentInformation.PulseRLU.Trim(); } if (!string.IsNullOrEmpty(patientAppointmentInformation.PulseSP.Trim())) { SP.SelectedValue = patientAppointmentInformation.PulseSP.Trim(); } if (!string.IsNullOrEmpty(patientAppointmentInformation.PulseKD1.Trim())) { KD1.SelectedValue = patientAppointmentInformation.PulseKD1.Trim(); } if (!string.IsNullOrEmpty(patientAppointmentInformation.PulseLHT.Trim())) { LHT.SelectedValue = patientAppointmentInformation.PulseLHT.Trim(); } if (!string.IsNullOrEmpty(patientAppointmentInformation.PulseLV.Trim())) { LV.SelectedValue = patientAppointmentInformation.PulseLV.Trim(); } if (!string.IsNullOrEmpty(patientAppointmentInformation.PulseKD2.Trim())) { KD2.SelectedValue = patientAppointmentInformation.PulseKD2.Trim(); } ImageBefore.ImageUrl = patientAppointmentInformation.ImageBeforeTherapy; ImageAfter.ImageUrl = patientAppointmentInformation.ImageAfterTherapy; txtBoxTherapyPerformed.Text = patientAppointmentInformation.OilsAndTherapy; txtBoxSessionGoals.Text = patientAppointmentInformation.SessionGoals; } }
public void SaveAppt() { PatientAppointment patientAppointmentInformation = new PatientAppointment(); PatientAppointmentInformationTableManager patApptMgr = new PatientAppointmentInformationTableManager(); patientAppointmentInformation.ApptId = Guid.Empty; if (Session[CommonDefinitions.CommonDefinitions.PATIENT_HISTORY_GUID] != null) { patientAppointmentInformation.ApptId = Guid.Parse(Session[CommonDefinitions.CommonDefinitions.PATIENT_HISTORY_GUID].ToString()); } patientAppointmentInformation.PatientId = Int32.Parse(Session[CommonDefinitions.CommonDefinitions.PATIENT_ID].ToString()); patientAppointmentInformation.AppointmentDate = DateTime.Parse(Session[CommonDefinitions.CommonDefinitions.PATIENT_APPT_START_DATE_TIME].ToString()); string therapist = Session[CommonDefinitions.CommonDefinitions.THERAPIST_NAME].ToString(); patientAppointmentInformation.TherapistId = Guid.Parse(Session[therapist.ToUpper().ToString()].ToString()); if (Session["UploadImageBefore"] != null) { patientAppointmentInformation.ImageBeforeTherapy = Session["UploadImageBefore"].ToString(); } else { patientAppointmentInformation.ImageBeforeTherapy = ""; } if (Session["UploadImageAfter"] != null) { patientAppointmentInformation.ImageAfterTherapy = Session["UploadImageAfter"].ToString(); } else { patientAppointmentInformation.ImageAfterTherapy = ""; } patientAppointmentInformation.OilsAndTherapy = txtBoxTherapyPerformed.Text; patientAppointmentInformation.SessionGoals = txtBoxSessionGoals.Text; patientAppointmentInformation.PulseKD1 = KD1.Text; patientAppointmentInformation.PulseKD2 = KD2.Text; patientAppointmentInformation.PulseLHT = LHT.Text; patientAppointmentInformation.PulseLV = LV.Text; patientAppointmentInformation.PulseRLU = RLU.Text; patientAppointmentInformation.PulseSP = SP.Text; patApptMgr.Update(patientAppointmentInformation); }