protected void PrescriptionDetailsFormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // display the result alert
        e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Prescription updated successfully!", e.Exception);
    }
    protected void LabOrderDetailInfoFormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // set the result alert
        e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Lab Order Detail updated successfully!", e.Exception);
    }
    protected void AllDrugGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // display the result alert
        e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Drug deleted successfully!", e.Exception);
    }
    protected void InsertButton_Click(object sender, EventArgs e)
    {
        var patientName        = ((TextBox)AddPatientFormView.FindControl("NameTextBox")).Text;
        var patientGender      = ((DropDownList)AddPatientFormView.FindControl("GenderDropdownList")).SelectedValue;
        var patientAddress     = ((TextBox)AddPatientFormView.FindControl("AddressTextbox")).Text;
        var patientDateOfBirth =
            ((TemplateControls_DatePicker)AddPatientFormView.FindControl("DateOfBirthDatePicker")).SelectedDate;

        System.Collections.Specialized.ListDictionary dic = new System.Collections.Specialized.ListDictionary();
        dic.Add("Name", patientName);
        dic.Add("Gender", patientGender);
        dic.Add("Address", patientAddress);
        dic.Add("DateOfBirth", patientDateOfBirth);


        if (AddPatientDataSource.Insert(dic) == 0)
        {
            //fail
            ResultAlert.SetResultAlert("An error occured!",
                                       TemplateControls_ResultAlert.AlertTypeError);
        }
        else
        {
            // success
            ResultAlert.SetResultAlert("Patient inserted successfully!",
                                       TemplateControls_ResultAlert.AlertTypeSuccess);
            ClearForm();
        }
    }
    protected void AllMedicalServiceGroupsGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // set the result alert
        e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Medical Service Group deleted successfully!",
                                                              e.Exception);
    }
    protected void PrescriptionFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
    {
        // rebind the data for the prescription detail grid view
        PrescriptionDetailsGridView.DataBind();

        // display the result alert
        e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Prescription deleted successfully!", e.Exception);
    }
Ejemplo n.º 7
0
 protected void ICDDetailsFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         Session[RedirectSuccessConstants.RedirectSuccessDeleteICD] = "yes";
         Response.Redirect("/UserAccess/ICDs/ViewAllICD.aspx");
     }
     else
     {
         e.ExceptionHandled = ResultAlert.SetResultAlertReturn("ICD deleted successfully!", e.Exception);
     }
 }
Ejemplo n.º 8
0
 protected void HospitalDetailsFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         Session[RedirectSuccessConstants.RedirectSuccessDeleteHospital] = "yes";
         Response.Redirect("/UserAccess/Hospitals/ViewAllHospitals.aspx");
     }
     else
     {
         e.ExceptionHandled = ResultAlert.SetResultAlertReturn("error", e.Exception);
     }
 }
 protected void VisitDetailsFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         Session[RedirectSuccessConstants.RedirectSuccessDeleteVisit] = "yes";
         Response.Redirect("/UserAccess/Visits/ViewVisitsFromPatient.aspx?PatientID=" + PatientID);
     }
     else
     {
         // print the result alert
         e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Visit deleted successfully!", e.Exception);
     }
 }
 protected void PrescriptionDetailsFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
 {
     // redirect to the view visit detail page
     if (e.Exception == null)
     {
         Session[RedirectSuccessConstants.RedirectSuccessDeletePrescription] = "yes";
         Response.Redirect("/UserAccess/Visits/ViewVisitDetails.aspx?ID=" + VisitID.ToString());
     }
     else
     {
         // display the result alert
         e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Prescription deleted successfully!", e.Exception);
     }
 }
Ejemplo n.º 11
0
 protected void AllICDChaptersGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     if (e.Exception == null)
     {
         ResultAlert.SetResultAlert("ICD Chapter deleted successfully!",
                                    TemplateControls_ResultAlert.AlertTypeSuccess);
     }
     else
     {
         ResultAlert.SetResultAlert(e.Exception.Message,
                                    TemplateControls_ResultAlert.AlertTypeError);
         e.ExceptionHandled = true;
     }
 }
    protected void MedicalServiceDetailsFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        if (e.Exception == null)
        {
            Session[RedirectSuccessConstants.RedirectSuccessDeleteMedicalService] = "yes";
            Response.Redirect("/UserAccess/MedicalServices/ViewAllMedicalServices.aspx");
        }
        else
        {
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("error", e.Exception);
        }
    }
Ejemplo n.º 13
0
    protected void DrugDetailsFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        if (e.Exception == null)
        {
            Session[RedirectSuccessConstants.RedirectSuccessDeleteDrug] = "yes";
            Response.Redirect("/UserAccess/Drugs/ViewAllDrugs.aspx");
        }
        else
        {
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("ICD deleted successfully!", e.Exception);
        }
    }
 protected void AddPatientFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     // redirect to view patient detail if successful
     if (e.Exception == null)
     {
         Session[RedirectSuccessConstants.RedirectSuccessAddPatient] = "yes";
         Response.Redirect("/UserAccess/Patients/ViewPatientDetails.aspx?ID=" + InsertedPatient.ID);
     }
     else
     {
         // display the result alert
         e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Patient inserted successfully!", e.Exception);
     }
 }
    protected void PrescriptionDetailInfoFormView_ItemDeleted(object sender, FormViewDeletedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        if (e.Exception == null)
        {
            Session[RedirectSuccessConstants.RedirectSuccessDeletePrescriptionDetail] = "yes";
            Response.Redirect("/UserAccess/Visits/ViewVisitDetails.aspx?ID=" + VisitID.ToString());
        }
        else
        {
            // print the result alert
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("error", e.Exception);
        }
    }
