Beispiel #1
0
    protected void LoadPacketMenus()
    {
        if (!string.IsNullOrEmpty(ddlDiseaseProfile.SelectedValue))
        {
            int dId = int.Parse(ddlDiseaseProfile.SelectedValue);

            PatientEducationDa peda = new PatientEducationDa();

            // initial consult packets
            DataTable initialConsultDt = new DataTable();
            initialConsultDt = peda.GetPacketsByDiseaseAndVisitType(dId, 1);
            rptInitialConsultPackets.DataSource = initialConsultDt.DefaultView;
            rptInitialConsultPackets.DataBind();

            //rptPostOpVisit packets
            DataTable postOpVisitDt = new DataTable();
            postOpVisitDt             = peda.GetPacketsByDiseaseAndVisitType(dId, 2);
            rptPostOpVisit.DataSource = postOpVisitDt.DefaultView;
            rptPostOpVisit.DataBind();


            // rptDischarge
            DataTable dischargeDt = new DataTable();
            dischargeDt             = peda.GetPacketsByDiseaseAndVisitType(dId, 3);
            rptDischarge.DataSource = dischargeDt.DefaultView;
            rptDischarge.DataBind();

            //
            DataTable followUpDt = new DataTable();
            followUpDt             = peda.GetPacketsByDiseaseAndVisitType(dId, 4);
            rptFollowUp.DataSource = followUpDt.DefaultView;
            rptFollowUp.DataBind();
        }
    }
Beispiel #2
0
    private void LoadPacketDDL()
    {
        DataTable          dt = new DataTable();
        PatientEducationDa da = new PatientEducationDa();

        int diseaseId;
        int visitTypeId;

        if (int.TryParse(ddlDiseaseType.SelectedValue, out diseaseId) && int.TryParse(ddlVisitType.SelectedValue, out visitTypeId))
        {
            dt = da.GetPacketsByDiseaseAndVisitType(diseaseId, visitTypeId);
            this.ddlPacketName.DataTextField  = PatientEdPacket.PacketName;
            this.ddlPacketName.DataValueField = PatientEdPacket.PacketId;
            this.ddlPacketName.DataSource     = dt.DefaultView;


            this.ddlPacketName.DataBind();

            if (dt.Rows.Count > 0)
            {
                this.ddlPacketName.Items.Insert(1, ADDNEW);
                txtPacketName.Visible = false;
                //BtnDeletePacket.Visible = false;
            }
            else
            {
                this.ddlPacketName.Items.Insert(0, ADDNEW);
                txtPacketName.Visible = true;
                //BtnDeletePacket.Visible = false;
            }
        }
    }