private void buttonCreate_Click(object sender, EventArgs e)
        {
            MeetingRoom NewRoom = new MeetingRoom();

            NewRoom.RoomCapacity = Convert.ToInt32(textBoxCapacity.Text);
            Db.MeetingRooms.Add(NewRoom);
            Db.SaveChanges();
            MessageBox.Show("Eklendi");
            FillDataGrid();
        }
        private void buttonCreateRes_Click(object sender, EventArgs e)
        {
            Reservation NewRes = new Reservation();

            NewRes.Date          = dateTimePickerReserv.Value.Date;
            NewRes.MeetingRoomID = (int)comboBoxRooms.SelectedItem;
            StateClock(NewRes);
            Db.Reservations.Add(NewRes);
            Db.SaveChanges();
            FillDataGrid();
            FillFlowLayout();
        }
Пример #3
0
        private void BtnCreate_Click(object sender, EventArgs e)
        {
            Participant NewPartic = new Participant();

            NewPartic.MailAdress    = textBoxMailAddress.Text;
            NewPartic.NameSurname   = textBoxNmSrName.Text;
            NewPartic.ParticipantID = textBoxTC.Text;
            NewPartic.PhoneNumber   = textBoxPhoneNumber.Text;
            NewPartic.ReservationID = Convert.ToInt32(comboBoxReservationID.SelectedValue);
            Db.Participants.Add(NewPartic);
            Db.SaveChanges();
            MessageBox.Show("İşlem gerçekleştirildi.");
            FillDataGrid();
        }