Esempio n. 1
0
        /// <summary>
        /// 压缩DataTable
        /// </summary>
        /// <param name="mydt">DataTable</param>
        /// <returns></returns>
        public static byte[] DataTableToZip(DataTable mydt)
        {
            DataSet myds = new DataSet();

            myds.Tables.Add(mydt.Copy());
            byte[] mybt = YezhanbafangCore.GetBinaryFormatDataSet(myds);
            return(YezhanbafangCore.CompressData(mybt));
        }
Esempio n. 2
0
 /// <summary>
 /// 压缩DataSet
 /// </summary>
 /// <param name="myds">DateSet</param>
 /// <returns></returns>
 public static byte[] DataSetToZip(DataSet myds)
 {
     byte[] mybys = YezhanbafangCore.GetBinaryFormatDataSet(myds);
     return(YezhanbafangCore.CompressData(mybys));
 }