private void buttonAddBookType_Click(object sender, EventArgs e)
        {
            BookType bookType = new BookType();

            bookType.Name        = textNameSurname.Text;
            bookType.Explanation = textExplanation.Text;
            context.BookTypes.InsertOnSubmit(bookType);
            context.SubmitChanges();

            gridBookTypeFill();
            textClear();
            MessageBox.Show("Kitap Türü Başarıyla Eklendi");
        }
Ejemplo n.º 2
0
        private void buttonAddWriter_Click(object sender, EventArgs e)
        {
            Writer writer = new Writer();

            writer.NameSurname = textNameSurname.Text;
            writer.Biography   = textBiography.Text;
            writer.BirthDate   = dateTimeBirthDate.Value;
            context.Writers.InsertOnSubmit(writer);
            context.SubmitChanges();

            gridWriterFill();
            textClear();
            MessageBox.Show("Yazar Başarıyla Eklendi");
        }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
0
        private void buttonAddMember_Click(object sender, EventArgs e)
        {
            Member member = new Member();

            member.SSN                 = textSSN.Text;
            member.NameSurname         = textNameSurname.Text;
            member.EMail               = textEMail.Text;
            member.BirthPlace          = textBirthPlace.Text;
            member.BirthDate           = dateTimeBirthDate.Value;
            member.Adress              = textAddress.Text;
            member.MembershipStartDate = dateTimeMembershipStart.Value;
            context.Members.InsertOnSubmit(member);
            context.SubmitChanges();

            gridMemberFill();
            textClear();
            MessageBox.Show("Okuyucu Başarıyla Eklendi");
        }
        private void buttonAddBook_Click(object sender, EventArgs e)
        {
            Book book = new Book();

            book.ISBN       = textISBN.Text;
            book.Name       = textBookName.Text;
            book.Publisher  = textPublisher.Text;
            book.Summary    = textSummary.Text;
            book.Price      = float.Parse(textPrice.Text);
            book.PageNumber = int.Parse(textPageNumber.Text);
            book.TypeId     = ((KeyValuePair <int, string>)comboBoxBookTypeName.SelectedItem).Key;
            book.WriterId   = ((KeyValuePair <int, string>)comboBoxWriterName.SelectedItem).Key;
            context.Books.InsertOnSubmit(book);
            context.SubmitChanges();

            gridBookFill();
            textClear();
            MessageBox.Show("Kitap Başarıyla Eklendi");
        }