private void showTreView()
        {
            trvPhong.Nodes.Clear();
            lpBUS = new LoaiPhongBUS();
            pBUS  = new PhongBUS();
            TreeNode             tr     = new TreeNode();
            IList <LoaiPhongDTO> listlp = lpBUS.getListLoaiPhongAll();

            foreach (LoaiPhongDTO lp in listlp)
            {
                tr     = new TreeNode(lp.Maloai);
                tr.Tag = lp.Maloai;
                IList <PhongDTO> listp = pBUS.getListPhongByLoai(lp.Maloai);
                if (listp != null)
                {
                    foreach (PhongDTO p in listp)
                    {
                        TreeNode pt = new TreeNode(p.Maphong);
                        pt.Tag = p.Maphong;
                        tr.Nodes.Add(pt);
                    }
                }
                trvPhong.Nodes.Add(tr);
            }
        }
Ejemplo n.º 2
0
        private void show_Mloai()
        {
            LoaiPhongBUS lpBUS = new LoaiPhongBUS();

            cmbLoaiPhong.DataSource    = lpBUS.getListLoaiPhongAll();
            cmbLoaiPhong.DisplayMember = "Maloai";
            cmbLoaiPhong.ValueMember   = "Maloai";
        }
Ejemplo n.º 3
0
        public void show_cmb_loaiphong()
        {
            lpBUS = new LoaiPhongBUS();
            //cmbTenLoaiPhong.Items.Clear();
            IList <LoaiPhongDTO> listDTO = lpBUS.getListLoaiPhongAll();

            cmbTenLoaiPhong.DataSource    = listDTO;
            cmbTenLoaiPhong.DisplayMember = "Maloai";
            cmbTenLoaiPhong.ValueMember   = "Maloai";
        }
Ejemplo n.º 4
0
        private void Show_loaiphong()
        {
            lpBUS = new LoaiPhongBUS();
            lsvLoaiPhong.Items.Clear();
            IList <LoaiPhongDTO> listpDTO = lpBUS.getListLoaiPhongAll();

            foreach (LoaiPhongDTO read in listpDTO)
            {
                int i = lsvLoaiPhong.Items.Count;
                lsvLoaiPhong.Items.Add(read.Maloai.ToString());
                lsvLoaiPhong.Items[i].SubItems.Add(read.Gia.ToString("0,0"));
                lsvLoaiPhong.Items[i].SubItems.Add(read.Songuoi.ToString());

                //combobox loaiphong
                //cmbTenLoaiPhong.Items.Add(read["tenloai"].ToString());
            }
        }