예제 #1
0
        public AddEmployee()
        {
            InitializeComponent();

            Employee = new Models.Employees();
            EmployeeAdd.DataContext = Employee;

            Models.EmployeesContext DB = new Models.EmployeesContext();

            Department.ItemsSource = DB.Departments.ToList();

            Position.ItemsSource = DB.Positions.ToList();

            DB.Dispose();
        }
예제 #2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     DB.SaveChanges();
     DB.Dispose();
 }
예제 #3
0
 private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     DB.Dispose();
 }