Ejemplo n.º 1
0
 public static FORMReturnBooks  Instance()
 {
     if (sForm == null)
     {
         sForm = new FORMReturnBooks();
     }
     return(sForm);
 }
Ejemplo n.º 2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (components != null)
         {
             components.Dispose();
         }
     }
     base.Dispose(disposing);
     sForm = null;
 }
Ejemplo n.º 3
0
        private void FORMReturnBooks_Load(object sender, System.EventArgs e)
        {
            //Set Images
            setImages();

            //Set the Data Adapter
            daReturnedList = 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 tblBooks.BookNo, tblBooks.BookTitle, tblBarrowers.BarrowerID, [LastName] & ', ' & [FirstName] & ' ' & [MiddleName] AS Fullname, tblBarrowed.DateBarrowed, tblBarrowed.DateDue, tblBarrowed.DateRetured, tblCategory.CategoryName, tblLevel.LevelName, [YearStart] & ' - ' & [YearEnd] AS SY FROM (tblSchoolYear RIGHT JOIN (tblLevel RIGHT JOIN tblBarrowers ON tblLevel.IndexLevel = tblBarrowers.LevelIndex) ON tblSchoolYear.IndexSY = tblBarrowers.SchoolYear) RIGHT JOIN (tblCategory INNER JOIN (tblBooks INNER JOIN tblBarrowed ON tblBooks.BookNo = tblBarrowed.BookNo) ON tblCategory.IndexCategory = tblBooks.CategoryIndex) ON tblBarrowers.BarrowerID = tblBarrowed.BarrowerID WHERE [YearStart] & ' - ' & [YearEnd] LIKE '" + cbYear.Text + "' AND tblLevel.LevelName LIKE '" + cbLevel.Text + "' AND (tblBarrowed.Returned)=Yes ORDER BY tblBooks.BookNo ASC");

            publicReturnedList = this;
        }