예제 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Model1 db  = new Model1();
            int    a   = Convert.ToInt32(idtxt.Text);
            var    cls = db.Clients
                         .Where(c => c.id_user == a)
                         .FirstOrDefault();

            cls.username   = username.Text;
            cls.password   = password.Text;
            cls.last_name  = last.Text;
            cls.first_name = first.Text;
            cls.phone      = phone.Text;
            cls.email      = email.Text;
            if (chk.IsChecked == true)
            {
                cls.block = 1;
            }
            else
            {
                cls.block = 0;
            }
            db.SaveChanges();

            MessageBox.Show("Данные о клиенте изменены!");
            ClientViewAdmin cv = new ClientViewAdmin();

            cv.Show();
            Close();
        }
예제 #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            ClientViewAdmin cv = new ClientViewAdmin();

            cv.Show();
            Close();
        }
예제 #3
0
        private void MenuItem_Click_2(object sender, RoutedEventArgs e)
        {
            ClientViewAdmin cv = new ClientViewAdmin();

            cv.Show();
            Close();
        }