private void FillStartingDashboardContent() { //get info from data base to use it later List <Guest> currentGuests = HotelManagmentLogic.Entity.CommonOperations.DatabaseOperations .GetFullTableBaseOnType <Guest>() .ReturnedData .ConvertToGenericList <Guest>(); List <Booking> bookingTable = HotelManagmentLogic.Entity.CommonOperations.DatabaseOperations .GetFullTableBaseOnType <Booking>() .ReturnedData .ConvertToGenericList <Booking>(); //fill box about last booked guest and store that variable Guest lastBookedGuest = FillLastBookedGuestOutput(currentGuests); //fill box which represent logged user name UsernameTextBoxWelcome.Text = ProgramManagement.GetLoggedUser().Name; //booked guest amount - fill x/x format and also progress bar FillGuestCurrentGuestCountOutput(currentGuests); //inner join booking and guests table to get data about closest booking end date FillClosestBookEndingOutput(bookingTable, currentGuests, lastBookedGuest); }
private void AdministrationButton_Click(object sender, RoutedEventArgs e) { if (ProgramManagement.GetLoggedUser().UserType == HotelManagmentLogic.Enums.UserType.Administrator) { InnerFrame.Content = CheckIfContentActive <AdministrationControl>() ? WindowsManagement.GetAdministrationControlInstance() : InnerFrame.Content; AdministrationButton.Background = activeButtonColor; } else { MessageBox.Show(HotelManagmentLogic.Configuration.OutputMessages.CantAccessToThatContent); } }