/// <summary> /// Get instance of CapacityService Object /// </summary> /// <returns></returns> public static ICapacityService GetService() { if (!RightNowConfigService.IsConfigured()) { return(null); } CapacityService service = null; try { string endPointUrl = RightNowConfigService.GetConfigValue(RightNowConfigKeyNames.ToaCapacityServiceUrl); service = new CapacityService(); service._toaCapacityInterface = new toa_capacity_interface(endPointUrl); service._log = ToaLogService.GetLog(); } catch (Exception e) { service = null; service._log.Error("Unable to create CapacityService Object"); service._log.Error("Exception: " + e.StackTrace); MessageBox.Show(ToaExceptionMessages.CapacityServiceNotInitialized, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(service); }
/// <summary> /// Get Inbound Service object /// </summary> /// <returns></returns> public static InboundService GetService() { if (_inboundService != null) { return(_inboundService); } if (!RightNowConfigService.IsConfigured()) { return(null); } try { lock (_sync) { if (_inboundService == null) { var inboundWsdlUrl = RightNowConfigService.GetConfigValue(RightNowConfigKeyNames.ToaInboundServiceUrl); EndpointAddress endpoint = new EndpointAddress(inboundWsdlUrl); BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport); _inboundService = new InboundService(); _inboundService._inboundInterfaceService = new InboundInterfacePortClient(binding, endpoint); _inboundService._log = ToaLogService.GetLog(); } } } catch (Exception e) { _inboundService = null; MessageBox.Show(ToaExceptionMessages.InboudServiceNotInitialized, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(_inboundService); }
// TODO : Remove below line //public WorkOrderSaveHandler() public WorkOrderSaveHandler(IRecordContext RecordContext, System.ComponentModel.CancelEventArgs e) { _recordContext = RecordContext; _cancelEventArgs = e; _workOrderRecord = _recordContext.GetWorkspaceRecord(_recordContext.WorkspaceTypeName) as ICustomObject; _log = ToaLogService.GetLog(); }
void _recordContext_Saving(object sender, System.ComponentModel.CancelEventArgs e) { var log = ToaLogService.GetLog(); IHandler workOrderHandler = new WorkOrderSaveHandler(_recordContext, e); workOrderHandler.Handler(); }
private void Debug(string logMessage, string logNote = null) { if (RightNowConfigService.IsConfigured()) { var log = ToaLogService.GetLog(); log.Debug(logMessage, logNote); } }
public static WorkOrderService GetService() { //RightNowConfigService.Config(); var workOrderService = new WorkOrderService(); //var workOrderUrl = RightNowConfigService.GetConfigValue(RightNowConfigKeys.ToaActivityWsdlUrlKey); workOrderService._activityClient = new ApiPortTypeClient(); //Todo: add endpoint address workOrderService._log = ToaLogService.GetLog(); return(workOrderService); }
public static EventHandlerServices GetEventHandlerService() { if (_eventHandlerService == null) { _eventHandlerService = new EventHandlerServices(); _log = ToaLogService.GetLog(); return(_eventHandlerService); } return(_eventHandlerService); }
private static void Main(string[] args) { //RightNowConfigService.Config(); //RightNowConnectService.GetService(); //QueryResultData[] result = RightNowConnectService.GetService().GetProductCatalogDetailsFromId(21); //Console.WriteLine("Data:"+result); var service = RightNowConnectService.GetService(); var config = service.GetRightNowConfigVerbValue("CUSTOM_CFG_Sales_Accel_Integrations"); var log = ToaLogService.GetLog(); log.Debug("Deepak: Hello Word!! : 11"); log.Error("Deepak: Hello Word!! : 12"); log.Fatal("Deepak: Hello Word!! : 13"); log.Notice("Deepak: Hello Word!! : 14"); log.Warning("Deepak: Hello Word!! : 15"); log.Click("Deepak: Hello Word!! : 16"); }
public MonthlyViewSchedulerViewModel() { TimeSlotRowInDataGrid = new ObservableCollection <TimeSlotRow>(); _log = ToaLogService.GetLog(); }
public ToaRequestResult() { _dataModels = new List <IToaModel>(); _resultCode = ToaRequestResultCode.Failure; _log = ToaLogService.GetLog(); }
public ToaExceptionManager() { _log = ToaLogService.GetLog(); }
public WorkOrderAreaViewModel() { _log = ToaLogService.GetLog(); }
public PopulateManualDuration(IRecordContext RecordContext) { _recordContext = RecordContext; _workOrderRecord = _recordContext.GetWorkspaceRecord(_recordContext.WorkspaceTypeName) as ICustomObject; _log = ToaLogService.GetLog(); }