public virtual void Init(OpenMarketOperation data, QueueMessageFromRFA message) { string ignoreMessage = ""; bool isIgnore = IgnoreSql(data, ref ignoreMessage); if (isIgnore) { message.OperationType = "Ignore"; message.ReturnMessage = ignoreMessage; return; } int idx = data.getColIdx("issueDate"); bool isExist = OracleHelper.Exists("select count(*) from " + data._tabName + " where ric='" + data._ric + "' and issuedate='" + data._values[idx] + "'"); if (isExist) { UpdateSql(data); OracleHelper.ExecuteSql(data._bulkSqlStatments.ToString()); message.OperationType = "Update"; } else { InsertSql(data); OracleHelper.ExecuteSql(data._bulkSqlStatments.ToString()); message.OperationType = "Insert"; } message.ExecSql = data._bulkSqlStatments.ToString(); message.ReturnMessage = " <span style=\"color:green;\">Success!</span>"; }
private void ExecuteSqlByRicType(string rictype, OpenMarketOperation operation) { QueueMessageFromRFA message = new QueueMessageFromRFA { Ric = operation._ric, RicType = rictype }; switch (rictype) { case "CFXS/NEWISSUE": NewListBond nb = new NewListBond(); nb.Init(operation, message); break; case "CNREPO/PBOC": OpenMarketCNREPO cn = new OpenMarketCNREPO(); cn.Init(operation, message); break; case "MLF/PBOC": OpenMarketMLF mlf = new OpenMarketMLF(); mlf.Init(operation, message); break; case "SLF/PBOC": OpenMarketSLF slf = new OpenMarketSLF(); slf.Init(operation, message); break; case "SLO/PBOC": OpenMarketSLO slo = new OpenMarketSLO(); slo.Init(operation, message); break; } _queueMessageFromRfas.Add(message); _rfaLog.Append("\n <span style=\"background:" + (_responseRic == _requestRic ? "auto" : "yellow") + ";\">Response ric is <b>" + _responseRic + "</b></span> and " + message.OperationType + message.ReturnMessage + " \n"); if (message.OperationType != "Ignore") { _rfaLog.Append("Execute sql:" + message.ExecSql + " ; \n"); } }
private void ExecuteSqlByRicType(string rictype, OpenMarketOperation operation) { QueueMessageFromRFA message = new QueueMessageFromRFA { Ric = operation._ric, RicType = rictype }; NewListBond nb = new NewListBond(); nb.Init(operation, message); _queueMessageFromRfas.Add(message); _rfaLog.Append("\n <span style=\"background:" + (_responseRic == _requestRic ? "auto" : "yellow") + ";\">Response ric is <b>" + _responseRic + "</b></span> and " + message.OperationType + message.ReturnMessage + " \n"); if (message.OperationType != "Ignore") { _rfaLog.Append("Execute sql:" + message.ExecSql + " ; \n"); } }