Beispiel #1
0
        /// <summary>
        /// 根据条件汇总收发存
        /// </summary>
        /// <param name="strStartTime"></param>
        /// <param name="strEndTime"></param>
        /// <param name="strCustomerName"></param>
        /// <param name="strDeliveryNo"></param>
        /// <param name="strEnterWarehouseBillNo"></param>
        /// <param name="strGoodsNo"></param>
        /// <param name="strBatchNo"></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<EnterOutBalanceSummary> LoadEnterOutBalanceSummariesByConditions(string strStartTime, string strEndTime, string strCustomerName, string strDeliveryNo, string strEnterWarehouseBillNo, string strGoodsNo, string strBatchNo, string strWarehouse, string strIsConsigning, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List<EnterOutBalanceSummary> ret = null;

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