Exemplo n.º 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();
        }
Exemplo n.º 2
0
 private void detach_Borrows(Borrow entity)
 {
     this.SendPropertyChanging();
     entity.Book = null;
 }
Exemplo n.º 3
0
 private void attach_Borrows(Borrow entity)
 {
     this.SendPropertyChanging();
     entity.Book = this;
 }
Exemplo n.º 4
0
 partial void DeleteBorrow(Borrow instance);
Exemplo n.º 5
0
 partial void UpdateBorrow(Borrow instance);
Exemplo n.º 6
0
 partial void InsertBorrow(Borrow instance);