コード例 #1
0
ファイル: DeliverSystem.cs プロジェクト: zjchenxk/SYLS
        /// <summary>
        /// 读取指定送货单号的送货单数据
        /// </summary>
        /// <param name="strDeliverBillNo"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public DeliverBill LoadDeliverBillByNo(string strDeliverBillNo, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                DeliverBill dataResult = null;
                strErrText = String.Empty;

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