Exemplo n.º 1
0
        private void Tool_Stuffbusic_Click(object sender, EventArgs e)
        {
            login         login_username = new login();
            SqlConnection mysql          = new SqlConnection(contsql);

            mysql.Open();
            SqlCommand    mycmd = new SqlCommand("SELECT * FROM position ", mysql);
            SqlDataReader sqldr = mycmd.ExecuteReader();

            while (sqldr.Read())
            {
                if (temp.e_num == sqldr["e_number"].ToString())
                {
                    string M_str_sql_position = sqldr["e_position"].ToString();
                    if (M_str_sql_position == "经理")
                    {
                        ManFile child = new ManFile();
                        child.TopLevel        = false;
                        child.Dock            = System.Windows.Forms.DockStyle.Fill;
                        child.FormBorderStyle = FormBorderStyle.None;
                        child.Parent          = this.panel;
                        this.panel.Controls.Add(child);
                        child.Show();
                    }
                    else if (M_str_sql_position == "员工")
                    {
                        WindowsFormsApplication1.Folder1.userabc child = new WindowsFormsApplication1.Folder1.userabc();
                        child.TopLevel        = false;
                        child.Dock            = System.Windows.Forms.DockStyle.Fill;
                        child.FormBorderStyle = FormBorderStyle.None;
                        child.Parent          = this.panel;
                        this.panel.Controls.Add(child);
                        child.Show();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ManFile f1 = new ManFile();

            f1.Show();
        }