コード例 #1
0
        private void btnXepLichThi_Click(object sender, EventArgs e)
        {
            List <VerticeEntity> ListVertice = DsMonThi();

            new Algorithm().Run(ListVertice, TimeEntity.GetAll);
            XuLyDataGridView.ShowData(ListVertice, grwDanhSach, "NGÀY", "GIỜ THI");
        }
コード例 #2
0
        private void btnLoadFile_Click(object sender, EventArgs e)
        {
            DialogResult rs = openFileDialog.ShowDialog();

            try
            {
                if (rs == DialogResult.OK)
                {
                    grwDanhSach.Columns.Clear();
                    DataTable dt = Excel.Import(openFileDialog.FileName);
                    grwDanhSach.DataSource = dt;
                    grwDanhSach.Visible    = true;
                    DataGridViewComboBoxColumn objCol = XuLyDataGridView.CreateComboboxColumn("BẬC HỌC", XuLyXml.DocDsBacHoc());
                    grwDanhSach.Columns.Insert(3, objCol);
                    DataGridViewCheckBoxColumn objChe = XuLyDataGridView.CreateCheckBoxColumn("THI PHÒNG MÁY");
                    grwDanhSach.Columns.Insert(4, objChe);
                    grwDanhSach.Columns.RemoveAt(11);
                    DataGridViewTextBoxColumn objtex = XuLyDataGridView.CreateTextboxColumn("PHÒNG THI");
                    grwDanhSach.Columns.Insert(11, objtex);
                    DataGridViewButtonColumn objbot = XuLyDataGridView.CreateButtonColumn("THÊM");
                    grwDanhSach.Columns.Insert(12, objbot);
                    FormatColumn();
                    btnXepLichThi.Enabled = btnXuatExcel.Enabled = btnInKetQua.Enabled = true;
                }
            }
            catch (Exception)
            {
            }
        }
コード例 #3
0
ファイル: frmFormMain.cs プロジェクト: mainam/XLT
        private void btnXepLichThi_Click(object sender, EventArgs e)
        {
            LenLichThi llt = new LenLichThi(DsMonThi(), GioThi.GetAll);

            if (llt.ThucHien())
            {
                XuLyDataGridView.ShowData(llt.DsMonThiDaXep, grwDanhSach, "NGÀY", "GIỜ THI");
            }
        }
コード例 #4
0
        private void btnChonNhom_Click(object sender, EventArgs e)
        {
            DataTable   kq  = XuLyDataGridView.GetTable(new string[] { "MÃ HP", "TÊN HỌC PHẦN", "LỚP", "NHÓM" }, (DataTable)grwDanhSach.DataSource);
            frmChonNhom fcn = new frmChonNhom(kq);

            if (fcn.ShowDialog() == DialogResult.OK)
            {
                XuLyDataGridView.ShowData(fcn.dgrDanhSach, grwDanhSach, "NHÓM", "NHÓM");
                btnChonPhong.Enabled = btnXepLichThi.Enabled = true;
            }
        }
コード例 #5
0
        public frmChonNhom(DataGridView sou)
        {
            InitializeComponent();
            dgrDanhSach.DataSource = source = sou;
            DataGridViewButtonColumn objbot = XuLyDataGridView.CreateButtonColumn("CHỌN");

            dgrDanhSach.Columns.Insert(5, objbot);
            dgrDanhSach.Columns[0].Width        = 40;
            dgrDanhSach.Columns[6].Width        = 50;
            dgrDanhSach.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
        }
コード例 #6
0
        private void btnChonPhong_Click(object sender, EventArgs e)
        {
            DataTable kq = XuLyDataGridView.GetTable(new string[] { "MÃ HP", "TÊN HỌC PHẦN", "SỐ SV", "HT THI", "PHÒNG" }, (DataTable)grwDanhSach.DataSource);

            MonXepPhong(kq);
            frmChonPhong fcp = new frmChonPhong(kq);

            if (fcp.ShowDialog() == DialogResult.OK)
            {
                XuLyDataGridView.ShowData(fcp.dgrDanhSach, grwDanhSach, "PHÒNG", "PHÒNG");
            }
        }
コード例 #7
0
ファイル: frmChonPhong.cs プロジェクト: mainam/XLT
        public frmChonPhong(DataTable source)
        {
            InitializeComponent();
            dgrDanhSach.DataSource = source;
            XuLyDataGridView.ReadOnly(dgrDanhSach);
            DataGridViewButtonColumn objbot = XuLyDataGridView.CreateButtonColumn("CHỌN");

            dgrDanhSach.Columns.Insert(6, objbot);
            dgrDanhSach.Columns[0].Width        = 40;
            dgrDanhSach.Columns[6].Width        = 50;
            dgrDanhSach.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
        }
コード例 #8
0
ファイル: frmFormMain.cs プロジェクト: mainam/XLT
        private void btnLoadFile_Click(object sender, EventArgs e)
        {
            DialogResult rs = openFileDialog.ShowDialog();

            try
            {
                if (rs == DialogResult.OK)
                {
                    XuLyDataGridView.LoadData(grwDanhSach, openFileDialog.FileName);
                    grwDanhSach.Columns[2].Width = 300;
                    btnChonNhom.Enabled          = btnXuatExcel.Enabled = btnInKetQua.Enabled = true;
                    btnChonPhong.Enabled         = btnXepLichThi.Enabled = false;
                    ShowStatus("Load Dữ Liệu Thành Công");
                }
            }
            catch (Exception)
            {
                BatLoi.ThongBao2("Lỗi! Không thể load dữ liệu từ file đã chọn");
            }
        }