コード例 #1
0
ファイル: DDSystem.cs プロジェクト: zjchenxk/SYLS
        /// <summary>
        /// 读取指定运费限价数据
        /// </summary>
        /// <param name="nId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public TransportLimitedPrice LoadTransportLimitedPrice(long nId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                TransportLimitedPrice dataResult = null;

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