Example #1
0
 public static void WriteLogEntry(TraceMessage m)
 {
     //Get the operating enterprise terminal
     try {
         _Client = new KronosClient();
         _Client.WriteLogEntry(m);
         _Client.Close();
     }
     catch (FaultException fe) { throw new ApplicationException("WriteLogEntry() service error.", fe); }
     catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("WriteLogEntry() timeout error.", te); }
     catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("WriteLogEntry() communication error.", ce); }
 }
Example #2
0
 public static object[] GetIDTypes()
 {
     //Get invoices for the specified client
     object[] types = null;
     try {
         _Client = new KronosClient();
         types   = _Client.GetIDTypes();
         _Client.Close();
     }
     catch (FaultException fe) { throw new ApplicationException("GetIDTypes() service error.", fe); }
     catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetIDTypes() timeout error.", te); }
     catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetIDTypes() communication error.", ce); }
     return(types);
 }
Example #3
0
        public static TerminalInfo GetTerminalInfo()
        {
            //Get the operating enterprise terminal
            TerminalInfo terminal = null;

            try {
                _Client  = new KronosClient();
                terminal = _Client.GetTerminalInfo();
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetTerminalInfo() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetTerminalInfo() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetTerminalInfo() communication error.", ce); }
            return(terminal);
        }
Example #4
0
        public static UserConfiguration GetUserConfiguration(string application, string[] usernames)
        {
            //Get the operating enterprise terminal
            UserConfiguration config = null;

            try {
                _Client = new KronosClient();
                config  = _Client.GetUserConfiguration(application, usernames);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetUserConfiguration() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetUserConfiguration() communication error.", ce); }
            return(config);
        }
Example #5
0
        public static Employees GetEmployees(string idType)
        {
            //Get client list
            Employees employees = null;

            try {
                _Client   = new KronosClient();
                employees = _Client.GetEmployees(idType);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetEmployees() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetEmployees() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetEmployees() communication error.", ce); }
            return(employees);
        }