コード例 #1
0
        private void FillDataGridView()
        {
            _boexmmng.Event = "GETALL";
            _boexmmnglist   = _baexmmng.SelectExamManageList(_boexmmng);
            int       tmp    = 0;
            DataTable _table = new DataTable();

            _table = Common.LINQToDataTable(_boexmmnglist);
            dgvExamManage.Rows.Clear();
            foreach (DataRow row in _table.Rows)
            {
                dgvExamManage.Rows.Add();
                dgvExamManage.Rows[tmp].Cells[0].Value = Convert.ToString(row["ExamCodeId"]);
                dgvExamManage.Rows[tmp].Cells[1].Value = Convert.ToString(row["ExamCode"]);
                dgvExamManage.Rows[tmp].Cells[2].Value = Convert.ToString(row["SecondCategory"]);
                dgvExamManage.Rows[tmp].Cells[3].Value = Convert.ToString(row["MerchantName"]);
                dgvExamManage.Rows[tmp].Cells[4].Value = Convert.ToString(row["Level"]);
                if (Convert.ToBoolean(row["IsActive"]))
                {
                    dgvExamManage.Rows[tmp].Cells[6].Value = "Activated";
                }
                else
                {
                    dgvExamManage.Rows[tmp].Cells[6].Value = "Inactivated";
                }
                dgvExamManage.Rows[tmp].Cells[5].Value = Convert.ToString(row["IsActive"]);
                tmp++;
            }
        }
コード例 #2
0
        private void FillgridViewExamDetail()
        {
            DataTable _datatable1 = new DataTable();

            _datatable1             = _baexmmng.SelectExamManageList("GETALL");
            gvExamDetail.DataSource = _datatable1;
            gvExamDetail.DataBind();
        }