Exemplo n.º 1
0
        /// <summary>
        /// 带参数的文本
        /// </summary>
        /// <param name="cmdText"></param>
        /// <param name="spr"></param>
        /// <returns></returns>
        public static List <Dictionary <string, object> > ExecuteReader(string cmdText, List <SqlParameter> spr)
        {
            List <Dictionary <string, object> > resDics = new List <Dictionary <string, object> >();
            var connDics = new ConnectionHelper().GetOrgConnDic();

            foreach (var dic in connDics)
            {
                Dictionary <string, object> resDic = new Dictionary <string, object>();
                resDic["code"] = dic["code"];
                resDic["name"] = dic["name"];

                ISqlHelper sqlHelper = SqlConvertHelper.GetInstallSqlHelper(dic["connectionstring"]);
                resDic["data"] = sqlHelper.ExecuteReaderPro(cmdText);

                resDics.Add(resDic);
            }
            return(resDics);
        }