private void button1_Click(object sender, EventArgs e) { db = new DataAccess("park1", "park1"); if (db.CheckIdPwd(textBox1.Text.ToString(), textBox2.Text.ToString())) { this.Visible = false; if (checkBox1.Checked == true) { //관리자모드 AdminSetting adminSetting = new AdminSetting(DB); adminSetting.Owner = this; adminSetting.ShowDialog(); } else { MainDashboard dash = new MainDashboard(db); dash.Owner = this; dash.ShowDialog(); } } else { MessageBox.Show("아이디 또는 비밀번호 오류입니다."); } }