private void FillDropDownsCTT()
        {
            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();

            DataTable theDT = new DataTable();

            DataSet theDSXML = new DataSet();

            theDSXML.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con"));

            DataView theDV = new DataView(theDSXML.Tables["mst_CouncellingType"]);

            theDV.RowFilter = "DeleteFlag=0";
            theDV.Sort      = "Name asc";
            if (theDV.Table != null)
            {
                theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                BindManager.BindCombo(ddlRegion, theDT, "Name", "ID");
                theDV.Dispose();
                theDT.Clear();
            }

            theDV           = new DataView(theDSXML.Tables["mst_CouncellingTopic"]);
            theDV.RowFilter = "DeleteFlag=0";
            theDV.Sort      = "Name asc";
            if (theDV.Table != null)
            {
                theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);

                BindManager.BindCombo(ddDistrict, theDT, "Name", "ID");
                theDV.Dispose();
                theDT.Clear();
            }
        }
    private void FillDropDownsRD()
    {
        BindFunctions BindManager = new BindFunctions();
        IQCareUtils   theUtils    = new IQCareUtils();

        DataTable theDT = new DataTable();

        //DataSet theDSXML = new DataSet();
        //theDSXML.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con"));
        DataView theDV = new DataView(oCommonData.getAllProvince());

        theDV.Sort = "Name asc";
        //theDV.RowFilter = "DeleteFlag=0";
        if (theDV.Table != null)
        {
            theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(ddlRegion, theDT, "Name", "ID");
            theDV.Dispose();
            theDT.Clear();
        }

        theDV      = new DataView(oCommonData.getAllDistrict());
        theDV.Sort = "Name asc";
        //theDV.RowFilter = "DeleteFlag=0";
        if (theDV.Table != null)
        {
            theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
            //BindManager.BindCheckedList(chkDestict, theDT, "Name", "ID");
            //theDV.Dispose();
            //theDT.Clear();
            BindManager.BindCombo(ddDistrict, theDT, "Name", "ID");
            theDV.Dispose();
            theDT.Clear();
        }
    }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Utility       objUtil    = new Utility();
            string        constr     = objUtil.Decrypt(ConfigurationManager.AppSettings["SQLConnString"]);
            SqlConnection connection = new SqlConnection(constr);

            try
            {
                SqlDataAdapter sqlda = new SqlDataAdapter();
                sqlda.SelectCommand             = new SqlCommand("pr_GetSeverity", connection);
                sqlda.SelectCommand.CommandType = CommandType.StoredProcedure;
                DataSet ds = new DataSet();
                sqlda.Fill(ds);
                DataTable     dtSeverity    = ds.Tables[0];
                DataTable     dtDTComponent = ds.Tables[1];
                BindFunctions theBndMgr     = new BindFunctions();
                theBndMgr.BindCombo(dtSeverity, "Severity", "ID", cmbseverity);
                theBndMgr.BindCombo(dtDTComponent, "component", "ID", cmbcomponent);
            }
            catch (Exception)
            {
                Console.WriteLine("Error: " + e);
            }
            finally
            {
                connection.Close();
            }
        }
Esempio n. 4
0
    private void BindCombo()
    {
        IUser         UserManager = (IUser)ObjectFactory.CreateInstance("BusinessProcess.Security.BUser,BusinessProcess.Security");
        DataTable     theDT       = UserManager.GetFacilityList();
        BindFunctions theBind     = new BindFunctions();

        if (theDT.Rows.Count == 1)
        {
            ddLocation.DataSource     = theDT;
            ddLocation.DataTextField  = "FacilityName";
            ddLocation.DataValueField = "FacilityId";
            ddLocation.DataBind();
        }
        else if (chkPref.Checked == true)
        {
            IQCareUtils theUtils = new IQCareUtils();
            DataView    theDV    = new DataView(theDT);
            theDV.RowFilter = "Preferred = 1";
            theBind.BindCombo(ddLocation, theUtils.CreateTableFromDataView(theDV), "FacilityName", "FacilityId");
            if (ViewState["pwd"] != null)
            {
                txtpassword.Attributes["value"] = ViewState["pwd"].ToString();
            }
        }
        else
        {
            theBind.BindCombo(ddLocation, theDT, "FacilityName", "FacilityId");
            txtpassword.Attributes["value"] = ViewState["pwd"].ToString();
            ViewState["pwd"] = null;
        }
        ViewState["pwd"] = null;
    }
Esempio n. 5
0
    /// <summary>
    ///  Bind Dropdown
    /// </summary>
    private void FillDropDowns()
    {
        BindFunctions BindManager = new BindFunctions();
        IQCareUtils   theUtils    = new IQCareUtils();
        DataTable     theDT       = new DataTable();
        DataSet       theDSXML    = new DataSet();

        theDSXML.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con"));
        DataView theDV = new DataView(theDSXML.Tables["Mst_Decode"]);

        theDV.RowFilter = "DeleteFlag=0 and CodeID=210";
        if (theDV.Table != null)
        {
            theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(ddlSeverity, theDT, "Name", "ID");
            theDV.Dispose();
            theDT.Clear();
        }

        theDV           = new DataView(theDSXML.Tables["Mst_Code"]);
        theDV.RowFilter = "DeleteFlag=0 and CodeID in (207,208,209,211)";
        if (theDV.Table != null)
        {
            theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(ddlAllergyType, theDT, "Name", "CodeID");
            theDV.Dispose();
            theDT.Clear();
        }
    }
