using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AuthKhritankov.Pages
{
    /// <summary>
    /// Логика взаимодействия для Page2.xaml
    /// </summary>
    public partial class Page2 : Page
    {
        public Page2()
        {
            InitializeComponent();
        }


        private void ButtonSave_OnClick(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(TextBoxLogReg.Text) 
                || string.IsNullOrEmpty(TextBoxPassReg.Password) 
                || string.IsNullOrEmpty(TextBoxRoleReg.Text) 
                || string.IsNullOrEmpty(TextBoxNameReg.Text))
            {
                MessageBox.Show("Пожалуйста, заполните все поля регистрации.");
                return;
            }

            using (var db = new AuthKhritankovLoginEntities3())
            {
                var login = TextBoxLogReg.Text;
                var password = TextBoxPassReg.Password;
                var role = TextBoxRoleReg.Text;
                var name = TextBoxNameReg.Text;
            }
        }
    }
}
