예제 #1
0
파일: DDSystem.cs 프로젝트: zjchenxk/SYLS
        /// <summary>
        /// 读取指定承运单位的结算公式数据
        /// </summary>
        /// <param name="nCarrierId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List<CarrierSettlementExpression> LoadCarrierSettlementExpressions(long nCarrierId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List<CarrierSettlementExpression> dataResult = null;

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