Ejemplo n.º 1
0
        private void LoadInitialData()
        {
            //DRPYear
            DRPYear.Items.Clear();
            DRPYear.Items.Add(new ListItem(Constants.DROPDOWN_EMPTY_ITEM_TEXT, Constants.DROPDOWN_EMPTY_ITEM_VALUE));
            for (int i = Constants.LANDLORD_PROFILE_HOUSEBUILD_STARTING_YEAR; i <= Constants.LANDLORD_PROFILE_HOUSEBUILD_NUMBER_OF_YEARS + Constants.LANDLORD_PROFILE_HOUSEBUILD_STARTING_YEAR; i++)
            {
                DRPYear.Items.Add(new ListItem(i.ToString(), i.ToString()));
            }

            //Drpstate
            Drpstate.DataSource     = RHP.Utility.Generic.GetAll <State>();
            Drpstate.DataTextField  = "StateName";
            Drpstate.DataValueField = "StateId";
            Drpstate.DataBind();
            Drpstate.Items.Insert(0, new ListItem(Constants.DROPDOWN_EMPTY_ITEM_TEXT, Constants.DROPDOWN_EMPTY_ITEM_VALUE));

            //DrpBathRooms
            DrpBathRooms.Items.Clear();
            for (int i = Constants.LANDLORD_PROFILE_HOUSEBUILD_BATHROOMS_MIN; i <= Constants.LANDLORD_PROFILE_HOUSEBUILD_BATHROOMS_MIN + Constants.LANDLORD_PROFILE_HOUSEBUILD_BATHROOMS; i++)
            {
                DrpBathRooms.Items.Add(new ListItem(i.ToString(), i.ToString()));
            }
            DrpBathRooms.Items.Insert(0, new ListItem(Constants.DROPDOWN_EMPTY_ITEM_TEXT, Constants.DROPDOWN_EMPTY_ITEM_VALUE));

            //DrpBedRooms
            DrpBedRooms.Items.Clear();
            for (int i = Constants.LANDLORD_PROFILE_HOUSEBUILD_BEDROOMS_MIN; i <= Constants.LANDLORD_PROFILE_HOUSEBUILD_BEDROOMS_MIN + Constants.LANDLORD_PROFILE_HOUSEBUILD_BEDROOMS; i++)
            {
                DrpBedRooms.Items.Add(new ListItem(i.ToString(), i.ToString()));
            }
            DrpBedRooms.Items.Insert(0, new ListItem(Constants.DROPDOWN_EMPTY_ITEM_TEXT, Constants.DROPDOWN_EMPTY_ITEM_VALUE));
        }
Ejemplo n.º 2
0
        private void LoadInitialData()
        {
            //Set Gender
            DrpGender.Items.AddRange(Constants.STUDENT_SEX_LIST);

            //Drpstate
            Drpstate.DataSource     = RHP.Utility.Generic.GetAll <State>();
            Drpstate.DataTextField  = "StateName";
            Drpstate.DataValueField = "StateId";
            Drpstate.DataBind();
            Drpstate.Items.Insert(0, new ListItem(Constants.DROPDOWN_EMPTY_ITEM_TEXT, Constants.DROPDOWN_EMPTY_ITEM_VALUE));
        }
        private void LoadInitialData()
        {
            //Drpstate

            if (Drpstate.Items.Count < 1)
            {
                Drpstate.DataSource     = RHP.Utility.Generic.GetAll <State>();
                Drpstate.DataTextField  = "StateName";
                Drpstate.DataValueField = "StateId";
                Drpstate.DataBind();
                Drpstate.Items.Insert(0, new ListItem(Constants.DROPDOWN_EMPTY_ITEM_TEXT, Constants.DROPDOWN_EMPTY_ITEM_VALUE));
            }
        }