예제 #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);
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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;
        }
예제 #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);
        }
예제 #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);
        }
예제 #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;
        }
예제 #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;
        }
예제 #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);
 }
예제 #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;
        }
예제 #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;
        }
예제 #13
0
 internal string getNameForStation(long libraryID)
 {
     LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
     return soap.getStationName(libraryID);
 }
예제 #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;
        }
예제 #15
0
 internal string getNameForStation(long libraryID)
 {
     LogIn.ServiceReference1.PrinchService1SoapClient soap = new LogIn.ServiceReference1.PrinchService1SoapClient(binding, endpointAddress);
     return(soap.getStationName(libraryID));
 }
예제 #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));
 }