Esempio n. 6
0
        private void Init_Form()
        {
            txtcountryno.Attributes.Add("onkeyup", "chkPostiveInteger('" + txtcountryno.ClientID + "')");
            txtcountryno.Attributes.Add("onblur", "chkPostiveInteger('" + txtcountryno.ClientID + "')");

            txtLPTF.Attributes.Add("onkeyup", "chkPostiveInteger('" + txtLPTF.ClientID + "')");
            txtLPTF.Attributes.Add("onblur", "chkPostiveInteger('" + txtLPTF.ClientID + "')");

            txtSatelliteID.Attributes.Add("onkeyup", "chkPostiveInteger('" + txtSatelliteID.ClientID + "')");
            txtSatelliteID.Attributes.Add("onblur", "chkPostiveInteger('" + txtSatelliteID.ClientID + "')");
            txtNationalId.Attributes.Add("onKeyup", "chkNumeric('" + txtNationalId.ClientID + "')");

            txtfacilityname.Text = "";
            // txtcountryno.Text = "";
            txtLPTF.Text              = "";
            txtSatelliteID.Text       = "";
            txtGrace.Text             = "";
            txtPEPFAR_Fund.Text       = "";
            cmbCurrency.SelectedValue = "0";
            if (Session["SystemId"].ToString() == "2")
            {
                paperless.Visible = false;
            }

            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();
            DataSet       theDSXML    = new DataSet();

            theDSXML.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con"));

            DataView  theDV = new DataView();
            DataTable theDT = new DataTable();

            /*******/
            theDV           = new DataView(theDSXML.Tables["Mst_District"]);
            theDV.RowFilter = "DeleteFlag=0 and SystemID= " + Session["SystemId"] + "";
            if (theDV.Table != null)
            {
                theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                BindManager.BindCombo(ddldistrict, theDT, "Name", "ID");
                theDV.Dispose();
                theDT.Clear();
            }

            theDV           = new DataView(theDSXML.Tables["Mst_Province"]);
            theDV.RowFilter = "Deleteflag=0 and SystemID=" + Session["SystemId"] + "";
            if (theDV.Table != null)
            {
                theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                BindManager.BindCombo(ddlprovince, theDT, "Name", "ID");
                theDV.Dispose();
                theDT.Clear();
            }
            /////////////////////////////////////////////////
            IFacilitySetup FacilityManager = (IFacilitySetup)ObjectFactory.CreateInstance("BusinessProcess.Administration.BFacility, BusinessProcess.Administration");
            DataSet        theDSFacility   = FacilityManager.GetModuleName();
            DataTable      DT = theDSFacility.Tables[0];

            BindManager.BindCheckedList(cblPMTCT, DT, "displayname", "moduleid");
        }
Esempio n. 7
0
        private void Bind_Select_Lists()
        {
            theDSXML.ReadXml(MapPath("..\\..\\XMLFiles\\AllMasters.con"));

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='WeightForAge'";
            theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(ddlweightforage, theDT, "Name", "ID");

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='WeightForAge'";
            theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(ddlweightforheight, theDT, "Name", "ID");

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='RefferedToFUpF'";
            theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDV.Sort      = "SRNo asc, Name";
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCheckedList(cblReferredTo, theDT, "Name", "ID");
        }
        private void BindList()
        {
            DataSet theDS = new DataSet();

            theDS.ReadXml(MapPath("..\\XMLFiles\\ALLMasters.con"));
            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();

            if (theDS.Tables["Mst_Decode"] != null)
            {
                DataView theDVWHOStage = new DataView(theDS.Tables["Mst_Decode"]);
                theDVWHOStage.RowFilter = "CodeId=22 and (DeleteFlag = 0 or DeleteFlag IS NULL) and SystemId in(0,1)";
                theDVWHOStage.Sort      = "SRNo";
                if (theDVWHOStage.Table != null)
                {
                    DataTable theDTWHOStage = (DataTable)theUtils.CreateTableFromDataView(theDVWHOStage);
                    BindManager.BindCombo(ddlotherFacilityClinicalStage, theDTWHOStage, "Name", "Id");
                    BindManager.BindCombo(ddlthisfacilityClinicalStage, theDTWHOStage, "Name", "Id");
                }
                DataView theDVFunctionalStage = new DataView(theDS.Tables["Mst_Decode"]);
                theDVFunctionalStage.RowFilter = "CodeId=21 and (DeleteFlag=0 or DeleteFlag IS NULL) and SystemId in (0,1)";
                theDVFunctionalStage.Sort      = "SRNo";
                if (theDVFunctionalStage.Table != null)
                {
                    DataTable theDTFunctionalStage = (DataTable)theUtils.CreateTableFromDataView(theDVFunctionalStage);
                    BindManager.BindCombo(ddlotherFunction, theDTFunctionalStage, "Name", "Id");
                    BindManager.BindCombo(ddlthisFunction, theDTFunctionalStage, "Name", "Id");
                }
            }
        }