Ejemplo n.º 16
0
 protected void AddNewICDChapterFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
 {
     System.Threading.Thread.Sleep(1000);
     if (e.Exception == null)
     {
         Session[RedirectSuccessConstants.RedirectSuccessAddICDChapter] = "yes";
         Response.Redirect("/UserAccess/ICDs/ViewAllICDChapters.aspx");
     }
     else
     {
         ResultAlert.SetResultAlert(e.Exception.Message,
                                    TemplateControls_ResultAlert.AlertTypeError);
         e.ExceptionHandled = true;
     }
 }
Ejemplo n.º 17
0
 protected void HospitalDetailsFormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
 {
     System.Threading.Thread.Sleep(1000);
     if (e.Exception == null)
     {
         ResultAlert.SetResultAlert("Hospital updated successfully!",
                                    TemplateControls_ResultAlert.AlertTypeSuccess);
     }
     else
     {
         ResultAlert.SetResultAlert(e.Exception.Message,
                                    TemplateControls_ResultAlert.AlertTypeError);
         e.ExceptionHandled = true;
     }
 }
    protected void AddNewDrugGroupFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        if (e.Exception == null)
        {
            Session[RedirectSuccessConstants.RedirectSuccessAddDrugGroup] = "yes";
            Response.Redirect("/UserAccess/Drugs/ViewAllDrugGroups.aspx");
        }
        else
        {
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Drug Group inserted successfully!", e.Exception);
        }

        // display the result alert
    }
Ejemplo n.º 19
0
    protected void AddLabOrderDetailFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // redirect if successfull
        if (e.Exception == null)
        {
            Session[RedirectSuccessConstants.RedirectSuccessAddLabOrderDetail] = "yes";
            var visit = new DataClassesDataContext().Visits.Where(v => v.LabOrders.First().ID == long.Parse(Request.QueryString["LabOrderID"])).First();
            Response.Redirect("/UserAccess/Visits/ViewVisitDetails.aspx?ID=" + visit.ID.ToString());
        }
        else
        {
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("error", e.Exception);
        }
    }
Ejemplo n.º 20
0
    protected void AddNewDrugFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // redirect to view patient detail if successful
        if (e.Exception == null)
        {
            Session[RedirectSuccessConstants.RedirectSuccessAddDrug] = "yes";
            Response.Redirect("/UserAccess/Drugs/ViewDrugDetails.aspx?ID=" + insertedDrug.ID);
        }
        else
        {
            // display the result alert
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Drug inserted successfully!", e.Exception);
        }
    }
    protected void AddVisitFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // redirect if success
        if (e.Exception == null)
        {
            Session[RedirectSuccessConstants.RedirectSuccessAddVisit] = "yes";
            Response.Redirect("ViewVisitsFromPatient.aspx?PatientID=" + Request.QueryString["PatientID"]);
        }
        else
        {
            // print the result alert
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Visit inserted successfully!", e.Exception);
        }
    }
Ejemplo n.º 22
0
    protected void AddPrescriptionFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        if (e.Exception != null)
        {
            // print the exception
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Prescription inserted successfully!", e.Exception);
        }
        else
        {
            // redirect to view visit details page
            Session[RedirectSuccessConstants.RedirectSuccessAddNewPrescription] = "yes";
            Response.Redirect("/UserAccess/Visits/ViewVisitDetails.aspx?ID="
                              + Request.QueryString["VisitID"]);
        }
    }
Ejemplo n.º 23
0
    protected void AddLabOrderFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        if (e.Exception == null)
        {
            // set the session value
            Session[RedirectSuccessConstants.RedirectSuccessAddLabOrder] = "yes";

            Response.Redirect("/UserAccess/Visits/ViewVisitDetails.aspx?ID="
                              + Request.QueryString["VisitID"]);
        }
        else
        {
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Lab Order inserted successfully!", e.Exception);
        }
    }
Ejemplo n.º 24
0
    protected void AddPrescriptionDetailFormView_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        // redirect if successful
        if (e.Exception == null)
        {
            // redirect
            Session["RedirectSuccessAddPrescriptionDetail"] = "yes";
            var visit = new DataClassesDataContext().Visits.Where(v => v.Prescriptions.First().ID == long.Parse(Request.QueryString["PrescriptionID"])).First();
            Response.Redirect("/UserAccess/Visits/ViewVisitDetails.aspx?ID=" + visit.ID.ToString());
        }
        else
        {
            // set the result alert
            e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Prescription Detail inserted successfully!", e.Exception);
        }
    }
Ejemplo n.º 25
0
 protected void AllDrugGroupsGridView_RowUpdated(object sender, GridViewUpdatedEventArgs e)
 {
     System.Threading.Thread.Sleep(1000);
     // set the result alert
     ResultAlert.SetResultAlertReturn("Drug Group updated successfully!", e.Exception);
 }
 protected void VisitDetailsFormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
 {
     e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Visit updated successfully!", e.Exception);
 }
    protected void MedicalServiceDetailsFormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
    {
        System.Threading.Thread.Sleep(1000);

        e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Medical Service updated successfully!", e.Exception);
    }
Ejemplo n.º 28
0
 protected void ICDDetailsFormView_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
 {
     // display the result alert
     e.ExceptionHandled = ResultAlert.SetResultAlertReturn("ICD updated successfully!", e.Exception);
 }
 protected void AllMedicalServicesGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Medical Service deleted successfully!", e.Exception);
 }
Ejemplo n.º 30
0
 protected void VisitsFromPatientGridView_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     e.ExceptionHandled = ResultAlert.SetResultAlertReturn("Visit deleted successfully", e.Exception);
 }