Beispiel #1
0
        /// <summary>
        /// Zarzadzanie
        /// </summary>


        //Dodawanie pracownika
        private void Bt_AddEmp_Click(object sender, RoutedEventArgs e)
        {
            CrNewEmpWindow crNewEmpWindow = new CrNewEmpWindow();

            crNewEmpWindow.ShowDialog();
            EmpList();
        }
Beispiel #2
0
        //modyfikuj pracownika
        private void ModEmp()
        {
            var            emp            = (Employees)LisView_Emp.SelectedItem;
            CrNewEmpWindow crNewEmpWindow = new CrNewEmpWindow(emp.Id_Employee);

            crNewEmpWindow.Bt_ModEmp.IsEnabled   = true;
            crNewEmpWindow.Bt_CrNewEmp.IsEnabled = false;
            crNewEmpWindow.label.Content         = "Modyfikacja pracownika";
            crNewEmpWindow.ShowDialog();
            Bt_ModEmp.IsEnabled = false;
        }
Beispiel #3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            List <Employees> employeesList;

            using (CarRentalEntities db = new CarRentalEntities())
            {
                employeesList = db.Employees.ToList();
            }
            if (employeesList.Count == 0)
            {
                CrNewEmpWindow newEmpWindow = new CrNewEmpWindow();
                newEmpWindow.CheckB_Perm.IsChecked = true;
                newEmpWindow.CheckB_Perm.IsEnabled = false;
                newEmpWindow.ShowDialog();
            }
        }