Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ClearForm();
        }

        // set the alert
        var dic = new Dictionary <string, string>();

        dic.Add(RedirectConstants.RedirectVisitDetailsSessionName,
                "You need to select a Visit to view its details");
        dic.Add(RedirectConstants.RedirectAddNewPrescriptionSessionName,
                "You need to view a Visit details to add new Prescription");
        dic.Add(RedirectConstants.RedirectAddNewPrescriptionExistSessionName,
                "You need to select a Visit details with no Prescription");
        dic.Add(RedirectConstants.RedirectAddPrescriptionDetailSessionName,
                "You need to view a Visit details to add Prescription Detail");
        dic.Add(RedirectConstants.RedirectPrescriptionDetailsSessionName,
                "You need to select a Visit details to view Prescription Info");
        dic.Add(RedirectConstants.RedirectPrescriptionDetailInfoSessionName,
                "You need to select a Visit details to view Prescription Details Info");
        dic.Add(RedirectConstants.RedirectAddLabOrderSessionName,
                "You need to view a Visit details to add new Lab Order");
        dic.Add(RedirectConstants.RedirectViewLabOrderSessionName,
                "You need to select a Visit details to view Lab Order Info");
        dic.Add(RedirectConstants.RedirectAddLabOrderDetailSessionName,
                "You need to view a Visit details to add Lab Order Detail");
        dic.Add(RedirectConstants.RedirectLabOrderInfoSessionName,
                "You need to select a Visit details to view Lab Order Details Info");
        RedirectAlert.SetAlert(dic);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // redirect if no query string found
        if (Request.QueryString["ID"] == null)
        {
            RedirectToViewAllVisits();
        }
        else
        {
            long temp;
            // redirect if cannot parse
            if (long.TryParse(Request.QueryString["ID"], out temp))
            {
                var visits = new DataClassesDataContext().Visits.Where(v => v.ID == long.Parse(Request.QueryString["ID"]));
                // redirect if ID not found
                if (visits.Count() == 0)
                {
                    RedirectToViewAllVisits();
                }
                else
                {
                    // OK, store the patient ID for later redirect
                    PatientID = visits.First().PatientID;
                }
            }
            else
            {
                RedirectToViewAllVisits();
            }
        }

        Dictionary <string, string> successDictionary = new Dictionary <string, string>();

        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddNewPrescription,
                              "Prescription inserted successfully!");
        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddPrescriptionDetail,
                              "Prescription Detail inserted successfully!");
        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeletePrescription,
                              "Prescription deleted successfully!");
        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeletePrescriptionDetail,
                              "Prescription Detail deleted successfully!");
        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddLabOrder,
                              "Lab Order inserted successfully!");
        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessAddLabOrderDetail,
                              "Lab Order Detail inserted successfuly!");
        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeleteLabOrderDetail,
                              "Lab Order Detail deleted successfully!");
        successDictionary.Add(RedirectSuccessConstants.RedirectSuccessDeleteLabOrder,
                              "Lab Order deleted successfully!");
        RedirectSuccessAlert.SetAlert(successDictionary);

        Dictionary <string, string> infoDictionary = new Dictionary <string, string>();

        infoDictionary.Add(RedirectConstants.RedirectVisitDetailAddLabOrderDetailSessionName,
                           "You need to add Lab Order before adding Lab Order Detail");
        infoDictionary.Add(RedirectConstants.RedirectVisitDetailAddPrescriptionDetailSessionName,
                           "You need to add Prescription before adding Prescription Detail");
        RedirectAlert.SetAlert(infoDictionary);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // set the redirect alert
        RedirectAlert.SetAlert("You need to select a Drug to view its details",
                               RedirectConstants.RedirectDrugDetailsSessionName);

        // set the redirect success alert
        RedirectSuccessAlert.SetAlert("Drug deleted successfully",
                                      RedirectSuccessConstants.RedirectSuccessDeleteDrug);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // display the redirect alert
        var redirectMessage = new Dictionary <string, string>();

        redirectMessage.Add(RedirectConstants.RedirectHospitalDetailsSessionName,
                            "You need to select a Hospital to view details");
        RedirectAlert.SetAlert(redirectMessage);

        // display the redirect success alert
        RedirectSuccessAlert.SetAlert("Hospital deleted successfully!",
                                      RedirectSuccessConstants.RedirectSuccessDeleteHospital);
    }
    //protected void BindData()
    //{
    //    var dataContext = new DataClassesDataContext();
    //    var allMedicalServicesQuery =
    //        from m in dataContext.MedicalServices
    //        from mg in dataContext.MedicalServiceGroups
    //        where m.MedicalServiceGroupID == mg.ID
    //        select new
    //        {
    //            ID = m.ID,
    //            Name = m.Name,
    //            Price = m.Price,
    //            MedicalServiceGroupID = m.MedicalServiceGroupID,
    //            MedicalServiceGroupName = mg.Name
    //        };

    //    // bind to the grid view
    //    AllMedicalServicesGridView.DataSource = allMedicalServicesQuery;
    //    AllMedicalServicesGridView.DataBind();
    //}

    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!IsPostBack)
        //{
        //    BindData();
        //}

        // set the redirect alert
        RedirectAlert.SetAlert("You need to select a Medical Service to view its details",
                               RedirectConstants.RedirectMedicalServiceSessionName);

        // set the redirect success alert
        RedirectSuccessAlert.SetAlert("Medical Service deleted successfully",
                                      RedirectSuccessConstants.RedirectSuccessDeleteMedicalService);
    }
