Example #1
0
        /// <summary>
        /// 根据条件统计仓储力支费
        /// </summary>
        /// <param name="strStartTime"></param>
        /// <param name="strEndTime"></param>
        /// <param name="strCustomerName"></param>
        /// <param name="strWarehouse"></param>
        /// <param name="strIsConsigning"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List<StatStorageAndForceFee> LoadStatStorageAndForceFeeByConditions(string strStartTime, string strEndTime, string strCustomerName, string strWarehouse, string strIsConsigning, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List<StatStorageAndForceFee> ret = null;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (StockDAO dao = new StockDAO())
                    {
                        ret = dao.LoadStatStorageAndForceFeeByConditions(strStartTime, strEndTime, strCustomerName, strWarehouse, strIsConsigning, nOpStaffId, strOpStaffName, out strErrText);
                        if (ret == null)
                            return null;
                    }
                    transScope.Complete();
                }
                return ret;
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return null;
            }
        }