Esempio n. 9
0
    protected void FillDropDowns()
    {
        LabManager = (ILabMst)ObjectFactory.CreateInstance("BusinessProcess.Administration.BLabMst, BusinessProcess.Administration");
        DataSet       theDS       = LabManager.GetDropDowns();
        BindFunctions BindManager = new BindFunctions();

        BindManager.BindCombo(ddDepartment, theDS.Tables[0], "LabDepartmentName", "LabDepartmentID");
        BindManager.BindCombo(ddUnit, theDS.Tables[2], "Name", "UnitID");
    }
Esempio n. 10
0
        protected void Init_Form()
        {
            BindFunctions BindManager = new BindFunctions();
            DataTable     Month       = BindManager.GetMonths();

            BindManager.BindCombo(ddMonth, Month, "Name", "Id");
            IReports ReportDetails = (IReports)ObjectFactory.CreateInstance("BusinessProcess.Reports.BReports,BusinessProcess.Reports");
            DataSet  repquarter    = (DataSet)ReportDetails.GetReportQuarter();

            BindManager.BindCombo(ddQuarter, repquarter.Tables[0], "QTR_Desc", "Qtr_pk");
        }
        public void fillDropDown()
        {
            theDSXML.ReadXml(MapPath("..\\..\\XMLFiles\\AllMasters.con"));

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='ARV Therapy Plan'";
            theDV = new DataView(theDSXML.Tables["Mst_Decode"]);
            //theDV.RowFilter = "CodeID=146";
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            theDT.DefaultView.ToTable(true, "Name");
            BindManager.BindCombo(ddlTreatmentplan, theDT, "Name", "ID");
            ddlTreatmentplan.Attributes.Add("OnChange", "getSelectedtableValue('divEligiblethrough','" + ddlTreatmentplan.ClientID + "','Start new treatment (naive patient)','DIVTreatmentplan');getSelectedtableValue('divARTchangecode','" + ddlTreatmentplan.ClientID + "','Change regimen','DIVTreatmentplan');getSelectedtableValue('divReasonforswitchto2ndlineregimen','" + ddlTreatmentplan.ClientID + "','Switch to second line','DIVTreatmentplan');getSelectedtableValue('divARTstopcode','" + ddlTreatmentplan.ClientID + "','Stop treatment','DIVTreatmentplan')");
            //ddlTreatmentplan.Attributes.Add("OnChange", "getSelectedtableValue('divEligiblethrough','" + ddlTreatmentplan.ClientID + "','Start ART','DIVTreatmentplan');getSelectedtableValue('divARTchangecode','" + ddlTreatmentplan.ClientID + "','Substitute regimen','DIVTreatmentplan');getSelectedtableValue('divReasonforswitchto2ndlineregimen','" + ddlTreatmentplan.ClientID + "','Switch to second lin','DIVTreatmentplan');getSelectedtableValue('divARTstopcode','" + ddlTreatmentplan.ClientID + "','Stop treatment','DIVTreatmentplan')");
            //ARTTreatmentPlan

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='2ndLineRegimenSwitch'";
            theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(ddlReasonforswitchto2ndlineregimen, theDT, "Name", "ID");

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='ARTEligibility'";
            theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCheckedList(chklistEligiblethrough, theDT, "Name", "ID");

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='ARTchangecode'";
            theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCheckedList(chklistARTchangecode, theDT, "Name", "ID");

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='ARTstopcode'";
            theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
            theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
            theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCheckedList(chklistARTstopcode, theDT, "Name", "ID");

            chklistARTchangecode.Attributes.Add("OnClick", "CheckBoxHideUnhide('" + chklistARTchangecode.ClientID + "','divSpecifyotherARTchangereason','Other')");
            chklistEligiblethrough.Attributes.Add("OnClick", "CheckBoxHideUnhide('" + chklistEligiblethrough.ClientID + "','divOtherEligibility','Other')");
            chklistARTstopcode.Attributes.Add("OnClick", "CheckBoxHideUnhide('" + chklistARTstopcode.ClientID + "','divARTstopcodeother','Other patient decisi')");

            //BindDropdown(ddlTreatmentplan, "ARTTreatmentPlan");
            //BindChkboxlstControl(chklistEligiblethrough, "ARTEligibility");
            //BindChkboxlstControl(chklistARTchangecode, "ARTchangecode");
            //BindChkboxlstControl(chklistARTstopcode, "ARTstopcode");
            //BindDropdown(ddlReasonforswitchto2ndlineregimen, "2ndLineRegimenSwitch");
        }
        private void BindTransferDetail()
        {
            txtLocationName.Text     = Session["AppLocation"].ToString();
            txtLocationName.ReadOnly = true;

            /*Binding Satellite ID*/
            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();
            DataTable     theDT       = new DataTable();

            DataSet          theDS = new DataSet();
            IPatientTransfer PatientTransferMgr = (IPatientTransfer)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientTransfer, BusinessProcess.Clinical");

            if (btnSave.Text == "Save")
            {
                tredit.Visible       = false;
                theDS                = PatientTransferMgr.GetSatelliteLocation(PatientId.ToString(), TransferId, 0, Session["SystemId"].ToString());
                txtLocationName.Text = theDS.Tables[0].Rows[0]["CurrentSatName"].ToString();
                DataView theDV = new DataView(theDS.Tables[1]);
                if (theDV.Table != null)
                {
                    theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                    BindManager.BindCombo(ddSatellite, theDT, "Name", "ID");
                    theDV.Dispose();
                    theDT.Clear();
                }
            }


            if (btnSave.Text == "Update")
            {
                tredit.Visible = true;
                theDS          = PatientTransferMgr.GetSatelliteLocation(PatientId.ToString(), TransferId, 1, Session["SystemId"].ToString());

                txtLocationNameEdit.Text    = theDS.Tables[0].Rows[0]["CurrentSatName"].ToString();
                txtLocationNameEdit.Enabled = false;
                txtFromSatellite.Text       = theDS.Tables[2].Rows[0]["TransferfromSatellite"].ToString();
                txtFromSatellite.Enabled    = false;
                ViewState["FromID"]         = theDS.Tables[2].Rows[0]["TransferredfromID"].ToString();
                //ddSatelliteEdit.Enabled = false;
                TxtTransDateEdit.Text     = string.Format("{0:dd-MMM-yyyy}", Convert.ToDateTime(theDS.Tables[2].Rows[0]["TransferredDate"]));
                ViewState["TransferDate"] = TxtTransDateEdit.Text;
                DataView theDV = new DataView(theDS.Tables[1]);
                //theDV.RowFilter = "DeleteFlag=0";
                if (theDV.Table != null)
                {
                    theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                    BindManager.BindCombo(ddSatelliteEdit, theDT, "Name", "ID");
                    theDV.Dispose();
                    theDT.Clear();
                }
                ddSatelliteEdit.SelectedValue = theDS.Tables[2].Rows[0][3].ToString();
            }
        }
    //int currentDate;
    #region "Modified13June07(1)"
    private void fillDropDownList(int idPurpose, int idEmployee)
    {
        IAppointment FormManager;

        FormManager = (IAppointment)ObjectFactory.CreateInstance("BusinessProcess.Scheduler.BAppointment, BusinessProcess.Scheduler");
        DataSet       theDtSet        = FormManager.GetEmployees(idEmployee);
        DataSet       theDtSetPurpose = FormManager.GetAppointmentReasons(idPurpose);
        BindFunctions appBind         = new BindFunctions();
        IQCareUtils   theUtils        = new IQCareUtils();

        if (Request.QueryString["Name"] == "Add")
        {
            //if (Convert.ToInt32(Session["PatientVisitId"]) == 0)
            //{
            DataView theDV = new DataView(theDtSet.Tables[0]);
            DataView TheDV = new DataView(theDtSetPurpose.Tables[0]);
            theDV.RowFilter = "DeleteFlag=0";
            TheDV.RowFilter = "DeleteFlag=0";
            if (theDV.Table != null)
            {
                DataTable DT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0)
                {
                    theDV = new DataView(DT);

                    //theDV.RowFilter = "EmployeeId IN("+ EmployeeId +" ," + Session["AppUserEmployeeId"].ToString() + ")";
                    theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString();
                    if (theDV.Count > 0)
                    {
                        DT = theUtils.CreateTableFromDataView(theDV);
                    }
                }
                DataTable TheDT = (DataTable)theUtils.CreateTableFromDataView(TheDV);

                //appBind.BindCombo(ddAppProvider, DT, "EmployeeName", "EmployeeId");
                //BindUserDropdown(ddAppProvider, string.Empty);
                BindUserDropdown(ddAppProvider, Session["AppUserId"].ToString());
                appBind.BindCombo(ddAppPurpose, TheDT, "Name", "Id");
                theDV.Dispose();
                TheDV.Dispose();
                DT.Clear();
                TheDT.Clear();
            }
            //}
        }
        if (Request.QueryString["name"] == "Edit" || Request.QueryString["name"] == "Delete")
        {
            BindDropdownOrderBy(theDtSet.Tables[0].Rows[0]["EmployeeName"].ToString());

            this.ddAppProvider.SelectedValue = theDtSet.Tables[0].Rows[0]["EmployeeName"].ToString();
            //appBind.BindCombo(ddAppProvider, theDtSet.Tables[0], "EmployeeName", "EmployeeId");
            appBind.BindCombo(ddAppPurpose, theDtSetPurpose.Tables[0], "Name", "Id");
        }
    }
