private void cmb_Catalogue_SelectedIndexChanged(object sender, EventArgs e)
{
//dgv_Question.Columns.Clear();
Catalogue catalogue = new Catalogue();
CatalogueBL CatBL = new CatalogueBL();
List<DO.Catalogue> CatList;
CatList = CatBL.GetCatalogue();
if (CatList != null)
for (int i = 0; i < CatList.Count; i++)
{
if (cmb_Catalogue.SelectedItem.ToString() == CatList.ElementAt(i).NameCatalogue)
{
catalogue.IDCatalogue = CatList.ElementAt(i).IDCatalogue;
}
}
QuestionBL QuestionBL = new QuestionBL();
List<DO.Question> QuestionList;
QuestionList = QuestionBL.GetQuestionByCatalogue(catalogue);
if (QuestionList != null)
{
dgv_Question.DataSource = QuestionList;
dgv_Question.Columns["IDCatalogue"].Visible = false;
dgv_Question.Columns["IDQuestion"].Visible = false;
dgv_Question.Columns["AnswerContent"].Visible = false;
dgv_Question.Columns["Catalogue"].Visible = false;
dgv_Question.Columns["NameCatalogue"].Visible = false;
dgv_Question.Columns["Date"].Visible = false;
}
chk_CheckAll.Checked = false;
}