private void PembelianView_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.F2: // Cari OnCariData?.Invoke(sender, e); break; case Keys.F3: // Hapus OnHapusData?.Invoke(sender, e); break; case Keys.F4: // Simpan OnSimpanData?.Invoke(sender, e); break; case Keys.F5: // Bersihkan OnBersihkanData?.Invoke(sender, e); break; case Keys.F6: // Cetak Nota OnCetakNota?.Invoke(sender, e); break; case Keys.F12: // Tutup if (!listDataGrid.CurrentCell.IsEditing) { Close(); } break; } }
private void buttonSimpan_Click(object sender, EventArgs e) { OnSimpanData?.Invoke(sender, e); }