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