| | |
| | | /// <param name="supportStaff">归属客服人员</param> |
| | | /// <param name="productId">产品ID</param> |
| | | /// <returns></returns> |
| | | //public List<GwClient> LoadInfoList(out int recordCount, int pageIndex, int pageSizestring, string clientID, string clientName, string telphone, string agent) |
| | | public List<GwClient> LoadInfoList(out int recordCount, int pageIndex, int pageSizestring, string clientID, string clientName, string telephone, string agent, string company, string salesman, string supportStaff, string productId, int isEnable, string permissionsSQL ) |
| | | public List<GwClient> LoadInfoList(out int recordCount, int pageIndex, int pageSizestring, string clientID, string clientName, string telephone, string agent, string company, string salesman, string supportStaff, string productId, int isEnable,int isSub, string permissionsSQL ) |
| | | { |
| | | |
| | | List<GwClient> list = new List<GwClient>(); |
| | |
| | | stringBuilder.Append(" ) t on t.client_id = gwc.client_id "); |
| | | //stringBuilder.Append("from GW_CLIENT where 1=1"); |
| | | stringBuilder.Append(" WHERE 1=1"); |
| | | OracleParameter[] oracleParameterArray = new OracleParameter[8]; |
| | | OracleParameter[] oracleParameterArray = new OracleParameter[9]; |
| | | if (clientID != null && clientID != "") |
| | | { |
| | | oracleParameterArray[0] = new OracleParameter(":ClientID", (OracleDbType)126); |
| | |
| | | stringBuilder.Append(" and gwc.IS_ENABLE = :IS_ENABLE"); |
| | | } |
| | | |
| | | //是否一级账户。0为一级 |
| | | if (isSub == 0) |
| | | { |
| | | oracleParameterArray[8] = new OracleParameter(":CLIENT_PARENTID", OracleDbType.Int32); |
| | | ((DbParameter)oracleParameterArray[8]).Value = (object)(isSub); |
| | | stringBuilder.Append(" and gwc.CLIENT_PARENTID = :CLIENT_PARENTID"); |
| | | } |
| | | else |
| | | { |
| | | oracleParameterArray[8] = new OracleParameter(":CLIENT_PARENTID", OracleDbType.Int32); |
| | | ((DbParameter)oracleParameterArray[8]).Value = (object)(isSub); |
| | | stringBuilder.Append(" and gwc.CLIENT_PARENTID != 0"); |
| | | } |
| | | |
| | | |
| | | if (productId != null && productId != "") |
| | | { |
| | | stringBuilder.Append(" and gwc.CLIENT_ID IN ( SELECT distinct CLIENT_ID FROM GW_SP WHERE PRODUCT_ID = '" + productId + "' )"); |
| | | } |
| | | |
| | | |
| | | //客户权限SQL脚本 |
| | | stringBuilder.Append(permissionsSQL); |
| | |
| | | o.SupportStaff = oracleReaderWrapper.GetString("SUPPORT_STAFF", ""); |
| | | o.FinancialStaff = oracleReaderWrapper.GetString("FINANCIAL_STAFF", ""); |
| | | o.ChargeType = oracleReaderWrapper.GetInt("CHARGE_TYPE", 0); |
| | | o.SmsBillType = oracleReaderWrapper.GetInt("SMS_BILLTYPE",0); |
| | | o.SmsStatusReport = oracleReaderWrapper.GetInt("SMS_STATUS_REPORT", 0); |
| | | o.MmsStatusReport = oracleReaderWrapper.GetInt("MMS_STATUS_REPORT", 0); |
| | | |