public byte[] GetQCReportByPage(string procedureName, string[] paramenters, object[] values, out int count)
        {
            Console.WriteLine("QCReportDAL - DataTable GetMISReportByPage()" + " - " + DateTime.Now.ToString());

            List <string> ps = paramenters.ToList();

            ps.Add("UserID");
            paramenters = ps.ToArray();
            List <object> vs = values.ToList();

            vs.Add(Shawoo.GenuineChannels.GenuineUtility.CurrentSession["UID"].ToString());
            values = vs.ToArray();

            try
            {
                object[] outParameters;
                DataSet  ds = acQC.DbHelper.ExecuteStoredProcedure(procedureName, paramenters, values,
                                                                   new string[] { "Count" }, new DbType[] { DbType.Int32 },
                                                                   out outParameters);

                count = (int)outParameters.ElementAt(0);
                return(DataFormatter.GetBinaryFormatDataCompress(ds));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());


                throw e;
            }
        }
        public byte[] GetvProperties(string voucherID)
        {
            Console.WriteLine("DocService-GetvProperties():" + DateTime.Now.ToString());
            string docType = "";

            try
            {
                docType = voucherID.Trim().Substring(0, 1);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            DataSet ds = gate.ExecuteStoredProcedure("QE31_GetPropertyByVoucherID", new string[] { "UserID", "VoucherID" }, new object[] { DB.User, voucherID });

            return(DataFormatter.GetBinaryFormatDataCompress(ds));
        }
        public byte[] SearchDataByPage(string TableName, string Select, string OrderBy, int Size, int Index, bool ASC, string Where, out int Count)
        {
            object[] outParameters;
            DataSet  ds = new DataSet();

            try
            {
                ds = acQC.ExecuteStoredProcedure("_PagerSql2016_out_count",
                                                 new string[] { "tblName", "fldCow", "fldName", "PageSize", "PageIndex", "OrderType", "strWhere" },
                                                 new object[] { TableName, Select, OrderBy, Size, Index, ASC, Where },
                                                 new string[] { "count" },
                                                 new DbType[] { DbType.Int32 },
                                                 out outParameters
                                                 );
                Count = (int)outParameters.ElementAt(0);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(DataFormatter.GetBinaryFormatDataCompress(ds));
        }
        public byte[] GetQCReport(string procdureName, string[] paramenters, object[] values)
        {
            try
            {
                Console.WriteLine("procedureName:" + procdureName);
                List <string> ps = paramenters.ToList();
                ps.Add("UserID");
                paramenters = ps.ToArray();
                List <object> vs = values.ToList();
                //vs.Add(Shawoo.GenuineChannels.GenuineUtility.CurrentSession["UID"].ToString());
                vs.Add(Shawoo.GenuineChannels.GenuineUtility.CurrentSession["UID"].ToString());
                values = vs.ToArray();
                Console.WriteLine("paramenters:" + JsonConvert.SerializeObject(paramenters));
                Console.WriteLine("values:" + JsonConvert.SerializeObject(values));
                DataSet ds = acQC.DbHelper.ExecuteStoredProcedure(procdureName, paramenters, values);
                return(DataFormatter.GetBinaryFormatDataCompress(ds));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());

                throw e;
            }
        }