private void ExchangeDuty_Click(object sender, RoutedEventArgs e) { ExchangeDutyWindow exchangeDutyWindow = new ExchangeDutyWindow(); exchangeDutyWindow.Show(); this.Hide(); }
public ExchangeDutyWindow() { InitializeComponent(); ExchangeDutyWindowInstance = this; UpdateEmployeeCB(); UpdateDutyExchangeList(); this.Closing += WindowClosed; }
public PopupExchangeDutyWindow(List <string> employeeList, string exchange, int dutyID, ExchangeDutyWindow exchangeDutyWindow) { InitializeComponent(); DutyID = dutyID; EmployeeCB.ItemsSource = employeeList; DutyLabel.Content = exchange; ExchangeDutyWindow = exchangeDutyWindow; this.Closing += WindowClosed; }
private void Confirm_Click(object sender, RoutedEventArgs e) { int newEmployeeID = EmployeeRepository.GetEmployeeID(EmployeeCB.SelectedValue.ToString()); int oldEmployeeID = EmployeeRepository.GetEmployeeID(DutyLabel.Content.ToString().Substring(16)); int dutyID = DutyRepository.GetDuty(DutyLabel.Content.ToString().Substring(0, 10), DutyLabel.Content.ToString().Substring(16)).DutyID; DBDutyController.UpdateDuty(newEmployeeID, DutyID); DBDutyExchangeController.DeleteDutyExchange(dutyID, oldEmployeeID); DutyExchangeRepository.RemoveDutyExchange(dutyID, oldEmployeeID); ExchangeDutyWindow.Close(); this.Close(); }