Example #1
0
        /// <summary>
        /// 读取指定合同编码和计划编码的调度单货物数据
        /// </summary>
        /// <param name="nContractId"></param>
        /// <param name="nPlanId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List <DispatchBillGoods> LoadDispatchBillAllGoodsByContractIdAndPlanId(long nContractId, long nPlanId, 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.LoadDispatchBillAllGoodsByContractIdAndPlanId(nContractId, nPlanId, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return(dataResult);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(null);
            }
        }