Exemple #1
0
        internal LogIn.ServiceReference1.Setup getSettings(string resourceId, long libraryID)
        {
            int setupId = 0;

            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                setupId = soap.getSetupId(resourceId);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in geting the settings");
            }

            if (setupId == 0)
            {
                try
                {
                    LogIn.ServiceReference1.PrinchService1SoapClient soap1 = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                    setupId = soap1.getGlobalSetupId(libraryID);
                }
                catch (Exception ex)
                {
                    System.Windows.Forms.MessageBox.Show("Get global settings" + ex);
                }
            }

            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap1 = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                setup = soap1.getSetup(setupId);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Get settings" + ex);
            }


            if (setup == null)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in reading the congiguration of this pc Default configurations will be used");
            }
            return(setup);
        }
        internal LogIn.ServiceReference1.Setup getSettings(string resourceId,long libraryID)
        {
            int setupId = 0;
            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                setupId = soap.getSetupId(resourceId);

            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in geting the settings");
            }

            if (setupId == 0)
            {
                try
                {
                    LogIn.ServiceReference1.PrinchService1SoapClient soap1 = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                    setupId = soap1.getGlobalSetupId(libraryID);
                }
                catch (Exception ex)
                {
                    System.Windows.Forms.MessageBox.Show("Get global settings" + ex);
                }

            }

            try
            {

                LogIn.ServiceReference1.PrinchService1SoapClient soap1 = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                setup = soap1.getSetup(setupId);

            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Get settings" + ex);
            }

            if (setup == null)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in reading the congiguration of this pc Default configurations will be used");

            }
            return setup;
        }