private void sendFailedRejections(string salesOrg, string email, IDBServerConnector dbServer, IMailUtil mu) { string failedListQuery; if (isReleaseRejections) { failedListQuery = $"Select * from RejectionsLog where [id] = '{rejectionsList[0].id}' And (status is null or status <> 'success') AND isDuringRelease = 1"; } else { failedListQuery = $"Select * from RejectionsLog where [salesOrg] = '{salesOrg}' AND (status is null or status <> 'success') AND isDuringRelease = 0 AND (Cast([startTime] as date) = Cast(CURRENT_TIMESTAMP as date))"; } var rs = dbServer.executeQuery(failedListQuery); if (!rs.EOF) { mu.mailSimple(email, $"{salesOrg} Failed {(isReleaseRejections ? "Release " : "After Release ") }Rejections {DateTime.Now}", $"Hello <br>Please investigate and action the below failed items if needed<br><br>{mu.rsToHTMLtable(rs)}<br><br>Kind regards<br>IDA"); } }
public void sendReplacedCMIRs(string salesOrg, string email, IMailUtil mu, IDBServerConnector dbServer) { string failedListQuery = $"Select distinct * from CMIR where [salesOrg] = '{salesOrg}'"; var rs = dbServer.executeQuery(failedListQuery); if (!rs.EOF) { mu.mailSimple( "[email protected];" + email, $"{salesOrg} Replaced CMIR's during switches {DateTime.Now}", $"Hello <br>Dear Centralised Team representative of the sales organisation: {salesOrg}<br>Please do the below cmir links that were discovered from the switch task<br><br>{mu.rsToHTMLtable(rs)}<br><br>Kind regards<br>IDA" ); } dbServer.executeQuery($"Delete from CMIR where [salesOrg] = '{salesOrg}'"); }
public void sendFailedRdds(string salesOrg, string email, IDBServerConnector dbServer) { if (calculatedList.Count > 0) { string failedListQuery = $"Select * from DeliveryDatesLog where [id] = '{calculatedList[0].id}' And (status is null or status <> 'success')"; var rs = dbServer.executeQuery(failedListQuery); if (!rs.EOF) { mu.mailSimple(email, $"{salesOrg} Failed RDD items {DateTime.Now}", $"Hello <br>Please investigate and action the below failed items manually<br><br>{mu.rsToHTMLtable(rs)}<br><br>Kind regards<br>IDA"); } } }
public void sendFailedSwitches(string salesOrg, string email, IDBServerConnector dbServer, IMailUtil mu) { string failedListQuery = $"Select * from SwitchLog where [id] = '{AutomaticSwitchesList[0].id}' And (status is null or status <> 'success') AND SwitchAutomatic = 1"; var rs = dbServer.executeQuery(failedListQuery); if (!rs.EOF) { mu.mailSimple(email, $"{salesOrg} Failed Switches {DateTime.Now}", $"Hello <br>Please investigate and action the below failed items if needed<br><br>{mu.rsToHTMLtable(rs)}<br><br>Kind regards<br>IDA"); } }