public void Ok(object sender, object data) { if (data is Produk) // pencarian produk baku { var produk = (Produk)data; if (!IsExist(produk.produk_id)) { SetItemProduk(this.gridControl, _rowIndex, _colIndex + 1, produk); this.gridControl.Refresh(); RefreshTotal(); GridListControlHelper.SetCurrentCell(this.gridControl, _rowIndex, _colIndex + 1); } else { MsgHelper.MsgWarning("Data produk sudah diinputkan"); GridListControlHelper.SelectCellText(this.gridControl, _rowIndex, _colIndex); } } else if (data is Supplier) // pencarian supplier { this._supplier = (Supplier)data; txtSupplier.Text = this._supplier.nama_supplier; KeyPressHelper.NextFocus(); } }
private void txtKabupatenTujuan_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { var kabupaten = ((AdvancedTextbox)sender).Text; IList <KabupatenTujuanRajaOngkir> listOfKabupaten = GetKabupatenByName <KabupatenTujuanRajaOngkir>(kabupaten); if (listOfKabupaten.Count == 0) { MsgHelper.MsgWarning("Data kota/kabupaten tujuan tidak ditemukan"); txtKabupatenTujuan.Focus(); txtKabupatenTujuan.SelectAll(); } else if (listOfKabupaten.Count == 1) { _kabupatenTujuan = listOfKabupaten[0]; txtKabupatenTujuan.Text = _kabupatenTujuan.nama_kabupaten; KeyPressHelper.NextFocus(); } else // data lebih dari satu { var frmLookup = new FrmLookupReferensi("Data Kota/Kabupaten Tujuan", listOfKabupaten); frmLookup.Listener = this; frmLookup.ShowDialog(); } } }
private void FrmEntryPengeluaranBiaya_KeyDown(object sender, KeyEventArgs e) { if (KeyPressHelper.IsShortcutKey(Keys.F1, e)) // tambah data jenis pengeluaran { ShowEntryJenisPengeluaran(); } }
public void Ok(object sender, object data) { if (data is Produk) // pencarian produk baku { var produk = (Produk)data; if (!IsExist(produk.produk_id)) { double diskon = produk.diskon > 0 ? produk.diskon : produk.Golongan.diskon; SetItemProduk(this.gridControl, _rowIndex, _colIndex + 1, produk, diskon: diskon); this.gridControl.Refresh(); RefreshTotal(); GridListControlHelper.SetCurrentCell(this.gridControl, _rowIndex, _colIndex + 1); } else { MsgHelper.MsgWarning("Data produk sudah diinputkan"); GridListControlHelper.SelectCellText(this.gridControl, _rowIndex, _colIndex); } } else if (data is Customer) // pencarian customer { this._customer = (Customer)data; txtCustomer.Text = this._customer.nama_customer; KeyPressHelper.NextFocus(); } }
private void txtNamaCustomer_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { btnCari_Click(sender, e); } }
private void txtSupplier_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { var name = ((TextBox)sender).Text; ISupplierBll bll = new SupplierBll(MainProgram.isUseWebAPI, MainProgram.baseUrl, _log); var listOfSupplier = bll.GetByName(name); if (listOfSupplier.Count == 0) { MsgHelper.MsgWarning("Data supplier tidak ditemukan"); txtSupplier.Focus(); txtSupplier.SelectAll(); } else if (listOfSupplier.Count == 1) { _supplier = listOfSupplier[0]; txtSupplier.Text = _supplier.nama_supplier; KeyPressHelper.NextFocus(); } else // data lebih dari satu { var frmLookup = new FrmLookupReferensi("Data Supplier", listOfSupplier); frmLookup.Listener = this; frmLookup.ShowDialog(); } } }
private void txtTelepon_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { Simpan(); } }
public void Ok(object sender, object data) { if (data is JualProduk) // pencarian nota { var jual = (JualProduk)data; if (!IsExist(jual.nota)) { SetItemBayar(this.gridControl, _rowIndex, _colIndex + 1, jual); this.gridControl.Refresh(); GridListControlHelper.SetCurrentCell(this.gridControl, _rowIndex, 5); // kolom pembayaran } else { MsgHelper.MsgWarning("Data nota sudah diinputkan"); GridListControlHelper.SelectCellText(this.gridControl, _rowIndex, _colIndex); } } else if (data is Customer) // pencarian customer { this._customer = (Customer)data; txtCustomer.Text = this._customer.nama_customer; KeyPressHelper.NextFocus(); } }
private void FrmPreviewReport_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { this.Close(); } }
private void FrmCetakLabelBarcodeProduk_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { this.Close(); } }
private void FrmDialogInfo_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { Batal(); } }
private void FrmLookupMinimalStok_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { this.Close(); } }
private void FrmCetakLabelHargaProduk_KeyDown(object sender, KeyEventArgs e) { if (KeyPressHelper.IsShortcutKey(Keys.F11, e)) { btnPindahKeDaftarCetak_Click(sender, new EventArgs()); } }
private void FrmLookupHistoriPembayaran_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { this.Close(); } }
private void txtSaldoAwal_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { btnLogin_Click(sender, e); } }
private void txtJenisPengeluaran_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { Simpan(); } }
public void Ok(object sender, object data) { if (data is BeliProduk) // pencarian nota { var beli = (BeliProduk)data; if (!IsExist(beli.nota)) { SetItemBayar(this.gridControl, _rowIndex, _colIndex + 1, beli); this.gridControl.Refresh(); GridListControlHelper.SetCurrentCell(this.gridControl, _rowIndex, 5); // kolom pembayaran } else { MsgHelper.MsgWarning("Data nota sudah diinputkan"); GridListControlHelper.SelectCellText(this.gridControl, _rowIndex, _colIndex); } } else if (data is Supplier) // pencarian supplier { this._supplier = (Supplier)data; txtSupplier.Text = this._supplier.nama_supplier; KeyPressHelper.NextFocus(); } }
private void txtKeyword_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { Cari(); } }
private void FrmSettingReportEmptyBody_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { Selesai(); } }
private void FrmEntryStandard_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { Selesai(); } }
private void FrmAbout_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { btnOk_Click(sender, e); } }
private void FrmListStandardWithNavigation_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { Selesai(); } }
private void txtCustomer_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { var customerName = ((AdvancedTextbox)sender).Text; ICustomerBll bll = new CustomerBll(_log); var listOfCustomer = bll.GetByName(customerName); if (listOfCustomer.Count == 0) { MsgHelper.MsgWarning("Data customer tidak ditemukan"); txtCustomer.Focus(); txtCustomer.SelectAll(); } else if (listOfCustomer.Count == 1) { _customer = listOfCustomer[0]; txtCustomer.Text = _customer.nama_customer; KeyPressHelper.NextFocus(); } else // data lebih dari satu { var frmLookup = new FrmLookupReferensi("Data Customer", listOfCustomer); frmLookup.Listener = this; frmLookup.ShowDialog(); } } }
private void FrmDialogImport_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { Selesai(); } }
private void FrmLapPenjualan_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { this.Close(); } }
private void txtMinStokGudang_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { Simpan(); } }
private void FrmLookupStandard_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEsc(e)) { Batal(); } }
private void chkAktif_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { KeyPressHelper.NextFocus(); } }
private void txtPlafonPiutang_KeyPress(object sender, KeyPressEventArgs e) { if (KeyPressHelper.IsEnter(e)) { Simpan(); } }
private void FrmSettingReportStandard_KeyDown(object sender, KeyEventArgs e) { if (KeyPressHelper.IsShortcutKey(Keys.F10, e)) { Preview(); } }