/// <summary> /// Update Hotel function /// </summary> /// <param name="Hotels"></param> /// <returns></returns> public static bool UpdateHotelBL(Hotel Hotels) { bool Hoteladded = false; try { //if (ValidateHotel(Hotels)) { Hoteladded = HMS_DAL.UpdateHotelDAL(Hotels); } } catch (HMS_Exception e) { throw e; } return(Hoteladded); }
/// <summary> /// Add bookings function /// </summary> /// <param name="Book"></param> /// <returns></returns> public static bool AddBookingBL(BookingDetails Book) { bool Bookingadded = false; try { //if (ValidateBooking(Book)) { Bookingadded = HMS_DAL.AddBookingDetailsDAL(Book); } } catch (HMS_Exception e) { throw e; } return(Bookingadded); }
/// <summary> /// Update user function /// </summary> /// <param name="User"></param> /// <returns></returns> public static bool UpdatdeUserBL(Users User) { bool Useradded = false; try { // if (ValidateUser(User)) { Useradded = HMS_DAL.UpdateUserDAL(User); } } catch (HMS_Exception e) { throw e; } return(Useradded); }
/// <summary> /// To Add Room /// </summary> /// <param name="room"></param> /// <returns></returns> public static bool AddRoomBL(RoomDetails room) { bool Roomadded = false; try { //if (ValidateRoom(room)) { Roomadded = HMS_DAL.AddRoomDAL(room); } } catch (HMS_Exception e) { throw e; } return(Roomadded); }
/// <summary> /// Hotel Login function /// </summary> /// <param name="Hotel"></param> /// <returns></returns> public static bool HotelLoginBL(Hotel Hotel) { bool HotelLoginBL = false; try { //if (ValidateLogin(Admin)) { HotelLoginBL = HMS_DAL.HotelLoginDetailsDAL(Hotel); } } catch (HMS_Exception e) { throw e; } return(HotelLoginBL); }
/// <summary> /// User Login function /// </summary> /// <param name="user"></param> /// <returns></returns> public static bool UserLoginBL(User user) { bool UserLoginBL = false; try { //if (ValidateLogin(Admin)) { UserLoginBL = HMS_DAL.UserLoginDetailsDAL(user); } } catch (HMS_Exception e) { throw e; } return(UserLoginBL); }
/// <summary> /// Admin Login /// </summary> /// <param name="Admin"></param> /// <returns></returns> public static bool AdminLoginBL(Admin Admin) { bool AdminLogin = false; try { //if (ValidateLogin(Admin)) { AdminLogin = HMS_DAL.AdminLoginDetailsDAL(Admin); } } catch (HMS_Exception e) { throw e; } return(AdminLogin); }
/// <summary> /// Function to display rooms for hotels /// </summary> /// <param name="Hotel"></param> /// <returns></returns> public static List <RoomDetails> FilteredRoomBL(string Hotel) { List <RoomDetails> Blist = new List <RoomDetails>(); try { Blist = HMS_DAL.FilterRoomsDAL(Hotel); if (Blist == null) { throw new HMS_Exception("No Room Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(Blist); // Returns the list of Hotel }
/// <summary> /// User booking history /// </summary> /// <param name="User"></param> /// <returns></returns> public static List <BookingDetails> FilteredBookingBL(string User) { List <BookingDetails> Blist = new List <BookingDetails>(); try { Blist = HMS_DAL.FilteredBookingDAL(User); if (Blist == null) { throw new HMS_Exception("No Booking Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(Blist); // Returns the list of Hotel }
/// <summary> /// Search hotel on basis of city /// </summary> /// <param name="city"></param> /// <returns></returns> public static List <Hotel> SearchAllHotelBL(string city) { List <Hotel> Hlist = new List <Hotel>(); try { Hlist = HMS_DAL.SearchHotelDAL(city); if (Hlist == null) { throw new HMS_Exception("No Hotel Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(Hlist); // Returns the list of Hotel }
/// <summary> /// To Display Rooms /// </summary> /// <returns></returns> public static List <RoomDetails> DisplayAllRoomBL() { List <RoomDetails> rlist = new List <RoomDetails>(); try { rlist = HMS_DAL.ShowAllRoomDAL(); if (rlist == null) { throw new HMS_Exception("No room Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(rlist); // Returns the list of Room }
/// <summary> /// To Display Bookings according to Rooms /// </summary> /// <param name="RoomId"></param> /// <returns></returns> public static List <BookingDetails> DisplayAllRoomBookingBL(string RoomId) { List <BookingDetails> rlist = new List <BookingDetails>(); try { rlist = HMS_DAL.ShowAllRoomBookingDetailsDAL(RoomId); if (rlist == null) { throw new HMS_Exception("No Booking Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(rlist); // Returns the list of Booking }
/// <summary> /// Display User bookings /// </summary> /// <returns></returns> public static List <BookingDetails> DisplayAllUserBookingBL() { List <BookingDetails> Blist = new List <BookingDetails>(); try { Blist = HMS_DAL.ShowAllUserBookingDetailsDAL(); if (Blist == null) { throw new HMS_Exception("No Booking Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(Blist); // Returns the list of booking }
/// <summary> /// Function to display users /// </summary> /// <returns></returns> public static List <Users> DisplayAllUserBL() { List <Users> Ulist = new List <Users>(); try { Ulist = HMS_DAL.ShowAllUsersDAL(); if (Ulist == null) { throw new HMS_Exception("No User Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(Ulist); // Returns the list of User }
/// <summary> /// To Display Hotels /// </summary> /// <returns></returns> public static List <Hotel> DisplayAllHotelBL() { List <Hotel> Hlist = new List <Hotel>(); try { Hlist = HMS_DAL.ShowAllHotelDAL(); if (Hlist == null) { throw new HMS_Exception("No Hotel Found"); } } catch (HMS_Exception p) { throw p; } catch (SqlException e) { throw e; } return(Hlist); // Returns the list of Hotel }