Ejemplo n.º 1
0
        private void ButtonAddEmployee_OnClick(object sender, RoutedEventArgs e)
        {
            NewEmployeeWindow newEmployee = new NewEmployeeWindow();

            newEmployee.Employee = new Employee
            {
                Id           = Company.Employees.Max(em => em.Id) + 1,
                Fam          = string.Empty,
                Name         = string.Empty,
                Age          = default,
        private void BtnNewEmployee_Click(object sender, RoutedEventArgs e)
        {
            NewEmployeeWindow newEmployeeWindow = new NewEmployeeWindow();
            var result = newEmployeeWindow.ShowDialog();

            // When enter information successfully
            if (result.HasValue && result.Value)
            {
                scheduleViewModel.RefreshAppointments();
            }
        }