Пример #1
0
        /// <summary>
        /// 读取指定时间段内审批合同的所属办事处数据
        /// </summary>
        /// <param name="strStartTime"></param>
        /// <param name="strEndTime"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List <Organization> LoadApproveContractsOwnOrgansByTimespan(string strStartTime, string strEndTime, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List <Organization> dataResult = null;
                strErrText = String.Empty;

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