public UserControlRoom(sp_SearchAvailableRoom_Result room, BindingList <KhachHang> list)
 {
     InitializeComponent();
     //BindingList<Country> listCountry = new BindingList<Country>();
     //listCountry.Add(new Country("germany", "1"));
     //listCountry.Add(new Country("england", "2"));
     this.room               = room;
     this.max                = Helper.calculateRoomCapacity((int)room.HinhThuc);
     comboBox1.DataSource    = list;
     comboBox1.DisplayMember = "HoTen";
     comboBox1.ValueMember   = "CMND";
     checkRoomStatus();
     this.labelRoomId.Text = room.MaPhong;
     updateGuestCountLabel();
 }
示例#2
0
        public sp_SearchAvailableRoom_Result createPhongSearch(int id, String maPhong, String viTriTang, int hang, int donGia, int hinhThuc, int trangThai, String ngayBatDau, String ngayKetThuc)
        {
            sp_SearchAvailableRoom_Result p = new sp_SearchAvailableRoom_Result();

            p.ID          = id;
            p.MaPhong     = maPhong;
            p.ViTriTang   = viTriTang;
            p.Hang        = hang;
            p.DonGia      = donGia;
            p.HinhThuc    = hinhThuc;
            p.TrangThai   = trangThai;
            p.ngayBatDau  = ngayBatDau;
            p.ngayKetThuc = ngayKetThuc;

            return(p);
        }