void bind() { txtNIK.DataBindings.Add("Text", dosen.getBs(), "nik"); txtNamaDosen.DataBindings.Add("Text", dosen.getBs(), "nama_dosen"); txtAlamat.DataBindings.Add("Text", dosen.getBs(), "alamat"); txtKota.DataBindings.Add("Text", dosen.getBs(), "kota"); }
private void btnLogin_Click(object sender, EventArgs e) { String userName, pwd, pwdAsli; userName = txtUsername.Text.Trim(); pwd = txtPassword.Text.Trim(); int baris = user.getBs().Find("userName", userName); if (baris >= 0) { user.getBs().Position = baris; DataRowView pemakai = (DataRowView)user.getBs().Current; pwdAsli = ((DataRowView)user.getBs().Current).Row["password"].ToString(); //MessageBox.Show(pwdAsli); if (pwd == pwdAsli) { FormMenuUtama mf = new FormMenuUtama(pemakai); mf.ShowDialog(); mf.Dispose(); txtUsername.Text = ""; txtPassword.Text = ""; txtUsername.Focus(); } } else { MessageBox.Show(" Gagal Login "); } }
public FormSaringSup() { InitializeComponent(); cb01.DataSource = supplier1.getBs(); cb01.DisplayMember = "kodeSupplier"; supplier1.getBs().MoveFirst(); cb02.DataSource = supplier2.getBs(); cb02.DisplayMember = "kodeSupplier"; supplier2.getBs().MoveLast(); }
public FormSaringLapStok() { InitializeComponent(); cb01.DataSource = barang1.getBs(); cb01.DisplayMember = "kodeBarang"; barang1.getBs().MoveFirst(); cb02.DataSource = barang2.getBs(); cb02.DisplayMember = "kodeBarang"; barang2.getBs().MoveLast(); }
private void txtKodeSupplier_Validated(object sender, EventArgs e) { if (txtKodeSupplier.Text.Length > 0) { String strSQL, noNotaBaru = txtNoNotaBeli.Text.Trim(); Tabel Supplier = new Tabel("Supplier", "inventory_tigger"); int baris = Supplier.getBs().Find("KodeSupplier", txtKodeSupplier.Text.Trim()); if (baris >= 0) { String noNotaBeli, kd, sqlStr; noNotaBeli = txtNoNotaBeli.Text.Trim(); kd = txtKodeSupplier.Text.Trim(); sqlStr = "Update NotaBeli SET KodeSupplier='{0}' where noNotaBeli='{1}'"; sqlStr = String.Format(sqlStr, kd, noNotaBeli); notaBeli.eksekusiSQL(sqlStr); baris = notaBeli.getBs().Find("noNotaBeli", noNotaBaru); notaBeli.getBs().Position = baris; } else { //MessageBox.Show("KodeSupplier : " + txtKodeSupplier.Text.Trim() + " tidak ada !!"); FormCariSupplier fcs = new FormCariSupplier(); fcs.ShowDialog(); txtKodeSupplier.Text = fcs.KodeSupplier; txtKodeSupplier.Focus(); } } }
void tampilDetail() { String no = txtNoNotaBeli.Text.Trim(); detail.getBs().Filter = "noNotaBeli=" + no; hitung(); }
private void txtKodeBaranag_Validated(object sender, EventArgs e) { Tabel Barang = new Tabel("barang", "Inventoryku"); int baris = Barang.getBs().Find("kodeBarang", txtKodeBaranag.Text.Trim()); if (baris >= 0) { Barang.getBs().Position = baris; txtNamaBarang.Text = ((DataRowView)Barang.getBs().Current).Row["namaBarang"].ToString(); txtHarga.Text = ((DataRowView)Barang.getBs().Current).Row["hargaJual"].ToString(); // current digunkan yaitu objek yang bisa diconvet yang dapat data rowview dan akhirnya punya rows txtQty.Focus(); } else { MessageBox.Show("kode : " + txtKodeBaranag.Text + "tidak ditemukan"); hapus(); } }
private void txtKodeBaranag_Validated(object sender, EventArgs e) { if (txtKodeBaranag.Text.Length > 0) { Tabel barang = new Tabel("barang", "inventory_tigger"); int brs = barang.getBs().Find("kodeBarang", txtKodeBaranag.Text.Trim()); if (brs >= 0) { barang.getBs().Position = brs; txtNamaBarang.Text = ((DataRowView)barang.getBs().Current).Row["namaBarang"].ToString(); txtHarga.Text = ((DataRowView)barang.getBs().Current).Row["hargaBeli"].ToString(); } else { MessageBox.Show("Kode : " + txtKodeBaranag.Text + " tidak ditemukan"); txtKodeBaranag.Text = ""; txtKodeBaranag.Focus(); } } }
public FormCariSupplier() { InitializeComponent(); dgvSupplier.DataSource = Supplier.getBs(); }
public FormSupplier() { InitializeComponent(); dgvSupplier.DataSource = supplier.getBs(); tutup(); }
void tutup() { dgvItemNotaBeli.Top = 147; dgvItemNotaBeli.Height = 261; txtKodeSupplier.Enabled = false; txtKodeSupplier.DataBindings.Add("text", notaBeli.getBs(), "KodeSupplier"); btnTop.Enabled = true; btnBack.Enabled = true; btnNext.Enabled = true; btnEnd.Enabled = true; btnPrint.Enabled = true; btnFind.Enabled = true; btnNew.Enabled = true; btnEdit.Enabled = true; btnDel.Enabled = true; btnSave.Visible = false; // Tombol Save Sembunyi btnUndo.Visible = false; // Tombol Undo Sembunyi btnClose.Enabled = true; }
void bind() { txtKodeBarang.DataBindings.Add("Text", barang.getBs(), "kodeBarang"); txtNamaBarang.DataBindings.Add("Text", barang.getBs(), "namaBarang"); txtHargaBeli.DataBindings.Add("Text", barang.getBs(), "hargaBeli"); txtHargaJual.DataBindings.Add("Text", barang.getBs(), "hargaJual"); txtStok.DataBindings.Add("Text", barang.getBs(), "stok"); cmbSatuan.DataBindings.Add("Text", barang.getBs(), "satuan"); }
void bind() { txtUsername.DataBindings.Add("text", pemakai.getBs(), "userName"); checBarang.DataBindings.Add("Checked", pemakai.getBs(), "setupBarang"); checSupplier.DataBindings.Add("checked", pemakai.getBs(), "setupSupplier"); checPemakai.DataBindings.Add("checked", pemakai.getBs(), "setupPemakai"); checBeli.DataBindings.Add("checked", pemakai.getBs(), "pembelian"); checJual.DataBindings.Add("checked", pemakai.getBs(), "Penjualan"); checLapStock.DataBindings.Add("checked", pemakai.getBs(), "lapstock"); checLapSupp.DataBindings.Add("checked", pemakai.getBs(), "lapsupp"); }
void bind() { txtNoNotaJual.DataBindings.Add("text", notaJual.getBs(), "noNotaJual"); txtTanggal.DataBindings.Add("text", notaJual.getBs(), "tanggal"); }
public FormNotaJual() { InitializeComponent(); bind(); dgvItemNotaJual.DataSource = detail.getBs(); }