protected void Page_Init(object sender, EventArgs e) { ctx = new AriClinicContext("AriClinicContext"); // security control, it must be a user logged if (Session["User"] == null) { Response.Redirect("Default.aspx"); } else { user = CntAriCli.GetUser((Session["User"] as User).UserId, ctx); user = CntAriCli.GetUser(user.UserId, ctx); Process proc = (from p in ctx.Processes where p.Code == "apptype" select p).FirstOrDefault <Process>(); per = CntAriCli.GetPermission(user.UserGroup, proc, ctx); btnAccept.Visible = per.Modify; } if (Request.QueryString["AppointmentTypeId"] != null) { appTypeId = int.Parse(Request.QueryString["AppointmentTypeId"]); apptype = CntAriCli.GetAppointmentType(appTypeId, ctx); } LoadData(apptype); }
protected void rdcAppointmentType_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) { if (rdcAppointmentType.SelectedValue != "") { AppointmentType apptype = CntAriCli.GetAppointmentType(int.Parse(rdcAppointmentType.SelectedValue), ctx); TimeCalculation(apptype); } }
protected void rddtBeginDateTime_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e) { // We check if an appointment type is selected if (rdcAppointmentType.SelectedValue != "") { AppointmentType apptype = CntAriCli.GetAppointmentType(int.Parse(rdcAppointmentType.SelectedValue), ctx); if (apptype != null) { TimeCalculation(apptype); } } }
protected void UnloadData(OphthalmologicVisit oVisit) { oVisit.Patient = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx); oVisit.VisitDate = (DateTime)rdpVisitDate.SelectedDate; oVisit.Professional = CntAriCli.GetProfessional(int.Parse(rdcProfessional.SelectedValue), ctx); if (rdcVisitReason.SelectedValue != "") { oVisit.VisitReason = CntAriCli.GetVisitReason(int.Parse(rdcVisitReason.SelectedValue), ctx); } if (rdcAppointmentType.SelectedValue != "") { oVisit.AppointmentType = CntAriCli.GetAppointmentType(int.Parse(rdcAppointmentType.SelectedValue), ctx); } oVisit.DiagnosticDetails = txtDiagnosticDetails.Text; oVisit.Comments = txtComments.Text; oVisit.VType = "ophvisit"; }
protected void UnloadData(BaseVisit visit) { visit.Patient = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx); visit.VisitDate = (DateTime)rdpVisitDate.SelectedDate; if (newVisit) { visit.Patient.LastUpdate = visit.VisitDate; } visit.Professional = CntAriCli.GetProfessional(int.Parse(rdcProfessional.SelectedValue), ctx); if (rdcVisitReason.SelectedValue != "") { visit.VisitReason = CntAriCli.GetVisitReason(int.Parse(rdcVisitReason.SelectedValue), ctx); } if (rdcAppointmentType.SelectedValue != "") { visit.AppointmentType = CntAriCli.GetAppointmentType(int.Parse(rdcAppointmentType.SelectedValue), ctx); } visit.Comments = txtComments.Text; visit.VType = "general"; }
protected void UnloadData(AppointmentInfo app) { app.Patient = CntAriCli.GetPatient(int.Parse(rdcPatient.SelectedValue), ctx); app.Diary = CntAriCli.GetDiary(int.Parse(rdcDiary.SelectedValue), ctx); app.Professional = CntAriCli.GetProfessional(int.Parse(rdcProfessional.SelectedValue), ctx); app.AppointmentType = CntAriCli.GetAppointmentType(int.Parse(rdcAppointmentType.SelectedValue), ctx); app.BeginDateTime = (DateTime)rddtBeginDateTime.SelectedDate; app.EndDateTime = (DateTime)rddtEndDateTime.SelectedDate; app.Duration = int.Parse(txtDuration.Text); app.Status = ddlStatus.SelectedValue; if (rddtArrival.SelectedDate != null) { app.Arrival = (DateTime)rddtArrival.SelectedDate; } else { app.Arrival = DateTime.Parse("01/01/0001 00:00:00"); } app.Subject = CntAriCli.GetAppointmentSubject(app); app.Comments = txtComments.Text; }