示例#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);