Beispiel #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            this.Hide();
            Main_menu_admin_ f3 = new Main_menu_admin_();

            f3.ShowDialog();
        }
Beispiel #2
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            this.Hide();
            Main_menu_admin_ ghy = new Main_menu_admin_();

            ghy.ShowDialog();
        }
Beispiel #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            Main_menu_admin_ f465 = new Main_menu_admin_();

            f465.ShowDialog();
        }
Beispiel #4
0
 private void btnVhid_Click(object sender, EventArgs e)
 {
     try
     {
         string          myConnection  = "datasource=localhost;port=3306;username=root;password=23051997";
         MySqlConnection myConn        = new MySqlConnection(myConnection);
         MySqlCommand    SelectCommand = new MySqlCommand("select * from epidsys.user where login='******' and password= '******';", myConn);
         MySqlDataReader myAdmin;
         if (log == txtLogin.Text || pass == txtPass.Text)
         {
             this.Hide();
             Main_menu_admin_ f3 = new Main_menu_admin_();
             f3.ShowDialog();
         }
         else
         {
             myConn.Open();
             myAdmin = SelectCommand.ExecuteReader();
             int count = 0;
             while (myAdmin.Read())
             {
                 count = count + 1;
             }
             if (count == 1)
             {
                 this.Hide();
                 Main_menu f2 = new Main_menu();
                 f2.ShowDialog();
             }
             else
             {
                 MessageBox.Show("nevirnyy parol");
             }
             myConn.Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }