예제 #1
0
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
    {
        string estado = e.Appointment.Description;
        int    id     = (int)e.Appointment.ID;

        appointment = CntAriCli.GetAppointment(id, ctx);
        //Modificamos la apariencia según el estado
        switch (estado)
        {
        case "0":
            // Citado dejamos el item como está
            e.Appointment.CssClass = "rsCategoryWhite";
            break;

        case "1":
            // Programada
            e.Appointment.CssClass = "rsCategoryBlue";     //rsCategoryRed
            break;

        case "2":
            // Sala de espera
            e.Appointment.CssClass = "rsCategoryPink";     //rsCategoryGreen
            break;

        case "3":
            // Atendido
            e.Appointment.CssClass = "rsCategoryGreen";     //rsCategoryYellow
            break;

        case "4":
            e.Appointment.CssClass = "rsCategoryYellow";
            break;

        case "5":
            // No presentado / Sin hora?
            e.Appointment.CssClass = "rsCategoryOrange";     //rsCategoryBlue
            break;

        default:
            break;
        }
        // now we charge the new description
        e.Appointment.Description = CntAriCli.GetAppointmentDescription(appointment, ctx);
    }
예제 #2
0
    protected void LoadData(AppointmentInfo app)
    {
        LoadStatusCombo(app);
        if (professional != null)
        {
            LoadProfessionalCombo(professional);
        }
        if (app == null)
        {
            return;              // There isn't any agenda to show
        }
        txtAppointmentId.Text = String.Format("{0:00000000}", app.AppointmentId);
        LoadPatientCombo(app.Patient);
        LoadDiaryCombo(app.Diary);
        LoadAppointmentTypeCombo(app.AppointmentType);
        LoadProfessionalCombo(app.Professional);
        rddtBeginDateTime.SelectedDate = app.BeginDateTime;
        rddtEndDateTime.SelectedDate   = app.EndDateTime;
        // arrival could be null in two different ways
        if (app.Arrival != null && !CntAriCli.NullDateTime(app.Arrival))
        {
            rddtArrival.SelectedDate = app.Arrival;
        }
        txtDuration.Text    = app.Duration.ToString();
        txtSubject.Text     = app.Subject;
        txtDescription.Text = CntAriCli.GetAppointmentDescription(app, ctx);
        txtComments.Text    = app.Comments;
        //
        string command = String.Format("return ViewHisAdm({0});", app.Patient.PersonId);

        btnMedicalRecord.OnClientClick = command;
        btnMedicalRecord.Visible       = true;
        //
        if (app != null && app.BaseVisits.Count > 0)
        {
            command = String.Format("return EditVisit({0});", app.BaseVisits[0].VisitId);
        }
        else
        {
            command = String.Format("return CreateVisit({0});", app.AppointmentId);
        }
        btnVisit.OnClientClick = command;
        btnVisit.Visible       = true;
    }