private void tspDeleteProNameList_Click(object sender, EventArgs e) { if (this.lvProNameList.SelectedItems.Count > 0) { string ProName = this.lvProNameList.SelectedItems[0].Text; ProjectBLL bll = new ProjectBLL(); bll.Delete_ProNameList(ProName); AnalyResultBLL analyResultBLL = new AnalyResultBLL(); analyResultBLL.Delete_Result(ProName); NodeBLL nodeBLL = new NodeBLL(); nodeBLL.Delete_ProName(ProName); ParticipantBLL participantBLL = new ParticipantBLL(); participantBLL.Delete_ProName(ProName); SelectedPramasBLL selectedPramasBLL = new SelectedPramasBLL(); selectedPramasBLL.Delete_ProName(ProName); ProNameDataBind(); } else { this.Close(); } }
/// <summary> /// 创建TreeView /// </summary> private void CreateTree() { TreeNode root = new TreeNode(); root.Text = InitialInterface.ProName; trvUcAnaly.Nodes.Add(root); SelectedPramasBLL spbll = new SelectedPramasBLL(); IntroducerBLL ibll = new IntroducerBLL(); NodeBLL nbll = new NodeBLL(); List <Node> nodelist = nbll.Get_NodeList(InitialInterface.ProName); List <SelectedPramas> sp = spbll.Get_SelectedPramasList(InitialInterface.ProName); if (nodelist != null) { for (int i = 0; i < nodelist.Count; i++) { TreeNode node1 = new TreeNode(); node1.Text = nodelist[i].NodeName; node1.Tag = nodelist[i].NodeId; root.Nodes.Add(node1); if (sp != null) { for (int j = 0; j < sp.Count; j++) { TreeNode node2 = new TreeNode(); node2.Text = sp[j].PramasText; node2.Tag = sp[j].PramasId; node1.Nodes.Add(node2); List <HOZAPModel.Introducer> Introducerlist = ibll.Get_IntroducerList(sp[j].PramasId); for (int k = 0; k < Introducerlist.Count; k++) { TreeNode node3 = new TreeNode(); node3.Text = Introducerlist[k].IntroducerText; node3.Tag = Introducerlist[k].IntroducerId; node2.Nodes.Add(node3); } } } } this.trvUcAnaly.Nodes[0].Expand(); } }