using LibraryMangementSystem.Dao;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LibraryMangementSystem.UI
{
    public partial class UI_Home : UserControl
    {
        public UI_Home()
        {
            InitializeComponent();
        }

        private void Load_data(object sender, EventArgs e) {
            string sql = "	SELECT * from Home_Select";
            DaoUtil dao = new DaoUtil();
            IDataReader result = dao.Reader(sql);
            string bookClassCount="1000";
            string bookInfoCount="1000";
            string NoReturnCount="1000";
            if (result.Read())
            {
                bookClassCount=result["bookClassCount"].ToString();
                bookInfoCount = result["bookInfoCount"].ToString();
                NoReturnCount = result["NoReturnCount"].ToString();

            }

            labelbookClassCount.Text = bookClassCount;
            labelbookInfoCount.Text = bookInfoCount;
            labelNoReturnCount.Text = NoReturnCount;
            dao.DaoClose();

        }
    }
}
