Exemplo n.º 1
0
        private void LoadRoomByDelFlag(int p)
        {
            RoomInfoBll bll = new RoomInfoBll();

            dgvRoomInfo.AutoGenerateColumns = false;
            dgvRoomInfo.DataSource          = bll.GetAllRoomInfoByDelFlag(p);
        }
Exemplo n.º 2
0
        private void LoadRoomInfoByDelFlag(int p)
        {
            RoomInfoBll     rbll     = new RoomInfoBll();
            List <RoomInfo> listroom = rbll.GetAllRoomInfoByDelFlag(p);

            for (int i = listroom.Count - 1; i >= 0; i--)
            {
                TabPage tp = new TabPage();
                tp.Text = listroom[i].RoomName;
                tp.Tag  = listroom[i];
                ListView lv = new ListView();
                //设置内容较多
                lv.LargeImageList = imageList1;
                lv.View           = View.LargeIcon;
                lv.Dock           = DockStyle.Fill;
                lv.MultiSelect    = false;
                lv.BackColor      = Color.Pink;
                tp.Controls.Add(lv);

                tabControl1.TabPages.Add(tp);
            }
        }