示例#1
0
        /// <summary>
        /// 根据条件读取冲帐记录数据
        /// </summary>
        /// <param name="strStartTime"></param>
        /// <param name="strEndTime"></param>
        /// <param name="strContractNo"></param>
        /// <param name="strOriginalContractNo"></param>
        /// <param name="strReverserId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List <ContractReverse> LoadContractReversesByConditions(string strStartTime, string strEndTime, string strContractNo, string strOriginalContractNo, string strReverserId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List <ContractReverse> dataResult = null;
                strErrText = String.Empty;

                using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
                {
                    using (ContractDAO dao = new ContractDAO())
                    {
                        dataResult = dao.LoadContractReversesByConditions(strStartTime, strEndTime, strContractNo, strOriginalContractNo, strReverserId, nOpStaffId, strOpStaffName, out strErrText);
                    }
                    transScope.Complete();
                }
                return(dataResult);
            }
            catch (Exception e)
            {
                strErrText = e.Message;
                return(null);
            }
        }