private void BtnCancel_Click(object sender, EventArgs e) { InitControls(); myMode = BtnMode.NONE; // 모드 초기화 GrdMemberTbl.Focus(); }
private void BtnDelete_Click(object sender, EventArgs e) { if (myMode != BtnMode.UPDATE) { MetroMessageBox.Show(this, $"삭제할 데이터를 선택하세요.", "알림"); return; } DialogResult choice = MetroMessageBox.Show(this, "삭제하시겠습니까?", "경고", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (choice == DialogResult.No) { return; } myMode = BtnMode.DELETE; //DeleteData(); SaveData(); InitControls(); GrdMemberTbl.Focus(); }