private void ViewRecord(object record) { ShowHostingUnit ModelWindow = new ShowHostingUnit(); if (record is GuestRequest) { ModelWindow.Title = "צפייה בדרישת לקוח"; ModelWindow.SetModelGuestRequest((GuestRequest)record); ModelWindow.Show(); } else if (record is HostingUnit) { ModelWindow.Title = "צפייה ביחידת אירוח"; ModelWindow.SetModelHostingUnit((HostingUnit)record); ModelWindow.Show(); } else if (record is Order) { ModelWindow.Title = "צפייה בהזמנה"; ModelWindow.SetModelOrder((Order)record); ModelWindow.Show(); } }
private void UpdateRecord(object record) { ShowHostingUnit ModelWindow = new ShowHostingUnit(); if (record is HostingUnit) { ModelWindow.Title = "עדכון יחידת אירוח"; ModelWindow.SetModelHostingUnit((HostingUnit)record, true); ModelWindow.Show(); } else if (record is Order) { ModelWindow.Title = "עדכון הזמנה"; ModelWindow.SetModelOrder((Order)record, true); ModelWindow.Show(); } }
private void PerformUpdateUnit(object sender, RoutedEventArgs e) { CloseWindows(); if (updateWindow == null || !updateWindow.IsActive) { updateWindow = new ShowHostingUnit(); } updateWindow.Title = "עדכון יחידת אירוח"; updateWindow.SetModelHostingUnit(hostingUnit, true); updateWindow.Show(); }
private void PerformAddUnit(object sender, RoutedEventArgs e) { ShowHostingUnit addWindow = new ShowHostingUnit(); addWindow.Title = "הופסת יחידת אירוח"; addWindow.SetModelHostingUnit(new HostingUnit { Diary = new bool[12, 31], Owner = new Host { BankAccountDetails = new BankAccount() } }, true); addWindow.Show(); }
private void PerformViewUnit(object sender, RoutedEventArgs e) { CloseWindows(); if (viewWindow == null || !viewWindow.IsActive) { viewWindow = new ShowHostingUnit(); } viewWindow.Title = "צפייה ביחידת אירוח"; viewWindow.SetModelHostingUnit(hostingUnit); viewWindow.Show(); }