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(); }
//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(); }