Пример #1
0
    public override void BindControls()
    {
        DropDownList_CustomDocumentDischarges_EducationLevel.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_EducationLevel.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_MaritalStatus.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_MaritalStatus.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_EducationStatus.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_EducationStatus.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_EmploymentStatus.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_EmploymentStatus.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_ForensicCourtOrdered.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_ForensicCourtOrdered.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_CurrentlyServingMilitary.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_CurrentlyServingMilitary.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_Legal.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_Legal.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_JusticeSystem.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_JusticeSystem.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_LivingArrangement.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_LivingArrangement.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_AdvanceDirective.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_AdvanceDirective.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_TobaccoUse.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_TobaccoUse.FillDropDownDropGlobalCodes();


        int stateFips = -1;

        if (SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations != null)
        {
            if (SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations.Rows[0]["StateFips"] != DBNull.Value)
            {
                stateFips = Convert.ToInt32(SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations.Rows[0]["StateFips"]);
            }
        }
        DataView dataViewCountyOfResidence = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.Counties);

        dataViewCountyOfResidence.Sort      = "CountyName";
        dataViewCountyOfResidence.RowFilter = "StateFips=" + stateFips;
        if (dataViewCountyOfResidence.Count > 0)
        {
            DropDownList_CustomDocumentDischarges_CountyResidence.DataTextField  = "CountyName";
            DropDownList_CustomDocumentDischarges_CountyResidence.DataValueField = "CountyFIPS";
            DropDownList_CustomDocumentDischarges_CountyResidence.DataSource     = dataViewCountyOfResidence;
            DropDownList_CustomDocumentDischarges_CountyResidence.DataBind();

            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataTextField  = "CountyName";
            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataValueField = "CountyFIPS";
            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataSource     = dataViewCountyOfResidence;
            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataBind();
        }

        BindClientAddress();
    }
Пример #2
0
    public override void BindControls()
    {
        DataSet  ds = BaseCommonFunctions.ScreenInfo.CurrentDocument.DocumentDataSet;
        DataView dataViewPrograms = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes);

        DropDownList_CustomDocumentDischarges_TreatmentCompletion.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_TreatmentCompletion.FillDropDownDropGlobalCodes();

        dataViewPrograms.RowFilter = "Category='EDUCATIONALSTATUS' and Active='Y' and ISNULL(RecordDeleted,'N')='N'";
        dataViewPrograms.Sort      = "SortOrder,GlobalCodeId ";
        DropDownList_CustomDocumentDischarges_EducationLevel.DataTextField  = "CodeName";
        DropDownList_CustomDocumentDischarges_EducationLevel.DataValueField = "GlobalCodeId";
        DropDownList_CustomDocumentDischarges_EducationLevel.DataSource     = dataViewPrograms;
        DropDownList_CustomDocumentDischarges_EducationLevel.DataBind();

        DropDownList_CustomDocumentDischarges_SchoolAttendance.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_SchoolAttendance.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_MaritalStatus.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_MaritalStatus.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_EducationStatus.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_EducationStatus.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_EmploymentStatus.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_EmploymentStatus.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_ForensicCourtOrdered.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_ForensicCourtOrdered.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_CurrentlyServingMilitary.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_CurrentlyServingMilitary.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_Legal.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_Legal.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_JusticeSystem.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_JusticeSystem.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_LivingArrangement.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_LivingArrangement.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_AdvanceDirective.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_AdvanceDirective.FillDropDownDropGlobalCodes();

        DropDownList_CustomDocumentDischarges_TobaccoUse.DataTableGlobalCodes = SHS.BaseLayer.SharedTables.ApplicationSharedTables.GlobalCodes;
        DropDownList_CustomDocumentDischarges_TobaccoUse.FillDropDownDropGlobalCodes();


        int stateFips = -1;

        if (SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations != null)
        {
            if (SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations.Rows[0]["StateFips"] != DBNull.Value)
            {
                stateFips = Convert.ToInt32(SHS.BaseLayer.SharedTables.ApplicationSharedTables.SystemConfigurations.Rows[0]["StateFips"]);
            }
        }
        DataView dataViewCountyOfResidence = new DataView(SHS.BaseLayer.SharedTables.ApplicationSharedTables.Counties);

        dataViewCountyOfResidence.Sort      = "CountyName";
        dataViewCountyOfResidence.RowFilter = "StateFips=" + stateFips;
        if (dataViewCountyOfResidence.Count > 0)
        {
            DropDownList_CustomDocumentDischarges_CountyResidence.DataTextField  = "CountyName";
            DropDownList_CustomDocumentDischarges_CountyResidence.DataValueField = "CountyFIPS";
            DropDownList_CustomDocumentDischarges_CountyResidence.DataSource     = dataViewCountyOfResidence;
            DropDownList_CustomDocumentDischarges_CountyResidence.DataBind();

            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataTextField  = "CountyName";
            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataValueField = "CountyFIPS";
            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataSource     = dataViewCountyOfResidence;
            DropDownList_CustomDocumentDischarges_CountyFinancialResponsibility.DataBind();
        }
        BindClientAddress();
    }