Exemplo n.º 1
0
        /// <summary>
        /// 获取小区办公楼单位下拉列表
        /// </summary>
        /// <returns>小区列表</returns>
        private List <SelectListItem> GetBuildCompanyList(int placeId)
        {
            //获取楼座列表
            IBuildCompanyBLL buildCompanyBll = BLLFactory <IBuildCompanyBLL> .GetBLL("BuildCompanyBLL");

            var list = buildCompanyBll.GetList(b => b.PropertyPlaceId == placeId && b.DelFlag == ConstantParam.DEL_FLAG_DEFAULT);

            //转换为下拉列表并返回
            return(list.Select(m => new SelectListItem()
            {
                Text = m.Name,
                Value = m.Id.ToString(),
                Selected = false
            }).ToList());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取当前小区办公楼单位列表
        /// </summary>
        private List <SelectListItem> GetBuildCompanyList(int PlaceId)
        {
            //获取办公楼单位列表
            IBuildCompanyBLL buildCompanyBll = BLLFactory <IBuildCompanyBLL> .GetBLL("BuildCompanyBLL");

            var sortModel = this.SettingSorting("Id", true);
            var list      = buildCompanyBll.GetList(u => u.PropertyPlaceId == PlaceId && u.DelFlag == ConstantParam.DEL_FLAG_DEFAULT,
                                                    sortModel.SortName, sortModel.IsAsc);

            //转换为下拉列表并返回
            return(list.Select(m => new SelectListItem()
            {
                Text = m.Name,
                Value = m.Id.ToString(),
                Selected = false
            }).ToList());
        }