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(); }
private void detach_Borrows(Borrow entity) { this.SendPropertyChanging(); entity.Book = null; }
private void attach_Borrows(Borrow entity) { this.SendPropertyChanging(); entity.Book = this; }
partial void DeleteBorrow(Borrow instance);
partial void UpdateBorrow(Borrow instance);
partial void InsertBorrow(Borrow instance);