Example #1
0
        public static FORMBooks  Instance()
        {
            if (sForm == null)
            {
                sForm = new FORMBooks();
            }

            return(sForm);
        }
Example #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose(disposing);
     sForm = null;
 }
Example #3
0
        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();
        }