示例#1
0
文件: AllcodeAS.cs 项目: dangtq72/BDS
        public byte[] AllCode_Gets()
        {
            try
            {
                byte[]    byteReturn;
                AllCodeDA objAllCodeDA = new AllCodeDA();
                DataSet   ds           = objAllCodeDA.AllCode_Gets();

                byteReturn = CompressionHelper.CompressDataSet(ds);
                return(byteReturn);
            }
            catch (Exception ex)
            {
                ErrorLog.log.Error(ex.ToString());
                return(new byte[0]);
            }
        }
示例#2
0
文件: AllcodeAS.cs 项目: dangtq72/BDS
        static bool Check_Connect_DataBase()
        {
            try
            {
                AllCodeDA objAllCodeDA = new AllCodeDA();
                DataSet   ds           = objAllCodeDA.AllCode_Gets();

                if (ds != null && ds.Tables.Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                ErrorLog.log.Error(ex.ToString());
                return(false);
            }
        }