Exemplo n.º 1
0
        private void FillgridViewQuestionType()
        {
            DataTable _datatable1 = new DataTable();

            _datatable1 = _baqtype.SelectQuestionType("GETALL");
            gvQuestiobType.DataSource = _datatable1;
            gvQuestiobType.DataBind();
        }
Exemplo n.º 2
0
        private void FillDataGridView()
        {
            _boqtype.Event = "GETALL";
            int       rn     = 0;
            DataTable _table = new DataTable();

            _table = _baqtype.SelectQuestionType(_boqtype);
            dgvQuestionType.Rows.Clear();
            foreach (DataRow row in _table.Rows)
            {
                dgvQuestionType.Rows.Add();
                dgvQuestionType.Rows[rn].Cells[0].Value = Convert.ToString(row["QuestionTypeId"]);
                dgvQuestionType.Rows[rn].Cells[1].Value = Convert.ToString(row["QuestionType"]);
                ++rn;
            }
        }
Exemplo n.º 3
0
        private void BindQuestionTypeCheckboxList()
        {
            BOQuestionType _boqtype    = new BOQuestionType();
            BAQuestionType _baqtype    = new BAQuestionType();
            DataTable      _datatable1 = new DataTable();

            _datatable1 = _baqtype.SelectQuestionType("GETALL");
            foreach (DataRow row in _datatable1.Rows)
            {
                ListItem item = new ListItem();
                item.Text     = row["QuestionType"].ToString();
                item.Value    = row["QuestionTypeId"].ToString();
                item.Selected = Convert.ToBoolean(row["DefaultPermission"]);
                item.Enabled  = !Convert.ToBoolean(row["DefaultPermission"]);
                chkQuestionType.Items.Add(item);
            }
        }