Beispiel #1
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            using (var context = new DatabaseContext())
            {
                var selectedRow = dcUsersList.SelectedItem as UsersLists;

                if (selectedRow != null)
                {
                    UserAccountWindow.UserAccountId = selectedRow.UserAccountId;

                    var window = new UserAccountWindow();
                    window.Top = Application.Current.MainWindow.Top + 98;
                    window.Height = screenHeight - 115;
                    window.Width = (screenWidth - 90) * 0.35;
                    window.ShowDialog();
                }
                else
                {
                    NullMessage();
                }

                UserAccountWindow.UserAccountId = "";
               LoadUsers();
            }
        }
Beispiel #2
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            var window = new UserAccountWindow();
            window.Top = Application.Current.MainWindow.Top + 98;
            window.Height = screenHeight - 115;
            window.Width = (screenWidth - 90) * 0.35;
            window.ShowDialog();

            LoadUsers();
        }