Esempio n. 14
0
        protected void GetAllDropDowns()
        {
            IIQTouchPatientRegistration ptnMgr = (IIQTouchPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BIQTouchPatientRegistration, BusinessProcess.Clinical");
            BindFunctions theBind = new BindFunctions();

            string GetSex      = "select ID, Name from mst_decode where codeid = 4 and deleteflag = 0";
            string GetFacility = "select FacilityID,FacilityName from mst_facility";

            theBind.BindCombo(rcbSex, ptnMgr.ReturnDatatableQuery(GetSex), "Name", "ID");
            theBind.BindCombo(cmbsex, ptnMgr.ReturnDatatableQuery(GetSex), "Name", "ID");
            theBind.BindCombo(cmbfacility, ptnMgr.ReturnDatatableQuery(GetFacility), "FacilityName", "FacilityID");
        }
Esempio n. 15
0
    /// <summary>
    ///  Bind Dropdown Data
    /// </summary>
    private void fillSubDdlData()
    {
        BindFunctions BindManager = new BindFunctions();
        IQCareUtils   theUtils    = new IQCareUtils();
        DataTable     theDT       = new DataTable();
        DataSet       theDSXML    = new DataSet();

        theDSXML.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con"));
        DataView theDV;

        txtAllergenOther.Visible = true;
        txtAllergenOther.Text    = "";
        if (ddlAllergyType.SelectedItem.Value != "207" && ddlAllergyType.SelectedItem.Value != "211" && ddlAllergyType.SelectedItem.Text != "Select")
        {
            ddlAllergen.Visible      = true;
            txtAllergen.Visible      = false;
            txtAllergen.Text         = "";
            txtAllergenOther.Visible = false;
            txtAllergenOther.Text    = "";
            if (ddlAllergyType.SelectedItem.Value == "208")
            {
                theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
                theDV.RowFilter = "DeleteFlag=0 and CodeID=208";
                if (theDV.Table != null)
                {
                    theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                    BindManager.BindCombo(ddlAllergen, theDT, "Name", "ID");
                    theDV.Dispose();
                    theDT.Clear();
                }
            }
            else if (ddlAllergyType.SelectedItem.Value == "209")
            {
                theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
                theDV.RowFilter = "DeleteFlag=0 and CodeID=209";
                if (theDV.Table != null)
                {
                    theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                    BindManager.BindCombo(ddlAllergen, theDT, "Name", "ID");
                    theDV.Dispose();
                    theDT.Clear();
                }
            }
        }
        else if (ddlAllergyType.SelectedItem.Value == "207")
        {
            txtAllergen.Visible      = true;
            txtAllergen.Text         = "";
            txtAllergenOther.Visible = false;
            txtAllergenOther.Text    = "";
            GetPediatricFields(Convert.ToInt32(Session["PatientId"]));
        }
    }
Esempio n. 16
0
        private void BindEmpoyee(RadComboBox rcb)
        {
            DataSet theDS = new DataSet();

            theDS.ReadXml(MapPath("..\\..\\XMLFiles\\ALLMasters.con"));
            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();

            rcb.DataSource = null;
            rcb.Items.Clear();

            if (theDS.Tables["Mst_Employee"] != null)
            {
                DataView theDV = new DataView(theDS.Tables["Mst_Employee"]);
                if (Convert.ToInt32(Session["PatientVisitId"]) == 0)
                {
                    theDV.RowFilter = "DeleteFlag=0";
                    if (theDV.Table != null)
                    {
                        DataTable theDT = theUtils.CreateTableFromDataView(theDV);
                        if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0)
                        {
                            theDV           = new DataView(theDT);
                            theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString();
                            if (theDV.Count > 0)
                            {
                                theDT = theUtils.CreateTableFromDataView(theDV);
                            }
                        }
                        BindManager.BindCombo(rcb, theDT, "EmployeeName", "EmployeeId");
                    }
                }
                else
                {
                    if (theDV.Table != null)
                    {
                        DataTable theDT = theUtils.CreateTableFromDataView(theDV);
                        if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0)
                        {
                            theDV           = new DataView(theDT);
                            theDV.RowFilter = "EmployeeId =" + Session["AppUserEmployeeId"].ToString();
                            if (theDV.Count > 0)
                            {
                                theDT = theUtils.CreateTableFromDataView(theDV);
                            }
                        }
                        BindManager.BindCombo(rcb, theDT, "EmployeeName", "EmployeeId");
                    }
                }
            }
        }
