private void mainMenuToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.Hide();
     Main_Menu newMainMenu = new Main_Menu();
     newMainMenu.Show();
 }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet readerDataSet = new DataSet();
                MySqlDataAdapter Adapter = new MySqlDataAdapter("select * from admins where user_id='" + UserName.Text + "'", myConn);
                Adapter.Fill(readerDataSet);
                if( UserName.Text == (string)readerDataSet.Tables[0].Rows[0].ItemArray[0]&& Password.Text == (string)readerDataSet.Tables[0].Rows[0].ItemArray[1])
                {
                    Main_Menu mainMenu = new Main_Menu(UserName.Text,
                        ((SByte)readerDataSet.Tables[0].Rows[0].ItemArray[2] == 1),
                        ((SByte)readerDataSet.Tables[0].Rows[0].ItemArray[3] == 1),
                        ((SByte)readerDataSet.Tables[0].Rows[0].ItemArray[4] == 1));
                    this.Hide();
                    mainMenu.Show();

                }
                else
                {
                    MessageBox.Show("Invalid User Name or Password", "Warning");
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show("Invalid User Name or Password", "Warning");
            }
        }