/// <summary> /// 根据综合条件读取客户数据 /// </summary> /// <param name="strName"></param> /// <param name="nOpStaffId"></param> /// <param name="strOpStaffName"></param> /// <param name="strErrText"></param> /// <returns></returns> public List<Customer> LoadCustomersByConditions(string strName, long nOpStaffId, string strOpStaffName, out string strErrText) { try { List<Customer> dataResult = null; strErrText = String.Empty; using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0))) { using (CustomerDAO dao = new CustomerDAO()) { dataResult = dao.LoadCustomersByConditions(strName, nOpStaffId, strOpStaffName, out strErrText); } transScope.Complete(); } return dataResult; } catch (Exception e) { strErrText = e.Message; return null; } }