Exemplo n.º 1
0
    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);
            }
        }
    }
Exemplo n.º 2
0
    private void StoreSelectIncomeBind()
    {
        string    an = "财政拨款";
        string    pe = "基本支出";
        DataTable dt = BG_PayIncomeLogic.GetDtPayIncome(pe, an, 1);

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dt.Rows[i]["ISSign"] = dt.Rows[i]["ISSign"] == DBNull.Value ? 0 : (int)dt.Rows[i]["ISSign"];
            dt.Rows[i]["ISSign"] = 0;
        }
        StoreSelectIncome.DataSource = dt;
        StoreSelectIncome.DataBind();
    }
Exemplo n.º 3
0
    //public void SetValue(string AppValue)
    //{
    //    System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument();
    //    SiteMapPath path = new SiteMapPath();
    //    xDoc.Load(Server.MapPath("~/Settings/") + "Settings.xml");

    //    System.Xml.XmlNode xNode;
    //    System.Xml.XmlElement xElem1;
    //    System.Xml.XmlElement xElem2;
    //    xNode = xDoc.SelectSingleNode("//appSettings");

    //    xElem1 = (System.Xml.XmlElement)xNode.SelectSingleNode("//add[@key='" + "Setting']");
    //    if (xElem1 != null)
    //    {
    //        xElem1.SetAttribute("value", AppValue);
    //    }
    //    else
    //    {
    //        xElem2 = xDoc.CreateElement("add");
    //        xElem2.SetAttribute("key", "Setting");
    //        xElem2.SetAttribute("value", AppValue);
    //        xNode.AppendChild(xElem2);
    //    }
    //    xDoc.Save(Server.MapPath("~/Settings/") + "Settings.xml");
    //    //XmlDocument doc = new XmlDocument();
    //    //doc.Load(Server.MapPath("~/Settings/") + "Settings.xml");
    //    //System.Xml.XmlElement xElem1;
    //    //XmlNode tmp = doc.SelectSingleNode("Root/appSettings"); // 查找节点  Root是根
    //    //xElem1 = (System.Xml.XmlElement)tmp.SelectSingleNode("//add[@key='" + AppKey + "']");
    //    //if (tmp != null)
    //    //{
    //    //    tmp.InnerText = AppValue;
    //    //}
    //    //doc.Save(Server.MapPath("~/Settings/") + "Settings.xml");
    //}
    public void StoreSelectIncome_ReadData(object sender, StoreReadDataEventArgs e)
    {
        int tem = 1;
        //string an = cmballocation.SelectedItem.Value;
        //string pe = cmbpayincome.SelectedItem.Value;
        //string an = "财政拨款,其他资金";
        //string pe = "基本支出,项目支出";
        //DataTable dt = BG_PayIncomeLogic.GetDtPayIncome(pe, an, tem);
        DataTable dt = BG_PayIncomeLogic.GetDtPayIncome();

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            dt.Rows[i]["ISSign"] = dt.Rows[i]["ISSign"] == DBNull.Value ? 0 : (int)dt.Rows[i]["ISSign"];
        }
        StoreSelectIncome.DataSource = dt;
        StoreSelectIncome.DataBind();
    }
Exemplo n.º 4
0
    private void SetNode(int tem, string ftype, string incomeinfo, NodeCollection node)
    {
        if (Session["Slist"] != null && Session["Slist"].ToString() != "")
        {
            HidSlist.Text = Session["Slist"].ToString();
        }
        NodeCollection nodes = new NodeCollection();
        DataTable      dt    = BG_PayIncomeLogic.GetDtPayIncome(incomeinfo, ftype, 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.GetBoolPayIncome(incomeinfo, ftype, 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);
                    //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);
                    }
                    //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);
            }
        }
    }