private void SetNode(int tem, string ftype, string incomeinfo, NodeCollection node) { NodeCollection nodes = new NodeCollection(); DataTable dt = BG_PayIncomeLogic.GetDtPayIncome(incomeinfo, ftype, tem); if (dt.Rows.Count > 0) { for (int j = 0; j < dt.Rows.Count; j++) { int piid = common.IntSafeConvert(dt.Rows[j]["PIID"].ToString()); Node nodeN = new Node(); nodeN.NodeID = piid.ToString(); nodeN.Text = dt.Rows[j]["PIEcoSubName"].ToString(); if (!BG_PayIncomeLogic.GetBoolPayIncome(incomeinfo, ftype, piid)) { nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.Leaf = true; //Session["slist"] = listpiid; //node.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //node.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //nodeN.Checked = false; } else { if (SingleNode(piid.ToString()) == 0) { break; } else if (BG_PayIncomeLogic.ISSign(piid)) { nodeN.Leaf = true; nodeN.Icon = Icon.Anchor; node.Add(nodeN); //Session["slist"] = listpiid; } else { nodeN.Icon = Icon.Folder; node.Add(nodeN); } //11 //nodeN.Expanded = true; //nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //CountBaamon = 0; //CountSuppmon = 0; } //SetNode(piid, ftype, incomeinfo, nodeN); //node.Children.Add(nodeN); //SetNode(piid, ftype, incomeinfo, nodeN); } } }
private void SetNode(int tem, NodeCollection node) { NodeCollection nodes = new NodeCollection(); DataTable dt = BG_PayIncomeLogic.GetDtPayIncomeByPIID(tem); int year = common.IntSafeConvert(CurrentYear); int depid = common.IntSafeConvert(HidDepid.Value); DataTable dti = BG_BudItemsLogic.GetBAA(depid, year); if (dt.Rows.Count > 0) { for (int j = 0; j < dt.Rows.Count; j++) { int piid = common.IntSafeConvert(dt.Rows[j]["PIID"].ToString()); Node nodeN = new Node(); nodeN.NodeID = piid.ToString(); nodeN.Text = dt.Rows[j]["PIEcoSubName"].ToString(); string sql = string.Format("PIID='{0}'", piid); DataRow[] dr = dti.Select(sql); decimal Baamon = 0; decimal Suppmon = 0; if (dr.Length > 0) { for (int i = 0; i < dr.Length; i++) { Baamon += ParToDecimal.ParToDel(dr[i]["BAAMon"].ToString()); Suppmon += ParToDecimal.ParToDel(dr[i]["SuppMon"].ToString()); } } if (BG_PayIncomeLogic.GetBoolPayIncomeByPIID(tem)) { if (!BG_PayIncomeLogic.GetBoolPayIncomeByPIID(common.IntSafeConvert(piid))) { nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.Leaf = true; nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", Baamon.ToString(), ParameterMode.Value)); nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", Suppmon.ToString(), ParameterMode.Value)); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } else { if (BG_PayIncomeLogic.GetLever(3)) { nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.Leaf = true; nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", Baamon.ToString(), ParameterMode.Value)); nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", Suppmon.ToString(), ParameterMode.Value)); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } else { nodeN.Icon = Icon.Folder; node.Add(nodeN); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } } // Session["slist"] = listpiid; //node.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //node.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //nodeN.Checked = false; } else { if (SingleNode(piid.ToString()) == 0) { break; } else if (BG_PayIncomeLogic.ISSign(piid)) { nodeN.Leaf = true; nodeN.Icon = Icon.Anchor; node.Add(nodeN); nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", Baamon.ToString(), ParameterMode.Value)); nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", Suppmon.ToString(), ParameterMode.Value)); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); //Session["slist"] = listpiid; } else { nodeN.Icon = Icon.Folder; node.Add(nodeN); listpiid.Add(common.IntSafeConvert(nodeN.NodeID)); SaveListIdStrs(listpiid); } //nodeN.Expanded = true; //nodeN.CustomAttributes.Add(new ConfigItem("BAAMon", CountBaamon.ToString(), ParameterMode.Value)); //nodeN.CustomAttributes.Add(new ConfigItem("SuppMon", CountSuppmon.ToString(), ParameterMode.Value)); //CountBaamon = 0; //CountSuppmon = 0; } //SetNode(piid, ftype, incomeinfo, nodeN); //node.Children.Add(nodeN); //SetNode(piid, ftype, incomeinfo, nodeN); } } }