示例#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));
 }