public ucThongBaoDongHoaDon()
        {
            InitializeComponent();
            notify = new NotifyIcon();
            LoadMatrix();
            DateTime       dt       = DateTime.Now;
            DateTime       dateTime = dt.AddDays(1);
            HopDongDao     hd       = new HopDongDao();
            List <HopDong> result   = hd.LoadThongBaoHopDong(dateTime);

            if (result == null)
            {
                return;
            }
            List <ThongBaoHopDong> today = new List <ThongBaoHopDong>();

            foreach (var item in result)
            {
                ThongBaoHopDong thongBaoHopDong = new ThongBaoHopDong(item);
                today.Add(thongBaoHopDong);
            }

            notifyIcon.ShowBalloonTip(10000, "Lịch Công Việc", string.Format("Bạn có {0} thông báo hợp đồng vào ngày mai", today.Count), ToolTipIcon.Info);
            XtraMessageBox.Show("Bạn có " + today.Count + " thông báo đóng hợp đồng vào ngày mai", "Thông báo");
            //timerNotify.Start();
        }
 public ucThongBaoHopDong(ThongBaoHopDong thongBaoHopDong)
 {
     InitializeComponent();
     txtMaKH.Text         = thongBaoHopDong.MaKH;
     txtTenKH.Text        = thongBaoHopDong.TenKH;
     txtMaGoiHopDong.Text = thongBaoHopDong.MaGoiHD;
     txtMucPhi.Text       = thongBaoHopDong.MucPhi.ToString();
 }
        public ThongBaoHopDongForm(DateTime dateTime)
        {
            InitializeComponent();
            FlowLayoutPanel f = new FlowLayoutPanel();

            f.Width  = panel1.Width;
            f.Height = panel1.Height;
            panel1.Controls.Add(f);
            f.AutoScroll    = true;
            f.WrapContents  = false;
            f.FlowDirection = FlowDirection.TopDown;
            HopDongDao hd = new HopDongDao();

            foreach (var item in hd.LoadThongBaoHopDong(dateTime))
            {
                ThongBaoHopDong   tb = new ThongBaoHopDong(item);
                ucThongBaoHopDong ucThongBaoHopDong = new ucThongBaoHopDong(tb);
                f.Controls.Add(ucThongBaoHopDong);
            }
        }
        public ucThongBaoDongHoaDon()
        {
            InitializeComponent();
            notify = new NotifyIcon();
            LoadMatrix();
            DateTime       dt     = DateTime.Now;
            HopDongDao     hd     = new HopDongDao();
            List <HopDong> result = hd.LoadThongBaoHopDong(dt);

            if (result == null)
            {
                return;
            }
            List <ThongBaoHopDong> today = new List <ThongBaoHopDong>();

            foreach (var item in result)
            {
                ThongBaoHopDong thongBaoHopDong = new ThongBaoHopDong(item);
                today.Add(thongBaoHopDong);
            }

            notifyIcon.ShowBalloonTip(10000, "Lịch Công Việc", string.Format("Bạn có {0} thông báo hợp đồng trong ngày hôm nay", today.Count), ToolTipIcon.Info);
            //timerNotify.Start();
        }