Пример #1
0
        /// <summary>
        /// 根据条件读取寄库计划发货数据
        /// </summary>
        /// <param name="strConsigningDeliveryNo"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List<ConsigningDeliverPlanDeliverGoods> LoadConsigningDeliverPlanDeliverGoodsByConditions(string strConsigningDeliveryNo, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List<ConsigningDeliverPlanDeliverGoods> ret = null;

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