Exemplo n.º 1
0
        /// <summary>
        /// 读取库存尾差数据
        /// </summary>
        /// <param name="strCustomerName"></param>
        /// <param name="strGoodsId"></param>
        /// <param name="strWarehouse"></param>
        /// <param name="strIsConsigning"></param>
        /// <param name="strConsignedDeliveryNo"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List<Stock> LoadStockEndDifferencesByConditions(string strCustomerName, string strGoodsId, string strWarehouse, string strIsConsigning, string strConsignedDeliveryNo, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List<Stock> dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (StockDAO dao = new StockDAO())
                    {
                        dataResult = dao.LoadStockEndDifferencesByConditions(strCustomerName, strGoodsId, strWarehouse, strIsConsigning, strConsignedDeliveryNo, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return dataResult;
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return null;
            }
        }