public string ExecuteAgentReplace(string newMobileNo, string exCluster, string newCluster, AgentPhoneCode item) { try { using (var connection = this.GetConnection()) { var parameter = new OracleDynamicParameters(); parameter.Add("V_NEW_DISTRIBUTOR_NO", OracleDbType.Varchar2, ParameterDirection.Input, newMobileNo); parameter.Add("V_EX_CLUSTER", OracleDbType.Varchar2, ParameterDirection.Input, exCluster); parameter.Add("V_NEW_CLUSTER", OracleDbType.Varchar2, ParameterDirection.Input, newCluster); parameter.Add("V_AGENT_PHONE", OracleDbType.Varchar2, ParameterDirection.Input, item.AgentPhone); parameter.Add("MSGID", OracleDbType.Varchar2, ParameterDirection.Input, "999999999"); parameter.Add("V_FLAG", OracleDbType.Double, ParameterDirection.Output); parameter.Add("OUTMSG", OracleDbType.Varchar2, ParameterDirection.Output, null, 32767); SqlMapper.Query(connection, dbUser + "SP_Execute_Agent_Replace", param: parameter, commandType: CommandType.StoredProcedure); this.CloseConnection(connection); string flag = parameter.oracleParameters[5].Value != null ? parameter.oracleParameters[5].Value.ToString() : null; string successOrErrorMsg = null; if (flag == "0") { successOrErrorMsg = parameter.oracleParameters[6].Value != null ? parameter.oracleParameters[6].Value.ToString() : null; } else { successOrErrorMsg = flag; } return(successOrErrorMsg); } } catch (Exception ex) { throw ex; } }
public string ExecuteAgentReplace(string newMobileNo, string exCluster, string newCluster, AgentPhoneCode item) { try { return(_repository.ExecuteAgentReplace(newMobileNo, exCluster, newCluster, item)); } catch (Exception ex) { throw; } }