Example #1
0
        /// <summary>
        /// 根据发货计划编码和货物编码读取货物调度数据
        /// </summary>
        /// <param name="strPlanId"></param>
        /// <param name="strGoodsId"></param>
        /// <param name="strBatchNo"></param>
        /// <param name="strPacking"></param>
        /// <param name="strLocation"></param>
        /// <param name="strProductionDate"></param>
        /// <param name="strEnterWarehouseBillId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List <DispatchBillGoods> LoadAllDispatchBillGoodsByConditions(string strPlanId, string strGoodsId, string strBatchNo, string strPacking, string strLocation, string strProductionDate, string strEnterWarehouseBillId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List <DispatchBillGoods> dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (DispatchDAO dao = new DispatchDAO())
                    {
                        dataResult = dao.LoadAllDispatchBillGoodsByConditions(strPlanId, strGoodsId, strBatchNo, strPacking, strLocation, strProductionDate, strEnterWarehouseBillId, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return(dataResult);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(null);
            }
        }