Exemple #1
0
        private void InitializeForm()
        {
            ddlDesignation.DataSource     = InterfaceUtils.GetEnumerationListItems <Designation>(true);
            ddlDesignation.DataTextField  = "Text";
            ddlDesignation.DataValueField = "Value";
            ddlDesignation.DataBind();

            //ddlStatus.DataSource = InterfaceUtils.GetEnumerationListItems<EmploymentStatus>(true);
            //ddlStatus.DataTextField = "Text";
            //ddlStatus.DataValueField = "Value";
            //ddlStatus.DataBind();

            ddlSector.DataSource     = InterfaceUtils.GetEnumerationListItems <FacilityType>(true);
            ddlSector.DataTextField  = "Text";
            ddlSector.DataValueField = "Value";
            ddlSector.DataBind();

            ddlEmployerGroup.DataSource     = InterfaceUtils.GetEnumerationListItems <EmployerGroup>(true);
            ddlEmployerGroup.DataTextField  = "Text";
            ddlEmployerGroup.DataValueField = "Value";
            ddlEmployerGroup.DataBind();

            ddlDistrict.DataSource     = InterfaceUtils.GetEnumerationListItems <District>(true);
            ddlDistrict.DataTextField  = "Text";
            ddlDistrict.DataValueField = "Value";
            ddlDistrict.DataBind();

            ddlRegion.DataSource     = InterfaceUtils.GetEnumerationListItems <Region>(true);
            ddlRegion.DataTextField  = "Text";
            ddlRegion.DataValueField = "Value";
            ddlRegion.DataBind();

            ddlCommittee.DataSource     = InterfaceUtils.GetEnumerationListItems <Committee>(true);
            ddlCommittee.DataTextField  = "Text";
            ddlCommittee.DataValueField = "Value";
            ddlCommittee.DataBind();

            var facilityListItems = _mBs.GetFacilities().OrderBy(f => f.facilityName);

            ddlFacility.DataSource     = facilityListItems;
            ddlFacility.DataTextField  = "facilityName";
            ddlFacility.DataValueField = "id";
            ddlFacility.DataBind();

            ddlLocalTableOfficerPosition.DataSource     = InterfaceUtils.GetLocalTableOfficerPositionListItems();
            ddlLocalTableOfficerPosition.DataTextField  = "Text";
            ddlLocalTableOfficerPosition.DataValueField = "Value";
            ddlLocalTableOfficerPosition.DataBind();

            ddlPosition.DataSource = new List <ListItem> {
                new ListItem("Please Select", "")
            };
            ddlPosition.DataTextField  = "Text";
            ddlPosition.DataValueField = "Value";
            ddlPosition.DataBind();
        }