Пример #1
0
        private void buttonAddBorrow_Click(object sender, EventArgs e)
        {
            Borrow borrow = new Borrow();

            borrow.MemberId            = ((KeyValuePair <int, string>)comboBoxMemberNames.SelectedItem).Key;
            borrow.BookId              = ((KeyValuePair <int, string>)comboBoxBookNames.SelectedItem).Key;
            borrow.BorrowDate          = dateTimeBorrow.Value;
            borrow.EstimatedReturnDate = dateTimeEstimatedReturn.Value;
            borrow.ReturnDate          = dateTimeReturn.Value;
            context.Borrows.InsertOnSubmit(borrow);
            context.SubmitChanges();

            MessageBox.Show("Emanet Başarıyla Eklendi");
            gridBorrowFill();
            textClear();
        }
Пример #2
0
 private void detach_Borrows(Borrow entity)
 {
     this.SendPropertyChanging();
     entity.Book = null;
 }
Пример #3
0
 private void attach_Borrows(Borrow entity)
 {
     this.SendPropertyChanging();
     entity.Book = this;
 }
Пример #4
0
 partial void DeleteBorrow(Borrow instance);
Пример #5
0
 partial void UpdateBorrow(Borrow instance);
Пример #6
0
 partial void InsertBorrow(Borrow instance);