Exemple #1
0
        /// <summary>
        /// 读取指定客户编码和仓库的待调度计划
        /// </summary>
        /// <param name="nCustomerId"></param>
        /// <param name="strWarehouse"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List <DeliverPlan> LoadDispatchDeliverPlansByCustomerIdAndWarehouse(long nCustomerId, string strWarehouse, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List <DeliverPlan> dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (PlanDAO dao = new PlanDAO())
                    {
                        dataResult = dao.LoadDispatchDeliverPlansByCustomerIdAndWarehouse(nCustomerId, strWarehouse, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return(dataResult);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(null);
            }
        }