Esempio n. 17
0
        private void Binddropdwn()
        {
            IUser theLocationManager;

            theLocationManager = (IUser)ObjectFactory.CreateInstance("BusinessProcess.Security.BUser, BusinessProcess.Security");
            DataTable     theDT         = theLocationManager.GetFacilityList();
            BindFunctions theBindManger = new BindFunctions();

            theBindManger.BindCombo(ddlfacilityname, theDT, "FacilityName", "FacilityId");
            IQCareUtils util       = new IQCareUtils();
            DataTable   theEntryDT = util.GetDataTable("MST_CODE", "EntryType");

            theBindManger.BindCombo(ddlentrytype, theEntryDT, "Name", "Id");
        }
    private void Init_Form()
    {
        BindFunctions BindManager      = new BindFunctions();
        IQCareUtils   theUtils         = new IQCareUtils();
        ILabFunctions LabResultManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory");
        DataSet       theDSLabs;

        theDSLabs = LabResultManager.GetLabValues();
        DataTable HivTestType = theDSLabs.Tables[2];
        DataView  theDV1      = new DataView(HivTestType);

        theDV1.RowFilter = "SubTestId in (53,114)";
        HivTestType      = theUtils.CreateTableFromDataView(theDV1);
        BindManager.BindCombo(DDHIVTestType, HivTestType, "SubTestName", "SubTestId");
        DataSet theDSXML = new DataSet();

        theDSXML.ReadXml(MapPath("..\\XMLFiles\\ALLMasters.con"));
        DataView  theDV = new DataView();
        DataTable theDT = new DataTable();

        /*******/
        theDV           = new DataView(theDSXML.Tables["Mst_ModDeCode"]);
        theDV.RowFilter = "DeleteFlag=0 and CodeID=5";
        if (theDV.Table != null)
        {
            theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(DDFinalResult, theDT, "Name", "ID");
            theDV.Dispose();
            theDT.Clear();
        }
        theDV           = new DataView(theDSXML.Tables["mst_PMTCTDecode"]);
        theDV.RowFilter = "DeleteFlag=0 and CodeID=5";
        if (theDV.Table != null)
        {
            theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(DDResult, theDT, "Name", "ID");
            theDV.Dispose();
            theDT.Clear();
        }
        theDV           = new DataView(theDSXML.Tables["mst_PMTCTDecode"]);
        theDV.RowFilter = "DeleteFlag=0 and CodeID=4";
        if (theDV.Table != null)
        {
            theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
            BindManager.BindCombo(DDInfantFeedingPractice, theDT, "Name", "ID");
            theDV.Dispose();
            theDT.Clear();
        }
    }
