private void DeleteHost_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; BO.Host host = (BO.Host)(button.DataContext); if (host.Status == BO.Status.INACTIVE) { MessageBox.Show("המארח כבר נמחק מהמערכת"); return; } MessageBoxResult mbr = MessageBox.Show("אתה בטוח שברצונך למחוק?", "הודעה", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No, MessageBoxOptions.RtlReading); if (mbr == MessageBoxResult.No) { return; } try { host.Status = BO.Status.INACTIVE; bl.UpdateHost(host); Hosts = bl.GetHosts().ToList(); HsotsList.ItemsSource = Hosts; } catch (MissingMemberException exp) { MessageBox.Show(exp.Message); } catch (InvalidOperationException exc) { MessageBox.Show(exc.Message); } }
public HostingUnisPage(BlApi.IBl bl, BO.Host host) { InitializeComponent(); this.bl = bl; this.Host = host; HostId = Host.Person.Id; MainListBox.ItemsSource = Host.HostingUnits; }
public NewHostPage(BlApi.IBl bl, BO.Host host) { InitializeComponent(); this.bl = bl; this.Host = host; this.DataContext = Host; NewHostGrid.DataContext = Host; CreateXMLBankFiles(); bankNameComboBox.ItemsSource = BankNumberDictionary.Values; host.BankBranch = new BO.BankBranch(); }
public MainOrdrerPage(BlApi.IBl bl, BO.Host host) { InitializeComponent(); this.host = host; this.bl = bl; myListview.ItemsSource = this.host.Orders; mailSend = new BackgroundWorker(); hostID = this.host.Person.Id; mailSend.DoWork += MailSend_DoWork; mailSend.RunWorkerCompleted += MailSend_RunWorkerCompleted; }
public OrdersPage(BlApi.IBl bl, BO.Host host, ListView MyOrderListView) { InitializeComponent(); this.bl = bl; this.host = host; Requests = bl.GetGetGuestRequestsExceptHostGr(host.Person.Id).ToList(); this.host = host; hostID = this.host.Person.Id; MainListBox.ItemsSource = Requests; mailSend = new BackgroundWorker(); myListview = MyOrderListView; }
public AddHostingUnitPage(BlApi.IBl bl, BO.Host host, ListBox listBox) { InitializeComponent(); Host = host; HostingUnit = new BO.HostingUnit(); HostingUnit.Diary = new bool[12, 31]; AddHUGrid.DataContext = HostingUnit; LB = listBox; this.bl = bl; // areaComboBox.ItemsSource = BO.MyDictionary.Locations.Select(x=>BO.MyDictionary.TranslateE(x)); areaComboBox.ItemsSource = MyDictionary.Locations.Select(x => MyDictionary.TranslateEnumToString(x)); }
private void HostButton_Click(object sender, RoutedEventArgs e) { try { currentHost = bl.GetHost(CurrentPerson.Id); NavigationService.Navigate(new MainHostPage(bl, currentHost)); } catch (MissingMemberException ex) { MessageBox.Show("עלייך להשלים פרטים אם הינך מעוניין להמשיך כמארח", "הודעה", MessageBoxButton.OK, MessageBoxImage.Information); currentHost = new BO.Host(); currentHost.Person = CurrentPerson; NavigationService.Navigate(new NewHostPage(bl, currentHost)); } }
public MainHostPage(BlApi.IBl bl, BO.Host host) { InitializeComponent(); this.bl = bl; this.Host = host; UpdateHostGrid.DataContext = Host; HostId = Host.Person.Id; try { this.Host.HostingUnits = bl.GetHostingUnitsOfHost(HostId); this.Host.Orders = bl.GetOrdersOfHost(HostId); } catch { this.Host.HostingUnits = new List <BO.HostingUnit>(); this.Host.Orders = new List <BO.Order>(); } }