public static FORMBooks Instance() { if (sForm == null) { sForm = new FORMBooks(); } return(sForm); }
protected override void Dispose(bool disposing) { if (disposing) { if (components != null) { components.Dispose(); } } base.Dispose(disposing); sForm = null; }
private void FORMBooks_Load(object sender, System.EventArgs e) { //Set Images setImages(); //Set the Data Adapter daBooksList = new OleDbDataAdapter("", clsConnections.CN); setTabControl(); loadBooks("SELECT tblCategory.CategoryName, tblBooks.BookNo, tblBooks.ISBN, tblBooks.Author, tblBooks.BookTitle, tblBooks.YearPublished, tblBooks.DateArrived, tblBooks.Price, tblBooks.Qty, tblBooks.Barrowed, ([Qty])-([Barrowed]) AS Available FROM tblCategory RIGHT JOIN tblBooks ON tblCategory.IndexCategory = tblBooks.CategoryIndex ORDER BY tblBooks.BookNo ASC"); publicBooksList = this; this.Refresh(); }