Esempio n. 19
0
    protected void BindServiceDropdown()
    {
        BindFunctions        BindManager = new BindFunctions();
        IPatientRegistration ptnMgr      = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
        DataSet DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]), Convert.ToInt32(Session["AppUserId"]));

        DataTable theDT = new DataTable();

        //if Admin user load all service areas
        if (Convert.ToString(Session["AppUserId"]) == "1")
        {
            theDT = DSModules.Tables[0];
        }
        else
        {
            theDT = DSModules.Tables[2];
        }


        if (theDT.Rows.Count > 0)
        {
            BindManager.BindCombo(ddlServices, theDT, "ModuleName", "ModuleID");
            ptnMgr = null;
        }
    }
Esempio n. 20
0
        /// <summary>
        /// Binds the dropdown reported by.
        /// </summary>
        /// <param name="EmployeeId">The employee identifier.</param>
        private void BindDropdownReportedBy(String EmployeeId)
        {
            DataSet theDS = new DataSet();

            theDS.ReadXml(MapPath("..\\XMLFiles\\ALLMasters.con"));
            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();

            if (theDS.Tables["Mst_Employee"] != null)
            {
                DataView theDV = new DataView(theDS.Tables["Mst_Employee"]);
                theDV.RowFilter = "DeleteFlag=0";
                if (theDV.Table != null)
                {
                    DataTable theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                    if (Convert.ToInt32(Session["AppUserEmployeeId"]) > 0)
                    {
                        theDV           = new DataView(theDT);
                        theDV.RowFilter = "EmployeeId IN(" + Session["AppUserEmployeeId"].ToString() + "," + EmployeeId + ")";
                        if (theDV.Count > 0)
                        {
                            theDT = theUtils.CreateTableFromDataView(theDV);
                        }
                    }

                    BindManager.BindCombo(ddlLabReportedbyName, theDT, "EmployeeName", "EmployeeId");
                }
            }
        }
Esempio n. 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IIQCareSystem MgrSecurity;

        try
        {
            if (!IsPostBack)
            {
                DataTable     theDT       = (DataTable)Session["AppModule"];
                String        ModuleId    = Convert.ToString(theDT.Rows[0]["ModuleId"]);
                BindFunctions BindManager = new BindFunctions();
                MgrSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
                DataSet  theDSVisitForm = MgrSecurity.GetVisitForms();
                DataView theDV          = new DataView(theDSVisitForm.Tables[0]);
                theDV.RowFilter = "DeleteFlag = 0 and SystemID IN(" + Session["SystemId"] + ") and ModuleID IN(" + ModuleId + ",0)";
                BindManager.BindCombo(ddAuditTrail, theDV.ToTable(), "VisitName", "VisitTypeID");
                DataSet theDS = MgrSecurity.GetMySQLAuditTrailData();
                Session["theDS"] = theDS.Tables[0];
            }
        }
        catch (Exception err)
        {
            MsgBuilder theBuilder = new MsgBuilder();
            theBuilder.DataElements["MessageText"] = err.Message.ToString();
            IQCareMsgBox.Show("#C1", theBuilder, this);
            return;
        }
        finally
        {
            MgrSecurity = null;
        }
    }
