public frmContractRoomEditor(Models.Hotel h)
 {
     MyInitialize();
     _hotel = h;
     _room  = new Models.ContractRoom {
         HotelId = h.HotelId
     };
 }
Beispiel #2
0
        private void btnMatch_Click(object sender, EventArgs e)
        {
            if (cmbAvailableRoomTypes.SelectedItem == null || cmbAvailableRoomTypes.SelectedIndex == -1)
            {
                MessageBox.Show("Please select a matched room type");
                return;
            }
            var rbo = new BO.ContractRoomBO();

            _r          = rbo.GetRoom(_r.RoomId);
            _r.RoomName = cmbAvailableRoomTypes.SelectedItem as string;
            rbo.Save();
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Beispiel #3
0
 public void Delete(ContractRoom r)
 {
     entities.ContractRooms.Remove(r);
 }
Beispiel #4
0
 public void Add(ContractRoom r)
 {
     entities.ContractRooms.Add(r);
 }
Beispiel #5
0
 public frmRoomTypeReMatch(Models.ContractRoom r, List <string> availRoomTypes)
 {
     InitializeComponent();
     _r          = r;
     _availRooms = availRoomTypes;
 }
 public frmContractRoomEditor(Models.ContractRoom r)
 {
     MyInitialize();
     _room  = crbo.GetRoom(r.RoomId);
     _hotel = _room.Hotel;
 }