Exemplo n.º 1
0
        private void buttonAdd_Click(object sender, RoutedEventArgs e)
        {
            WindowAuthetification wau = new WindowAuthetification(Connection, AuthType.Add, CurrentAdmin, new AdminInfo());

            wau.ShowDialog();

            UpdateListView();
        }
Exemplo n.º 2
0
        private void buttonEnterAdmin_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                WindowAuthetification wa = new WindowAuthetification(ConnectionString, AuthType.Enter);

                wa.ShowDialog();

                if (wa.DialogResult == true)
                {
                    MenuManager menu = new MenuManager(ConnectionString, wa.Login);

                    menu.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Дані аутинтифікації не вірні!", "Помилка");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 3
0
        private void buttonChange_Click(object sender, RoutedEventArgs e)
        {
            if (listView.SelectedItem == null)
            {
                MessageBox.Show("Спочатку треба обрати користувача", "Увага"); return;
            }

            switch (Type_)
            {
            case TypeForm.Admin:
                WindowAuthetification wau = new WindowAuthetification(Connection, AuthType.Update, CurrentAdmin, (listView.SelectedItem as AdminInfo));

                wau.ShowDialog();

                UpdateListView();

                break;

            case TypeForm.Users:
            case TypeForm.User:
                SelectUser();
                break;
            }
        }
Exemplo n.º 4
0
        private void buttonChange_Click(object sender, RoutedEventArgs e)
        {
            if (listView.SelectedItem == null) { MessageBox.Show("Спочатку треба обрати користувача", "Увага"); return; }

            switch (Type_)
            {
                case TypeForm.Admin:
                    WindowAuthetification wau = new WindowAuthetification(Connection, AuthType.Update, CurrentAdmin, (listView.SelectedItem as AdminInfo));

                    wau.ShowDialog();

                    UpdateListView();

                    break;
                case TypeForm.Users:
                case TypeForm.User:
                    SelectUser();
                    break;

            }
        }
Exemplo n.º 5
0
        private void buttonAdd_Click(object sender, RoutedEventArgs e)
        {
            WindowAuthetification wau = new WindowAuthetification(Connection, AuthType.Add, CurrentAdmin, new AdminInfo());

            wau.ShowDialog();

            UpdateListView();
        }