Esempio n. 22
0
    private void fill_dropdowns()
    {
        try
        {
            Iuser CmbManager;
            CmbManager = (Iuser)ObjectFactory.CreateInstance("BusinessProcess.Administration.BUser,BusinessProcess.Administration");
            DataSet theDS = CmbManager.FillDropDowns();
            CmbManager = null;

            //// User Groups List
            BindFunctions GblCls = new BindFunctions();
            GblCls.BindCheckedList(lstUsergroup, theDS.Tables[0], "groupname", "groupid");

            //// EmployeeList
            IQCareUtils theUtils = new IQCareUtils();
            DataTable   dt       = new DataTable();
            DataSet     theXMLDS = new DataSet();
            theXMLDS.ReadXml(Server.MapPath("..\\XMLFiles\\AllMasters.con"));
            DataView theDV = new DataView(theXMLDS.Tables["Mst_Employee"]);
            theDV.RowFilter = "DeleteFlag=0";
            if (theDV.Table != null)
            {
                dt = theUtils.CreateTableFromDataView(theDV);
            }

            GblCls.BindCombo(ddEmployee, dt, "EmployeeName", "EmployeeId");
        }
        catch (Exception err)
        {
            MsgBuilder theBuilder = new MsgBuilder();
            theBuilder.DataElements["MessageText"] = err.Message.ToString();
            IQCareMsgBox.Show("#C1", theBuilder, this);
        }
    }
Esempio n. 23
0
        private void BindDropdown(DropDownList DropDownID, string fieldname)
        {
            DataSet theDS = new DataSet();

            theDS.ReadXml(MapPath("..\\..\\XMLFiles\\ALLMasters.con"));
            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();
            DataView      theCodeDV   = new DataView(theDS.Tables["MST_CODE"]);

            theCodeDV.RowFilter = "DeleteFlag=0 and Name='" + fieldname + "'";
            DataTable theCodeDT = (DataTable)theUtils.CreateTableFromDataView(theCodeDV);

            if (theDS.Tables["Mst_Decode"] != null)
            {
                DataView theDV = new DataView(theDS.Tables["Mst_Decode"]);
                if (theCodeDT.Rows.Count > 0)
                {
                    theDV.RowFilter = "DeleteFlag=0 and CodeId=" + theCodeDT.Rows[0]["CodeId"];
                    if (theDV.Table != null)
                    {
                        DataTable theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);
                        BindManager.BindCombo(DropDownID, theDT, "Name", "Id");
                    }
                }
            }
        }
Esempio n. 24
0
        private void BindUserDropDown(ref DropDownList dropDownList, String userId = "")
        {
            //DataSet theDS = new DataSet();
            userId = userId == "0" ? "" : userId;
            //theDS.ReadXml(MapPath("..\\XMLFiles\\ALLMasters.con"));
            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();
            //if (theDS.Tables["Mst_Employee"] != null)
            //{
            DataView theDV = new DataView(this.UserList);

            //if (this.EmployeeId > 0)
            //{
            //    theDV.RowFilter = "EmployeeId = " + this.EmployeeId;
            //}
            //else
            //{
            theDV.RowFilter = "EmployeeId Is Not Null Or EmployeeId > 0";
            //}
            if (theDV.Table != null)
            {
                DataTable theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);

                BindManager.BindCombo(dropDownList, theDT, "Name", "UserId", "", userId);
            }
        }
Esempio n. 25
0
        private void BindDropdownResultBy()
        {
            String userId = "";

            BindFunctions BindManager = new BindFunctions();
            IQCareUtils   theUtils    = new IQCareUtils();

            DataView theDV = new DataView(this.UserList);

            string rowFilter = "EmployeeId Is Not Null Or EmployeeId > 0 And UserDeleteFlag = 0";

            if (IsPaperless && this.EmployeeId > 0)
            {
                userId    = this.UserId.ToString();
                rowFilter = "UserId = " + userId;
            }

            theDV.RowFilter = rowFilter;
            if (theDV.Table != null)
            {
                DataTable theDT = (DataTable)theUtils.CreateTableFromDataView(theDV);

                BindManager.BindCombo(ddlReportedbyName, theDT, "Name", "UserId", "", userId);
                ListItem item = ddlReportedbyName.Items.FindByValue(userId);
                if (item == null)
                {
                    item = ddlReportedbyName.Items.FindByValue(this.UserId.ToString());
                }
                if (item != null)
                {
                    item.Selected = true;
                }
            }
        }
        public void fillDropDown()
        {
            theDSXML.ReadXml(MapPath("..\\..\\XMLFiles\\AllMasters.con"));

            theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
            theDVCodeID.RowFilter = "Name='NigeriaARVTreamentPlan'";
            theDV = new DataView(theDSXML.Tables["Mst_Decode"]);
            if (theDVCodeID.Table.Rows.Count > 0)
            {
                theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
                theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
                theDT.DefaultView.ToTable(true, "Name");
                BindManager.BindCombo(ddlTreatmentplan, theDT, "Name", "ID");
            }
            ddlTreatmentplan.Attributes.Add("OnChange", "getSelectedtableValue('divARTchangecode','" + ddlTreatmentplan.ClientID + "','Change Treatment','DIVTreatmentplan');");
            //ddlTreatmentplan.Attributes.Add("OnChange", "getSelectedtableValue('divEligiblethrough','" + ddlTreatmentplan.ClientID + "','Start ART','DIVTreatmentplan');getSelectedtableValue('divARTchangecode','" + ddlTreatmentplan.ClientID + "','Substitute regimen','DIVTreatmentplan');getSelectedtableValue('divReasonforswitchto2ndlineregimen','" + ddlTreatmentplan.ClientID + "','Switch to second lin','DIVTreatmentplan');getSelectedtableValue('divARTstopcode','" + ddlTreatmentplan.ClientID + "','Stop treatment','DIVTreatmentplan')");
            //ARTTreatmentPlan
            if (theDVCodeID.Table.Rows.Count > 0)
            {
                theDVCodeID           = new DataView(theDSXML.Tables["Mst_Code"]);
                theDVCodeID.RowFilter = "Name='NigeriaARVTreamentChangeReason'";
                theDV           = new DataView(theDSXML.Tables["Mst_Decode"]);
                theDV.RowFilter = "CodeID=" + ((DataTable)theDVCodeID.ToTable()).Rows[0]["CodeID"].ToString();
                theDT           = (DataTable)theUtils.CreateTableFromDataView(theDV);
                BindManager.BindCheckedList(chklistARTchangecode, theDT, "Name", "ID");
            }

            chklistARTchangecode.Attributes.Add("OnClick", "CheckBoxHideUnhide('" + chklistARTchangecode.ClientID + "','divSpecifyotherARTchangereason','Other(Specify)')");
        }
