public static void WriteLogEntry(TraceMessage m) { //Get the operating enterprise terminal try { _Client = new KronosServiceClient(); _Client.WriteLogEntry(m); _Client.Close(); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { _Client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { _Client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException(ce.Message); } }
public static object[] GetIDTypes() { //Get invoices for the specified client object[] types = null; try { _Client = new KronosServiceClient(); types = _Client.GetIDTypes(); _Client.Close(); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <HRFault> hfe) { _Client.Abort(); throw new ApplicationException(hfe.Detail.Message); } catch (FaultException fe) { _Client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException(ce.Message); } return(types); }
public static ServiceInfo GetServiceInfo() { //Get the operating enterprise terminal ServiceInfo terminal = null; try { _Client = new KronosServiceClient(); terminal = _Client.GetServiceInfo(); _Client.Close(); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { _Client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { _Client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException(ce.Message); } return(terminal); }
public static UserConfiguration GetUserConfiguration(string application, string[] usernames) { //Get the operating enterprise terminal UserConfiguration config = null; try { _Client = new KronosServiceClient(); config = _Client.GetUserConfiguration(application, usernames); _Client.Close(); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <ConfigurationFault> cfe) { _Client.Abort(); throw new ApplicationException(cfe.Detail.Message); } catch (FaultException fe) { _Client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException(ce.Message); } return(config); }
public static Employees GetEmployees(string idType) { //Get client list Employees employees = null; try { _Client = new KronosServiceClient(); employees = _Client.GetEmployees(idType); _Client.Close(); } catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException(te.Message); } catch (FaultException <HRFault> hfe) { _Client.Abort(); throw new ApplicationException(hfe.Detail.Message); } catch (FaultException fe) { _Client.Abort(); throw new ApplicationException(fe.Message); } catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException(ce.Message); } return(employees); }