//protected void BindTreeView() //{ // BLL.CourseSystem bll = new BLL.CourseSystem(); // List<Model.CourseSystem> list = new List<Model.CourseSystem>(); // list = bll.GetList(); // try // { // if (list[0].Up == 0) // { // TreeNode tn = new TreeNode(); // tn.Text = list[0].Name; // tn.Value = list[0].CourseLbID.ToString(); // TreeView1.Nodes.Add(tn); // CreateChildNode(tn); // } // } // catch // { // lb_Msg.Text = "没有内容!"; // } //} protected void BindTreeView() { BLL.CourseSystem bll = new BLL.CourseSystem(); List <Model.CourseSystem> list = new List <Model.CourseSystem>(); list = bll.GetList(); try { foreach (var item in list) { if (item.Up == 0) { TreeNode tn = new TreeNode(); tn.Text = item.Name; tn.Value = item.CourseLbID.ToString(); TreeView1.Nodes.Add(tn); CreateChildNode(tn); } } } catch { lb_Msg.Text = "没有内容!"; } }
private string getCourseLbName(int CourseLbID) { BLL.CourseSystem bll = new BLL.CourseSystem(); List <Model.CourseSystem> list = new List <Model.CourseSystem>(); list = bll.GetList(CourseLbID); return(list[0].Name); }
public void gv01_Bind(string CourseLbID) { str_returnValue = lb_wen.Text; BLL.CourseSystem bll = new BLL.CourseSystem(); List <Model.CourseSystem> list = new List <Model.CourseSystem>(); string Sort = ViewState["SortOrder"].ToString() + " " + ViewState["OrderDire"].ToString(); lb_Title.Text = "管理体系为:[" + getCourseLbName(int.Parse(CourseLbID)) + "]的课程"; list = bll.GetList(1, 10000, int.Parse(CourseLbID)); gv_01.DataSource = list; gv_01.DataBind(); }
private void CreateChildNode(TreeNode t) { BLL.CourseSystem bll = new BLL.CourseSystem(); List <Model.CourseSystem> list = new List <Model.CourseSystem>(); list = bll.GetList(); for (int i = 1; i < list.Count; i++) { if (list[i].Up.ToString() == t.Value.ToString()) { TreeNode tn2 = new TreeNode(); tn2.Text = list[i].Name + "(<span style='color:Red'>" + list[i].CourseCount + "</span>)"; tn2.Value = list[i].CourseLbID.ToString(); t.ChildNodes.Add(tn2); CreateChildNode(tn2); } } }
private void BindTreeView() { BLL.CourseSystem bll = new BLL.CourseSystem(); List <Model.CourseSystem> list = new List <Model.CourseSystem>(); list = bll.GetList(); try { TreeNode tn = new TreeNode(); tn.Text = list[0].Name + "(<span style='color:Red'>" + list[0].CourseCount + "</span>)"; tn.Value = list[0].CourseLbID.ToString(); TreeView1.Nodes.Add(tn); CreateChildNode(tn); } catch { lb_Msg.Text = "没有内容!"; } }
protected void CreateChildNode(TreeNode t) { BLL.CourseSystem bll = new BLL.CourseSystem(); List <Model.CourseSystem> list = new List <Model.CourseSystem>(); list = bll.GetList(); for (int i = 1; i < list.Count; i++) { if (list[i].Up.ToString() == t.Value.ToString()) { TreeNode tn2 = new TreeNode(); tn2.Text = list[i].Name; tn2.Value = list[i].CourseLbID.ToString(); t.ChildNodes.Add(tn2); CreateChildNode(tn2); TreeView1.ShowLines = true; TreeView1.CssClass = "text_12px"; } } }
private void gv01_Bind() { div_Navigation.Visible = true;; int LbID = int.Parse(TreeView1.SelectedValue.ToString()); BLL.CourseSystem bll = new BLL.CourseSystem(); List <Model.CourseSystem> list = new List <Model.CourseSystem>(); if (ViewState["PageCount"] == null) { ViewState["PageCount"] = 1; } list = bll.GetList(Convert.ToInt32(ViewState["PageCount"]), PageSize, LbID); gv01.DataSource = list; gv01.DataBind(); if (list.Count > 0) { Total = list[0].RowTotal; labAlert.Visible = false; } else { labAlert.Visible = true; labAlert.Text = "没有任何资料!"; } PageCount(); Page_Status(); TitleType = Request.QueryString["TitleType"]; BigClass = Request.QueryString["BigClass"]; //if (BigClass == "题库管理") //{ // URL = "I-B/List"; //} //else //{ // if (BigClass == "试卷制作") // { // URL = "P-P/Add"; // } // else // { // if (BigClass == "试卷管理") // { // URL = "P-M/List"; // } // else // { // if (BigClass == "成绩管理") // { // URL = "R-M/List"; // } // else // { // //URL = "PaperManagement/List.aspx?TitleType="; // } // } // } //} if (BigClass == "题库管理") { URL = "ItemBankManagement/List.aspx?TitleType="; } else { if (BigClass == "试卷制作") { URL = "PaperProduction/Add_test.aspx?TitleType="; } else { if (BigClass == "试卷管理") { URL = "PaperManagement/List.aspx?TitleType="; } else { if (BigClass == "成绩管理") { URL = "ResultsManagement/List.aspx?TitleType="; } else { //URL = "PaperManagement/List.aspx?TitleType="; } } } } URL = URL + TitleType; }