Пример #1
0
        public static FORMDueBooks  Instance()
        {
            if (sForm == null)
            {
                sForm = new FORMDueBooks();
            }

            return(sForm);
        }
Пример #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose(disposing);
     sForm = null;
 }
Пример #3
0
        private void FORMDueBooks_Load(object sender, System.EventArgs e)
        {
            //Set Images
            setImages();

            //Set the Data Adapter
            daDueBooksList = new OleDbDataAdapter("", clsConnections.CN);

            //Set the Combo Box
            sFunctions.FillCombo(cbYear, "SELECT tblSchoolYear.IndexSY, [YearStart] & ' - ' & [YearEnd] AS SY FROM tblSchoolYear ORDER BY [YearStart] & ' - ' & [YearEnd] ASC", "tblSchoolYear", 1);
            sFunctions.FillCombo(cbLevel, "SELECT * FROM tblLevel ORDER BY LevelName ASC", "tblLevel", 1);

            //Set the Tab Control
            setTabControl();

            //Load List of Barrowed Books
            loadBarrowed("SELECT tblBarrowed.BookNo, tblBooks.BookTitle, tblBarrowers.BarrowerID, [LastName] & ', ' & [FirstName] & ' ' & [MiddleName] AS Fullname, tblBarrowed.DateBarrowed, tblBarrowed.DateDue, tblBarrowed.Returned, tblCategory.CategoryName, tblLevel.LevelName, [YearStart] & ' - ' & [YearEnd] AS SY FROM tblSchoolYear RIGHT JOIN (tblLevel RIGHT JOIN (tblCategory INNER JOIN (tblBooks INNER JOIN (tblBarrowers RIGHT JOIN tblBarrowed ON tblBarrowers.BarrowerID = tblBarrowed.BarrowerID) ON tblBooks.BookNo = tblBarrowed.BookNo) ON tblCategory.IndexCategory = tblBooks.CategoryIndex) ON tblLevel.IndexLevel = tblBarrowers.LevelIndex) ON tblSchoolYear.IndexSY = tblBarrowers.SchoolYear WHERE (((tblBarrowed.DateDue)<=Now()) AND ((tblBarrowed.Returned)=No)) AND  [YearStart] & ' - ' & [YearEnd] LIKE '" + cbYear.Text + "' AND tblLevel.LevelName LIKE '" + cbLevel.Text + "' ORDER BY tblBarrowed.BookNo ASC");

            publicDueBooksList = this;
        }