private void detach_Rooms(Room entity) { this.SendPropertyChanging(); entity.RoomStatus1 = null; }
private void detach_Rooms(Room entity) { this.SendPropertyChanging(); entity.HotelRoomType = null; }
private void attach_Rooms(Room entity) { this.SendPropertyChanging(); entity.RoomStatus1 = this; }
private void attach_Rooms(Room entity) { this.SendPropertyChanging(); entity.HotelRoomType = this; }
partial void DeleteRoom(Room instance);
partial void UpdateRoom(Room instance);
partial void InsertRoom(Room instance);
protected void Room_Add_Click(object sender, EventArgs e) { Label_StatusMsg.Text = ""; try { short RoomTypeID = Convert.ToInt16(ddlRoomTypes.SelectedValue); char Status = Convert.ToChar(ddlStatus.SelectedValue); Room newRoom = new Room { RoomNumbers = TextBox_RoomNumber.Text, RoomDescription = TextBox_Description.Text, RoomBedConfiguration = TextBox_BedConfig.Text, RoomHandicap = CheckBox_Accessible.Checked, RoomSmoking = CheckBox_Smoking.Checked, HotelRoomTypeID = RoomTypeID, RoomStatus = Status }; db.Rooms.InsertOnSubmit(newRoom); db.SubmitChanges(); BindAll(); Label_StatusMsg.Text = "New room added."; MultiView_Rooms.SetActiveView(View_RoomsMain); } catch (Exception ex) { Label_StatusMsg.Text = "Could not add room: "; } }