private void panelMain_SizeChanged(object sender, EventArgs e)
        {
            panelMain.Controls.Clear();
            List <BanVe> danhSachBanVe = BS_BanVe.DanhSachBanVe();
            int          y = 0, i = 1;

            foreach (BanVe value in danhSachBanVe)
            {
                UserControl_BanVe controlBanVe = new UserControl_BanVe(value.TenBanVe, value.NgayChinhSua, i);
                controlBanVe.Width    = panelMain.Width;
                controlBanVe.Location = new Point(0, y);
                controlDanhSachBanVe.Add(controlBanVe);
                panelMain.Controls.Add(controlBanVe);
                y += 30; i++;
            }
            foreach (UserControl_BanVe value in controlDanhSachBanVe)
            {
                value.LinkLabelBanVe.Click += new System.EventHandler(controlDanhSachBanVe_Click);
            }
        }
예제 #2
0
 private void buttonPrint_Click(object sender, EventArgs e)
 {
     BS_Main.PrintData <BanVe>(BS_BanVe.DanhSachBanVe());
 }
예제 #3
0
        private void HienThiDuLieu_BanVe()
        {
            List <BanVe> dsBanVe = BS_BanVe.DanhSachBanVe();

            gridControlMain.DataSource = dsBanVe;
        }
예제 #4
0
 private void buttonExport_Click(object sender, EventArgs e)
 {
     BS_Main.ExcelExport <BanVe>(BS_BanVe.DanhSachBanVe());
 }