private void LoadDanhSachPhong(List <TSCD.Entities.Phong> list)
        {
            var bind = list.Select(item => new
            {
                id   = item.id,
                ten  = item.ten,
                loai = item.loaiphong.ten,
                url  = StringHelper.AddParameter(new Uri(Request.Url.AbsoluteUri), "id", item.id.ToString()).ToString()
            }).ToList();

            _ucCollectionPager_DanhSachPhong.CollectionPager_Object.DataSource    = bind;
            _ucCollectionPager_DanhSachPhong.CollectionPager_Object.BindToControl = RepeaterDanhSachPhong;
            RepeaterDanhSachPhong.DataSource = _ucCollectionPager_DanhSachPhong.CollectionPager_Object.DataSourcePaged;
            RepeaterDanhSachPhong.DataBind();
        }
Пример #2
0
        private void LoadDanhSachTaiSan(List <TSCD.DataFilter.TaiSanHienThi> list)
        {
            var bind = list.Select(item => new
            {
                id   = item.id,
                ten  = item.ten,
                loai = item.loaits,
                url  = StringHelper.AddParameter(new Uri(Request.Url.AbsoluteUri), "id", item.id.ToString()).ToString()
            }).ToList();

            _ucCollectionPager_DanhSachTaiSan.CollectionPager_Object.DataSource    = bind;
            _ucCollectionPager_DanhSachTaiSan.CollectionPager_Object.BindToControl = RepeaterDanhSachTaiSan;
            RepeaterDanhSachTaiSan.DataSource = _ucCollectionPager_DanhSachTaiSan.CollectionPager_Object.DataSourcePaged;
            RepeaterDanhSachTaiSan.DataBind();
        }
Пример #3
0
        private void LoadDanhSachPhong(List <TSCD.Entities.Phong> list)
        {
            var bind = list.Select(item => new
            {
                id    = item.id,
                subid = item.subId,
                ten   = item.ten,
                loai  = item.loaiphong.ten,
                vitri = ViTriCuaPhong(item),
                url   = StringHelper.AddParameter(new Uri(Request.Url.AbsoluteUri), "id", item.id.ToString()).ToString()
            }).ToList();

            _ucCollectionPager_DanhSachPhong.CollectionPager_Object.DataSource    = bind;
            _ucCollectionPager_DanhSachPhong.CollectionPager_Object.BindToControl = RepeaterDanhSachPhong;
            RepeaterDanhSachPhong.DataSource = _ucCollectionPager_DanhSachPhong.CollectionPager_Object.DataSourcePaged;
            RepeaterDanhSachPhong.DataBind();
            if (RepeaterDanhSachPhong.Items.Count == 0)
            {
                KhongCoDuLieu.Visible = true;
                ucDanger_KhongCoDuLieu.LabelInfo.Text = "Vị trí này chưa có phòng";
            }
        }