/// <summary> /// Check if OMS is available /// </summary> private bool IsOMSAvailable() { string status; if (!CheckProcesses[2]) { return(false); } _omsclient.Start("CMA_TESTE", "CMA_USER", "123456", out status); return(_omsclient.StartOrderList(new OrderListFilter { DisplayOnlyMyOrders = 1 }, out status) == 1); }
private int RoboStart() { if (_omsclient == null) { CreateInstance(); } var status = "OK"; var ireply = _omsclient == null ? 0 : _omsclient.Start("CMA_TESTE", "CMA_USER", "123456", out status); status = ireply == 1 || ireply == 90140 ? "OK" : "OFF " + status; NotifyOMS(status); return(ireply); }