예제 #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);