Esempio n. 27
0
        /// <summary>
        /// Binds the dropdown.
        /// </summary>
        void BindDropdown()
        {
            //if (base.Session["TechnicalAreaId"] == null)
            //{
            BindFunctions        BindManager = new BindFunctions();
            IPatientRegistration ptnMgr      = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
            DataSet DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));

            DataView theModDV = new DataView(DSModules.Tables[0]);

            theModDV.RowFilter = "ModuleId NOT IN(206,207)";
            IQCareUtils theModUtils = new IQCareUtils();

            DataTable theDT = new DataTable();

            theDT = theModUtils.CreateTableFromDataView(theModDV);
            //theDT = DSModules.Tables[0];

            if (theDT.Rows.Count > 0)
            {
                BindManager.BindCombo(ddlCostCenter, theDT, "ModuleName", "ModuleID");
                ptnMgr = null;
            }
            ///}
        }
Esempio n. 28
0
 void BindIdentifierDropdown(string strServiceArea)
 {
     try
     {
         IPatientRegistration identifierManager;
         identifierManager = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
         DataTable theDT = identifierManager.GetIdentifierListByServiceName(strServiceArea);
         DataRow   theDR = theDT.NewRow();
         theDR["IdentifierName"] = "All";
         theDR["IdentifierID"]   = 9999;
         theDT.Rows.InsertAt(theDR, 0);
         theDR = theDT.NewRow();
         theDR["IdentifierName"] = "IQNumber";
         theDR["IdentifierID"]   = 10000;
         theDT.Rows.InsertAt(theDR, 1);
         BindFunctions theBindManger = new BindFunctions();
         theBindManger.BindCombo(ddlIdentifier, theDT, "IdentifierName", "IdentifierId");
         ddlIdentifier.Items.RemoveAt(0);
         ddlIdentifier.SelectedValue = "9999";
         ddFacility.SelectedValue    = "0";
         txtidentificationno.Text    = string.Empty;
     }
     catch (Exception ex)
     {
         this.showErrorMessage(ref ex);
     }
 }
Esempio n. 29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IIQCareSystem MgrSecurity;

        try
        {
            if (!IsPostBack)
            {
                BindFunctions BindManager = new BindFunctions();
                MgrSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
                DataSet theDSVisitForm = MgrSecurity.GetVisitForms();
                BindManager.BindCombo(ddAuditTrail, theDSVisitForm.Tables[0], "VisitName", "VisitTypeID");
                MgrSecurity = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
                DataSet theDS = MgrSecurity.GetMySQLAuditTrailData();
                Session["theDS"] = theDS.Tables[0];
            }
        }
        catch (Exception err)
        {
            MsgBuilder theBuilder = new MsgBuilder();
            theBuilder.DataElements["MessageText"] = err.Message.ToString();
            IQCareMsgBox.Show("#C1", theBuilder, this);
            return;
        }
        finally
        {
            MgrSecurity = null;
        }
    }
    private void FillSystemDropdown()
    {
        BindFunctions theBindManager = new BindFunctions();
        IIQCareSystem SystemManager  = (IIQCareSystem)ObjectFactory.CreateInstance("BusinessProcess.Security.BIQCareSystem, BusinessProcess.Security");
        DataTable     theDT          = SystemManager.GetIQCareSystems(0);

        theBindManager.BindCombo(cmbSystem, theDT, "SystemName", "SystemId");
    }