Exemplo n.º 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            String query = "select empl_id from login where username='******';";

            emp_id = "no_emp";
            MySqlConnection con = new MySqlConnection("server = localhost; user id = root; password=root; database=salary_management");

            con.Open();
            MySqlCommand    cmd = new MySqlCommand(query, con);
            MySqlDataReader dr  = cmd.ExecuteReader();

            while (dr.Read())
            {
                emp_id = dr["empl_id"].ToString();
            }


            Form view1 = new view(emp_id);

            view1.TopLevel   = false;
            view1.AutoScroll = true;
            this.flowLayoutPanel2.Controls.Clear();
            this.flowLayoutPanel2.Controls.Add(view1);
            view1.Show();
            con.Close();
        }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Form view = new view();

            view.TopLevel   = false;
            view.AutoScroll = true;
            this.flowLayoutPanel2.Controls.Add(view);
            view.Show();
        }