public frmContractRoomEditor(Models.Hotel h) { MyInitialize(); _hotel = h; _room = new Models.ContractRoom { HotelId = h.HotelId }; }
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(); }
public void Delete(ContractRoom r) { entities.ContractRooms.Remove(r); }
public void Add(ContractRoom r) { entities.ContractRooms.Add(r); }
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; }