Example #1
0
 //Interface
 static MobileDevicesProxy()
 {
     //
     _Client  = new MobileDevicesServiceClient();
     _state   = true;
     _address = _Client.Endpoint.Address.Uri.AbsoluteUri;
 }
Example #2
0
 public static void WriteLogEntry(TraceMessage m)
 {
     //Get the operating enterprise terminal
     try {
         _Client = new MobileDevicesServiceClient();
         _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 #3
0
        public static ComponentType GetComponentType(string typeID)
        {
            ComponentType type = null;

            try {
                _Client = new MobileDevicesServiceClient();
                type    = _Client.GetComponentType(typeID);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetComponentType() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetComponentType() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetComponentType() communication error.", ce); }
            return(type);
        }
Example #4
0
        public static LocalDriver GetDriver(int driverID)
        {
            LocalDriver driver = null;

            try {
                _Client = new MobileDevicesServiceClient();
                driver  = _Client.GetDriver(driverID);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetEnterpriseDriver() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetEnterpriseDriver() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetEnterpriseDriver() communication error.", ce); }
            return(driver);
        }
Example #5
0
        public static BatteryItems GetUnassignedBatteryItems(long terminalID)
        {
            BatteryItems batteries = null;

            try {
                _Client   = new MobileDevicesServiceClient();
                batteries = _Client.GetUnassignedBatteryItems(terminalID);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetUnassignedBatterys() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetUnassignedBatterys() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetUnassignedBatterys() communication error.", ce); }
            return(batteries);
        }
Example #6
0
        public static LocalDrivers GetBatteryItemAssignments()
        {
            LocalDrivers assignments = null;

            try {
                _Client     = new MobileDevicesServiceClient();
                assignments = _Client.GetBatteryItemAssignments();
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetBatteryAssignments() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetBatteryAssignments() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetBatteryAssignments() communication error.", ce); }
            return(assignments);
        }
Example #7
0
        public static bool UnassignDeviceItem(DeviceItem item)
        {
            bool ret = false;

            try {
                _Client = new MobileDevicesServiceClient();
                ret     = _Client.UnassignDeviceItem(item);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("UnassignFromDriver() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("UnassignFromDriver() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("UnassignFromDriver() communication error.", ce); }
            return(ret);
        }
Example #8
0
        public static BatteryItem GetBatteryItem(string itemID)
        {
            BatteryItem item = null;

            try {
                _Client = new MobileDevicesServiceClient();
                item    = _Client.GetBatteryItem(itemID);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetBatteryItem() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetBatteryItem() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetBatteryItem() communication error.", ce); }
            return(item);
        }
Example #9
0
        public static bool AssignDeviceItem(DeviceItem item, int driverID, string installationType, string installationNumber)
        {
            bool ret = false;

            try {
                _Client = new MobileDevicesServiceClient();
                ret     = _Client.AssignDeviceItem(item, driverID, installationType, installationNumber);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("AssignToDriver() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("AssignToDriver() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("AssignToDriver() communication error.", ce); }
            return(ret);
        }
Example #10
0
        public static DataSet GetInstallationTypes()
        {
            DataSet types = null;

            try {
                _Client = new MobileDevicesServiceClient();
                types   = _Client.GetInstallationTypes();
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetInstallationTypes() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetInstallationTypes() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetInstallationTypes() communication error.", ce); }
            return(types);
        }
Example #11
0
        public static DeviceItems GetPriorDeviceItems()
        {
            DeviceItems items = null;

            try {
                _Client = new MobileDevicesServiceClient();
                items   = _Client.GetPriorDeviceItems();
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetPriorDeviceItems() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetPriorDeviceItems() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetPriorDeviceItems() communication error.", ce); }
            return(items);
        }
Example #12
0
        public static ComponentTypes GetComponentTypeList(bool mandatoryField, string categoryID)
        {
            ComponentTypes types = null;

            try {
                _Client = new MobileDevicesServiceClient();
                types   = _Client.GetComponentTypeList(mandatoryField, categoryID);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetComponentTypeList() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetComponentTypeList() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetComponentTypeList() communication error.", ce); }
            return(types);
        }
Example #13
0
        public static bool EndBatteryItemChargeCycle(BatteryItem item)
        {
            bool ret = false;

            try {
                _Client = new MobileDevicesServiceClient();
                ret     = _Client.EndBatteryItemChargeCycle(item);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("EndChargeCycle() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("EndChargeCycle() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("EndChargeCycle() communication error.", ce); }
            return(ret);
        }
Example #14
0
        public static LocalTerminals GetLocalTerminals()
        {
            LocalTerminals terminal = null;

            try {
                _Client  = new MobileDevicesServiceClient();
                terminal = _Client.GetLocalTerminals();
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("() communication error.", ce); }
            return(terminal);
        }
Example #15
0
        public static LocalDrivers GetDrivers(long terminalID, bool mandatoryField)
        {
            LocalDrivers drivers = null;

            try {
                _Client = new MobileDevicesServiceClient();
                drivers = _Client.GetDrivers(terminalID, mandatoryField);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("GetEnterpriseDrivers() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("GetEnterpriseDrivers() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("GetEnterpriseDrivers() communication error.", ce); }
            return(drivers);
        }
Example #16
0
 public static Argix.Terminals.TerminalInfo GetTerminalInfo()
 {
     //Get the operating enterprise terminal
     Argix.Terminals.TerminalInfo terminal = null;
     try {
         _Client  = new MobileDevicesServiceClient();
         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 #17
0
        public static bool SaveComponentType(ComponentType ctype)
        {
            bool ret = false;

            try {
                _Client = new MobileDevicesServiceClient();
                ret     = _Client.SaveComponentType(ctype);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("SaveComponentType() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("SaveComponentType() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("SaveComponentType() communication error.", ce); }
            return(ret);
        }
Example #18
0
        public static DataSet GetComponentTypeCategories()
        {
            DataSet cats = null;

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

            try {
                _Client = new MobileDevicesServiceClient();
                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 #20
0
        public static bool UnassignBatteryItem(BatteryItemAssignment assignment)
        {
            bool ret = false;

            try {
                _Client = new MobileDevicesServiceClient();
                assignment.AssignedDate = DateTime.Now;
                assignment.AssignedUser = Environment.UserName;
                ret = _Client.UnassignBatteryItem(assignment);
                _Client.Close();
            }
            catch (FaultException fe) { throw new ApplicationException("UnassignBatteryItem() service error.", fe); }
            catch (TimeoutException te) { _Client.Abort(); throw new ApplicationException("UnassignBatteryItem() timeout error.", te); }
            catch (CommunicationException ce) { _Client.Abort(); throw new ApplicationException("UnassignBatteryItem() communication error.", ce); }
            return(ret);
        }