Esempio n. 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // display the redirect alert
        var redirectMessage = new Dictionary <string, string>();

        redirectMessage.Add(RedirectConstants.RedirectPatientDetailsSessionName,
                            "You need to select a Patient to view details");
        redirectMessage.Add(RedirectConstants.RedirectVisitFromPatientSessionName,
                            "You need to select a Patient's details to view that Patient's Visits");
        redirectMessage.Add(RedirectConstants.RedirectVisitDetailsSessionName,
                            "You need to select a Patient's details to view that Patient's Visit details");
        redirectMessage.Add(RedirectConstants.RedirectAddNewVisitSessionName,
                            "You need to select a Patient's details to add a new Visit");
        RedirectAlert.SetAlert(redirectMessage);

        // display the redirect success alert
        RedirectSuccessAlert.SetAlert("Patient deleted successfully!",
                                      RedirectSuccessConstants.RedirectSuccessDeletePatient);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        // bind the icd chapter dropdownlist
        if (!IsPostBack)
        {
            BindICDChapterDropdownList();

            //if (PreviousPage != null)
            //{
            //    var contentHolder = PreviousPage.Master.FindControl("Content");
            //    GridView ICDChapterGridView = contentHolder.FindControl("AllICDChaptersGridView") as GridView;
            //    var item = (ICDChapter)ICDChapterGridView.SelectedRow.DataItem;
            //    FindICDChapterDropdownList.SelectedValue = AllICDChapterValue;
            //}
        }

        // set the redirect alert
        RedirectAlert.SetAlert("You need to select an ICD to view its details",
                               RedirectConstants.RedirectICDDetailsSessionName);

        // set the redirect success alert
        RedirectSuccessAlert.SetAlert("ICD deleted successfully",
                                      RedirectSuccessConstants.RedirectSuccessDeleteICD);

        // filter criteria for the dropdownlist
        if (FindICDChapterDropdownList.SelectedValue == AllICDChapterValue)
        {
            AllICDDataSource.Where = "Code.Contains(@CodePart) && Name.Contains(@NamePart)";
        }
        else
        {
            AllICDDataSource.Where = "Code.Contains(@CodePart) && Name.Contains(@NamePart) && ICDChapterID == @ICDChapter";
        }

        // AllICDGridView.DataBind();
    }