protected virtual void Dispose(bool disposing) { try { VSSD_ToDestroy?.ForEach((vssd) => VSMS?.DestroySystem(vssd, out ManagementPath Job)); } catch (ManagementException e) { Trace.WriteLine($"[{DateTime.Now}] [{e.Message}]"); } try { VESSD_ToDestroy?.ForEach((vessd) => VESMS?.DestroySystem(vessd, out ManagementPath Job)); } catch (ManagementException e) { Trace.WriteLine($"[{DateTime.Now}] [{e.Message}]"); } if (disposing) { VSMS?.Dispose(); IMS?.Dispose(); } VSSD_ToDestroy.Clear(); VESSD_ToDestroy.Clear(); }
public Invoices GetSingleInvoicesToBill(string VendorNum, string InvoiceDate) { try { string Token = ""; string InvoiceStatus = ""; Invoices invoice = new Invoices(); IMS IMS = new IMS(); IMSDAL DAL = new IMSDAL(); List <InvoiceHeader> InvoiceHeader = DAL.GetSingleInvoicesToBill(VendorNum, InvoiceDate, ref Token, ref InvoiceStatus); string XMLInvoice = IMS.CreateInvoicesSingle(InvoiceHeader); invoice.Invoice = XMLInvoice; invoice.Token = Token; invoice.InvoiceStatus = InvoiceStatus; return(invoice); } catch (Exception ex) { throw ex; } }
public string PostIMS(IONAPIFile aCredentials, IMS aIMS) { string result = null; string separator = ""; string baseAPI = "IONSERVICES/api/ion/messaging/service/v2/message"; string request = aCredentials.getIONAPIUrl() + separator + baseAPI; //Uri.EscapeDataString(apiCall + query); result = callService(aCredentials, new Uri(request), JsonConvert.SerializeObject(aIMS)); return(result); }
static void Main(string[] args) { IMS ims = new IMS(); ims.WebServer = new IMSWebInterface(); Login.CredentialsResetter = new CredentialResetter(); Directory.SetCurrentDirectory(Constants.ExecutionPath); if (args.Contains("-devmode")) { for (int i = 0; i < args.Length; i++) { if (args[i] == "-plugin") { ims.DevelopmentPluginPath = args[i + 1]; break; } } AllocConsole(); ims.SimulateService(); } else if (args.Contains("-run")) { ServiceBase.Run(ims); } else { if (new ServiceController("IMS").Status == ServiceControllerStatus.Running) { StartProcess("cmd.exe", "/C start http://127.0.0.1:" + new IMSSettings().FromConfiguration().ManagementPort.Port); } else { if (Interaction.MsgBox("IMS is not currently running. Would you like to start IMS?", "Start IMS?", MsgBoxStyle.YesNo) == MsgBoxResult.Yes) { StartProcess("cmd.exe", "/C sc start IMS"); StartProcess("cmd.exe", "/C start http://127.0.0.1:" + new IMSSettings().FromConfiguration().ManagementPort.Port); } else { Environment.Exit(0); } } } }
public void ShowDefault(IMS.Database.studentsgroup gr, DateTime fd) { this.currentGroup = gr; this.lGroup.Content = gr.Name; this.firstDay = fd; this.cbWeek.SelectedIndex = 0; this.cbDay.SelectedIndex = 0; this.ShowDialog(); }