private void TRANS_Validated(object sender, EventArgs e) { if (TRANS.Text != "") { NAMA.Text = pencarian(TRANS.Text); TRANS.Focus(); button5.Focus(); } }
private void PREV_Click(object sender, EventArgs e) { if (urut > 0) { urut--; TRANS.Text = global.ds.Tables["LIST"].DefaultView[urut][0].ToString(); TRANS.Focus(); NAMA.Focus(); Count.Text = (urut + 1).ToString() + " - " + row.ToString(); } }
private void BROWSE_Click(object sender, EventArgs e) { global.LAP_PEMBAYARAN = true; PENCARIAN frm = new PENCARIAN(); frm.ShowDialog(); TRANS.Text = global.Ambil; TRANS.Focus(); NAMA.Focus(); row = 0; urut = 0; Count.Text = "1 - 1"; }
private void CARI_Click(object sender, EventArgs e) { if (NAMA.Text == "") { global.ds.Tables["LIST"].DefaultView.RowFilter = "NAMA like '%'"; } else { global.ds.Tables["LIST"].DefaultView.RowFilter = "NAMA like '%" + NAMA.Text + "%'"; } row = global.ds.Tables["LIST"].DefaultView.Count; if (row > 0) { TRANS.Text = global.ds.Tables["LIST"].DefaultView[0][0].ToString(); TRANS.Focus(); NAMA.Focus(); Count.Text = "1 - " + row.ToString(); } else { MessageBox.Show("Data tidak ditemukan"); } }