Esempio n. 1
0
        /// <summary>
        /// 复制发货计划数据
        /// </summary>
        /// <param name="nId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public long CopyDeliverPlan(long nId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            long nPlanId = 0;

            try
            {
                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (PlanDAO dao = new PlanDAO())
                    {
                        nPlanId = dao.CopyDeliverPlan(nId, nOpStaffId, strOpStaffName, out strErrText);
                        if (nPlanId <= 0)
                        {
                            return(0);
                        }
                    }
                    transScope.Complete();
                }
                return(nPlanId);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(0);
            }
        }