private void init() { BO_CHUNG_CHI chungchi = new BO_CHUNG_CHI(); DataTable tbl_chungchi = chungchi.getChungChi_All(); if (tbl_chungchi.Rows.Count > 0) { for (int i = 0; i < tbl_chungchi.Rows.Count; i++) { TreeNode node = new TreeNode(); node.Text = tbl_chungchi.Rows[i]["CHC_Name"].ToString(); node.Tag = "CHC"; node.Name = tbl_chungchi.Rows[i]["CHC_ID"].ToString(); treeChungchi.Nodes.Add(node); DateTime fromDates = dateFrom.DateTime; DateTime endDates = dateEnd.DateTime; BO_LOP lop = new BO_LOP(); DataTable tbl_lop = lop.getLopByChungChiIDFromTo(Convert.ToInt32(node.Name), fromDates, endDates); if (tbl_lop.Rows.Count > 0) { for (int j = 0; j < tbl_lop.Rows.Count; j++) { TreeNode childNode = new TreeNode(); childNode.Text = tbl_lop.Rows[j]["LOP_Name"].ToString(); childNode.Tag = "LOP"; childNode.Name = tbl_lop.Rows[j]["LOP_ID"].ToString();// +" KHÓA " + tbl_lop.Rows[j]["LOP_Khoa"].ToString(); node.Nodes.Add(childNode); } } } } }