Ejemplo n.º 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            ManagerView mv = new ManagerView();

            mv.Show();
            Close();
        }
Ejemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Model1 db  = new Model1();
            int    a   = Convert.ToInt32(idtxt.Text);
            var    cls = db.Managers
                         .Where(c => c.id_manager == a)
                         .FirstOrDefault();

            cls.username        = username.Text;
            cls.password        = password.Text;
            cls.last_name       = last.Text;
            cls.first_name      = first.Text;
            cls.middle_name     = middle.Text;
            cls.address         = addr.Text;
            cls.phone           = phone.Text;
            cls.email           = email.Text;
            cls.number_passport = number.Text;
            cls.serial_passport = serial.Text;

            db.SaveChanges();

            MessageBox.Show("Данные о менеджере изменены!");
            ManagerView mv = new ManagerView();

            mv.Show();
            Close();
        }
Ejemplo n.º 3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Model1   db     = new Model1();
         Managers master = new Managers
         {
             username        = login.Text,
             password        = password.Text,
             first_name      = name.Text,
             last_name       = family.Text,
             middle_name     = patronymic.Text,
             address         = address.Text,
             phone           = phone.Text,
             email           = email.Text,
             serial_passport = serial.Text,
             number_passport = number.Text
         };
         db.Managers.Add(master);
         db.SaveChanges();
         MessageBox.Show("Менеджер добавлен!");
         ManagerView mv = new ManagerView();
         mv.Show();
         Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 4
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            ManagerView mv = new ManagerView();

            mv.Show();
            Close();
        }