Example #1
0
        private void LoadDropDowlist()
        {
            ddlHomeType.Items.Clear();
            ddlHomeType.Items.Add(new ListItem("-Kiểu nhà-", "0"));
            List <HomeTypeInfo> listHomeTypeServices = HomeTypeService.HomeTypeInfo_GetByAll();

            for (int i = 0; i < listHomeTypeServices.Count; i++)
            {
                ddlHomeType.Items.Add(new ListItem(listHomeTypeServices[i].HomeTypeName, listHomeTypeServices[i].HomeTypeID));
            }
            listHomeTypeServices.Clear();
            listHomeTypeServices = null;
        }
        private void ViewRealEstateType2()
        {
            ddlHomeType2.Items.Clear();
            ddlHomeType2.Items.Add(new ListItem("-Chọn loại Nhà-", "0"));
            List <HomeTypeInfo> listddlHomeTypeInfos = HomeTypeService.HomeTypeInfo_GetByAll();

            for (int i = 0; i < listddlHomeTypeInfos.Count; i++)
            {
                ListItem lsListItem = new ListItem(listddlHomeTypeInfos[i].HomeTypeName,
                                                   listddlHomeTypeInfos[i].HomeTypeID);
                ddlHomeType2.Items.Add(lsListItem);
            }
            listddlHomeTypeInfos.Clear();
            listddlHomeTypeInfos = null;
        }