コード例 #1
0
 //Interface
 static KronosProxy()
 {
     //
     _Client  = new KronosServiceClient();
     _state   = true;
     _address = _Client.Endpoint.Address.Uri.AbsoluteUri;
 }
コード例 #2
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); }
 }
コード例 #3
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);
 }
コード例 #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 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);
        }
コード例 #6
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);
        }