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