示例#1
0
        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;
            }
        }
示例#2
0
 private void buttonClearData_Click(object sender, EventArgs e)
 {
     OnBersihkanData?.Invoke(sender, e);
 }