Пример #1
0
 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); }
 }
Пример #2
0
 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);
 }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }