Esempio n. 1
0
        /// <summary>
        /// 读取待审批价格合同数据
        /// </summary>
        /// <param name="strStartTime"></param>
        /// <param name="strEndTime"></param>
        /// <param name="strContractNo"></param>
        /// <param name="strOriginalContractNo"></param>
        /// <param name="strDestCountry"></param>
        /// <param name="strDestProvince"></param>
        /// <param name="strDestCity"></param>
        /// <param name="strCarNo"></param>
        /// <param name="strOrganId"></param>
        /// <param name="nOpStaffId"></param>
        /// <param name="strOpStaffName"></param>
        /// <param name="strErrText"></param>
        /// <returns></returns>
        public List <Contract> LoadApproveContractsByConditions(string strStartTime, string strEndTime, string strContractNo, string strOriginalContractNo, string strDestCountry, string strDestProvince, string strDestCity, string strCarNo, string strOrganId, long nOpStaffId, string strOpStaffName, out string strErrText)
        {
            try
            {
                List <Contract> dataResult = null;
                strErrText = String.Empty;

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