protected void Page_Load(object sender, EventArgs e)
    {
        // Declare and instantiate the AppointmentRetriever.cs class to get the linq queries inside
        apps = new LinqDataManipulator();

        try
        {
            notCheckedInAppointments = apps.GetNotCheckedInAppointments();
            checkedInAppointments = apps.GetCheckedInAppointments();

            // Make all appointments in the Database Todays date to test the webapp
            apps.MakeAllAppointmentsTodaysDate();

            // Make the appointments IQueryable object
            // the GridView's DataSource and then bind it.
            AppointmentsGridView.DataSource = notCheckedInAppointments;
            CheckedInGridView.DataSource = checkedInAppointments;

            AppointmentsGridView.DataBind();
            CheckedInGridView.DataBind();
        }
        catch (Exception)
        {

            throw;
        }
    }
    /// <summary>
    /// Get the appointmentId from the row that was clicked
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void AppointmentsGridView_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        LinqDataManipulator apps = new LinqDataManipulator();

        Notifier textDoctor;

        try
        {
            GridViewRow gvr = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);

            int RowIndex = gvr.RowIndex;

            appointmentId = Convert.ToInt32(gvr.Cells[1].Text);

            apps.UpdateAppointments(appointmentId);

            // Text the Doctor about the upcoming appointment
            doctorText = apps.CreateText(appointmentId);
            textDoctor = new Notifier(doctorText);

            Page_Load(sender, e);
        }
        catch (Exception)
        {

            throw;
        }
    }
Пример #3
0
    /// <summary>
    /// Get the appointmentId from the row that was clicked
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void AppointmentsGridView_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        LinqDataManipulator apps = new LinqDataManipulator();

        Notifier textDoctor;

        try
        {
            GridViewRow gvr = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);

            int RowIndex = gvr.RowIndex;

            appointmentId = Convert.ToInt32(gvr.Cells[1].Text);

            apps.UpdateAppointments(appointmentId);

            // Text the Doctor about the upcoming appointment
            doctorText = apps.CreateText(appointmentId);
            textDoctor = new Notifier(doctorText);

            Page_Load(sender, e);
        }
        catch (Exception)
        {
            throw;
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Declare and instantiate the AppointmentRetriever.cs class to get the linq queries inside
        apps = new LinqDataManipulator();

        try
        {
            notCheckedInAppointments = apps.GetNotCheckedInAppointments();
            checkedInAppointments    = apps.GetCheckedInAppointments();

            // Make all appointments in the Database Todays date to test the webapp
            apps.MakeAllAppointmentsTodaysDate();

            // Make the appointments IQueryable object
            // the GridView's DataSource and then bind it.
            AppointmentsGridView.DataSource = notCheckedInAppointments;
            CheckedInGridView.DataSource    = checkedInAppointments;

            AppointmentsGridView.DataBind();
            CheckedInGridView.DataBind();
        }
        catch (Exception)
        {
            throw;
        }
    }
Пример #5
0
    protected void ResetValuesButton_Click(object sender, EventArgs e)
    {
        LinqDataManipulator apps = new LinqDataManipulator();

        apps.UncheckInPatients();

        Page_Load(sender, e);
    }
    protected void ResetValuesButton_Click(object sender, EventArgs e)
    {
        LinqDataManipulator apps = new LinqDataManipulator();

        apps.UncheckInPatients();

        Page_Load(sender, e);
    }