// insert method, when called (from the insert form) takes in the books // details and sets them to the corresponding fields of a book object // the book is then inserted into the database // public void bookInsert(string title, string author, string year, string avail) { Book BookIn = new Book(); BookIn.Title = title; BookIn.Author = author; BookIn.Year = year; BookIn.Available = avail; Lib_Data.Books.InsertOnSubmit(BookIn); Lib_Data.SubmitChanges(); // connect button click is called to refresh the datagrid // connectToolStripMenuItem_Click(null, null); }
partial void DeleteBook(Book instance);
partial void UpdateBook(Book instance);
partial void InsertBook(Book instance);