Example #1
0
 internal ServiceReference1.Credentials getUserFBooking(LogIn.ServiceReference1.Booking booking, long libId)
 {
     if (booking != null)
     {
         if (!booking.ClientPass.Equals(string.Empty))
         {
             LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
             return(soap.getUserForBooking(booking.BookingID, libId));
         }
     }
     return(null);
 }
Example #2
0
        internal ServiceReference1.User validateUser(string user, string password, long libraryId)
        {
            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                return(soap.validateUser(user, password, libraryId));
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in validation of the user");
            }

            return(null);
        }
Example #3
0
        internal bool checkIfRegistered(long libID, string resourceID)
        {
            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);

                return(soap.checkIfRegistered(libID, resourceID));
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in checking if this pc is registered to the system");
            }
            return(false);
        }
Example #4
0
        internal bool createDirectBooking(long libraryId, string clienId, string clientPass, string resourceId, DateTime startDate, DateTime endDate)
        {
            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                return(soap.createBooking(libraryId, clienId, clientPass, resourceId, startDate, endDate));
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in creating a direct booking");
            }

            return(false);
        }
Example #5
0
        //returns booking if time difference -15 minutes until start of other booking or time.now-time_booking_end=>0
        internal LogIn.ServiceReference1.Booking checkIfAvailable(long libID, string resourceID)
        {
            try
            {

                DateTime now = DateTime.Now;

                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                booking1 = soap.checkIfAvailable(libID, resourceID, now);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Check if available??" + ex);
            }

            return booking1;
        }
Example #6
0
        //returns booking if time difference -15 minutes until start of other booking or time.now-time_booking_end=>0
        internal LogIn.ServiceReference1.Booking checkIfAvailable(long libID, string resourceID)
        {
            try
            {
                DateTime now = DateTime.Now;

                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                booking1 = soap.checkIfAvailable(libID, resourceID, now);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("Check if available??" + ex);
            }


            return(booking1);
        }
Example #7
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);
        }
Example #8
0
        internal bool checkIfRegistered(long libID, string resourceID)
        {
            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);

                return soap.checkIfRegistered(libID, resourceID);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in checking if this pc is registered to the system");
            }
            return false;
        }
Example #9
0
        internal ServiceReference1.User validateUser(string user, string password, long libraryId)
        {
            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                return soap.validateUser(user, password, libraryId);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in validation of the user");
            }

            return null;
        }
Example #10
0
 internal bool registerStation(string resourceID, string resourceType, long libraryID, string funct, bool adult, bool available, string name, int setup)
 {
     LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
     return soap.registerStation(resourceID, resourceType, libraryID, funct, adult, available, name, setup);
 }
Example #11
0
        internal ServiceReference1.Credentials getUserFBooking(LogIn.ServiceReference1.Booking booking, long libId)
        {
            if (booking != null)
            {

                if (!booking.ClientPass.Equals(string.Empty))
                {

                    LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                    return soap.getUserForBooking(booking.BookingID, libId);
                }

            }
            return null;
        }
Example #12
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;
        }
Example #13
0
 internal string getNameForStation(long libraryID)
 {
     LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
     return soap.getStationName(libraryID);
 }
Example #14
0
        internal bool createDirectBooking(long libraryId, string clienId, string clientPass, string resourceId, DateTime startDate, DateTime endDate)
        {
            try
            {
                LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
                return soap.createBooking(libraryId, clienId, clientPass, resourceId, startDate, endDate);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("There has been a problem in creating a direct booking");
            }

            return false;
        }
Example #15
0
 internal string getNameForStation(long libraryID)
 {
     LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
     return(soap.getStationName(libraryID));
 }
Example #16
0
 internal bool registerStation(string resourceID, string resourceType, long libraryID, string funct, bool adult, bool available, string name, int setup)
 {
     LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
     return(soap.registerStation(resourceID, resourceType, libraryID, funct, adult, available, name, setup));
 }