コード例 #1
0
        private void CreateNewEmployee(object sender, ExecutedRoutedEventArgs e)
        {
            var employeeDetail = new EmployeeDetail(Application.Current.GetService <IDbContextFactory>());

            employeeDetail.Owner = this;
            employeeDetail.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            employeeDetail.ShowDialog();
        }
コード例 #2
0
        private void EditEmployee(int employeeId)
        {
            var dbContextFactory = Application.Current.GetService <IDbContextFactory>();
            var employeeDetail   = new EmployeeDetail(dbContextFactory, employeeId);

            employeeDetail.Owner = this;
            employeeDetail.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            employeeDetail.ShowDialog();
        }