Exemplo n.º 1
0
        /// <summary>
        /// 同步的取得DataSet的方法
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        public DataSet GetDataSet_Syn(string sql)
        {
            BllClass bc = WC.CallWebAPI_Syn(sql, "GetDataSet");

            this.Core2Framework(bc);
            byte[] mbs = IoRyClass.StringToBytes(bc.JsonOut);
            return(IoRyClass.RetrieveXmlDataSet(mbs));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 同步的取得DataSet的方法
        /// </summary>
        /// <param name="sql"></param>
        /// <returns></returns>
        public DataSet GetDataSet_Syn(string sql)
        {
            BllClass bc = WC.CallWebAPI_Syn(sql, "GetDataSet");
            //bc.JsonOut = bc.JsonOut.Replace("System.Guid, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e", "System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
            //byte[] mbs = Convert.FromBase64String(bc.JsonOut);
            //byte[] mbs = YezhanbafangCore.StringToBytes(bc.JsonOut);
            //DataSet ds = YezhanbafangCore.RetrieveXmlDataSet(mbs);
            DataSet ds = JsonConvert.DeserializeObject <DataSet>(bc.JsonOut, new Newtonsoft.Json.Converters.DataSetConverter());

            return(ds);
        }