コード例 #1
0
        private void Main_Load(object sender, EventArgs e)
        {
            // DAL.DAL.con.Open();
            // MessageBox.Show(DAL.DAL.con.State.ToString());
            DAL.DAL.cmd = new MySqlCommand("select * from user", DAL.DAL.con);
            MySqlDataAdapter da = new MySqlDataAdapter(DAL.DAL.cmd);
            DataTable        dt = new DataTable();

            da.Fill(dt);
            if (dt.Rows.Count == 0)
            {
                adminToolStripMenuItem.Enabled = false;
                fileToolStripMenuItem.Enabled  = false;
                AddUser r = new AddUser();
                r.ShowDialog();
            }
        }
コード例 #2
0
 private void addUserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     PL.AddUser add = new AddUser();
     add.Show();
 }