Example #1
0
        public RegisterUserPage()
        {
            InitializeComponent();
            DataContext = _correnClients;

            SuperShopEntities1.Getcontext().Клиенты.ToList();
        }
Example #2
0
        private void Button_Click(object sender, RoutedEventArgs e) // кнопка зарегестрировать
        {
            string userName     = textBoxNamef_reg.Text.Trim();
            string userLastName = textBoxNameLast_reg.Text.Trim();
            string phone        = textBoxPhone.Text.Trim();
            string login        = textBoxLogin.Text.Trim();
            string password     = PasswordBox.Password;
            string password1    = PasswordBox.Password;

            if (login.Length < 5)
            {
                textBoxLogin.ToolTip    = "Минимум 6 символов";
                textBoxLogin.Background = Brushes.DarkRed;
            }
            else if (password.Length < 5)
            {
                PasswordBox.ToolTip    = "Минимум 6 символов";
                PasswordBox.Background = Brushes.DarkRed;
            }
            else if (password != password1)
            {
                PasswordBox.ToolTip    = "Пароль не совпадает";
                PasswordBox.Background = Brushes.DarkRed;
            }
            else if (userName == "")
            {
                textBoxNamef_reg.ToolTip    = "Введите имя";
                textBoxNamef_reg.Background = Brushes.DarkRed;
            }
            else if (phone == "")
            {
                textBoxPhone.ToolTip    = "Вы забыли про телефон";
                textBoxPhone.Background = Brushes.DarkRed;
            }



            else
            {
                textBoxLogin.ToolTip    = "";
                textBoxLogin.Background = Brushes.Transparent;

                MessageBox.Show("Все хорошо");

                SuperShopEntities1.Getcontext().Клиенты.Add(_correnClients);

                SuperShopEntities1.Getcontext().SaveChanges();
            }
        }
Example #3
0
        public testingPage()
        {
            InitializeComponent();

            DGTable.ItemsSource = SuperShopEntities1.Getcontext().Клиенты.ToList();
        }
        public LoginEnterPage()
        {
            InitializeComponent();

            SuperShopEntities1.Getcontext().Клиенты.ToList();
        }