private void find_Click(object sender, EventArgs e) // 찾기 버튼 { string[] info = reviseinfo.Getinfo(); dataGridView1.ColumnCount = 1; dataGridView1.Columns[0].Width = 200; dataGridView1.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; dataGridView1.Columns[0].Name = "학생 목록"; dataGridView1.Rows.Clear(); foreach (List <string> s in db.FindStudent(info)) { dataGridView1.Rows.Add(String.Join("/", s.ToArray()).ToString()); } dataGridView1.ClearSelection(); }
private void add_Click(object sender, EventArgs e) // 추가 버튼 { if (MessageBox.Show("등록하시겠습니까?", "확인", MessageBoxButtons.YesNo) == DialogResult.Yes) { string[] info = addinfo.Getinfo(); if (db.InsertStudent(info)) { MessageBox.Show("등록완료"); } else { MessageBox.Show("등록실패"); } } else { MessageBox.Show("등록 취소"); } }