Exemplo n.º 1
0
        public List <string> ReadKeyValues(string section)
        {
            List <string> list   = new List <string>();
            string        ls_sql = "select itemname,itemvalue from mysysset where itemtype='" + section + "'";

            DataTable ldt = new DataTable();

            ldt = MyConfig.ExecuteDataTable(ls_sql);
            string temp, itemname, itemvalue;

            for (int i = 0; i < ldt.Rows.Count; i++)
            {
                itemname  = ldt.Rows[i]["itemName"] == null ? "" : ldt.Rows[i]["itemName"].ToString();
                itemvalue = ldt.Rows[i]["itemvalue"] == null ? "" : ldt.Rows[i]["itemvalue"].ToString();

                temp = itemname + "=" + itemvalue;

                list.Add(temp);
            }
            return(list);
        }