public Guest() { InitializeComponent(); guestRequests = new ObservableCollection <GuestRequest>(); GuestRequestList.DataContext = guestRequests; guest = new GuestRequest(); userControlush userControlush = new userControlush(guest); UserGrid.Children.Add(userControlush); Grid.SetRow(userControlush, 1); userControlush.CostumerChange += Controlush_CostumerChange; }
private void LogOutButton_Click(object sender, RoutedEventArgs e) { guest.GuestId = "_________"; guest.Private_Name = ""; guest.Family_Name = ""; guest.MailAddress = ""; userControlush userControlush = new userControlush(guest); UserGrid.Children.Add(userControlush); Grid.SetRow(userControlush, 1); LogOutButton.Visibility = Visibility.Collapsed; messageLog.Visibility = Visibility.Visible; GuestRequestList.Visibility = Visibility.Collapsed; MoreDetails.IsEnabled = false; userControlush.CostumerChange += Controlush_CostumerChange; }
public HostingUnit() { InitializeComponent(); host = new Host(); host.BankBranchDetails = new BankBranch(); Hostings = new ObservableCollection <BE.HostingUnit>(); Orders = new ObservableCollection <Order>(); OrdersOrHostingUnit = "hostingunit"; HostingUnitList.DataContext = Hostings; OrderList.DataContext = Orders; userControlush userControlush = new userControlush(host); UserGrid.Children.Add(userControlush); Grid.SetRow(userControlush, 1); userControlush.CostumerChange += Controlush_CostumerChange; }
private void LogOutButton_Click(object sender, RoutedEventArgs e) { host.HostId = ""; host.PrivateName = ""; host.FamilyName = ""; host.PhoneNumber = ""; host.MailAdress = ""; host.BankAccountNumber = 0; host.CollectionClearance = false; host.IsInPlace = false; host.Languages = ""; host.BankBranchDetails = new BankBranch(); UserGrid.Children.RemoveRange(0, 1); userControlush userControlush = new userControlush(host); UserGrid.Children.Add(userControlush); Grid.SetRow(userControlush, 1); LogOutButton.Visibility = Visibility.Collapsed; SignUpButton.Visibility = Visibility.Visible; AddHostingButton.IsEnabled = false; DeleteHostingButton.IsEnabled = false; UpdateHostingButton.IsEnabled = false; AddOrderButton.IsEnabled = false; closeOrder.IsEnabled = false; MoreDetails.IsEnabled = false; if (OrdersOrHostingUnit == "order") { messageLogOrder.Visibility = Visibility.Visible; OrderList.Visibility = Visibility.Collapsed; } else { messageLog.Visibility = Visibility.Visible; HostingUnitList.Visibility = Visibility.Collapsed; } userControlush.CostumerChange += Controlush_CostumerChange; Hostings.Clear(); }