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");
 }
Esempio n. 2
0
        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 ");
            }
        }
Esempio n. 3
0
 public FormSaringSup()
 {
     InitializeComponent();
     cb01.DataSource    = supplier1.getBs();
     cb01.DisplayMember = "kodeSupplier";
     supplier1.getBs().MoveFirst();
     cb02.DataSource    = supplier2.getBs();
     cb02.DisplayMember = "kodeSupplier";
     supplier2.getBs().MoveLast();
 }
Esempio n. 4
0
 public FormSaringLapStok()
 {
     InitializeComponent();
     cb01.DataSource = barang1.getBs();
     cb01.DisplayMember = "kodeBarang";
     barang1.getBs().MoveFirst();
     cb02.DataSource = barang2.getBs();
     cb02.DisplayMember = "kodeBarang";
     barang2.getBs().MoveLast();
     
 }
Esempio n. 5
0
 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();
         }
     }
 }
Esempio n. 6
0
        void tampilDetail()
        {
            String no = txtNoNotaBeli.Text.Trim();

            detail.getBs().Filter = "noNotaBeli=" + no;
            hitung();
        }
Esempio n. 7
0
        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();
            }
        }
Esempio n. 8
0
        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();
                }
            }
        }
Esempio n. 9
0
 public FormCariSupplier()
 {
     InitializeComponent();
     dgvSupplier.DataSource = Supplier.getBs();
 }
 public FormSupplier()
 {
     InitializeComponent();
     dgvSupplier.DataSource = supplier.getBs();
     tutup();
 }
Esempio n. 11
0
 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;
 }
Esempio n. 12
0
 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");
 }
Esempio n. 14
0
 void bind()
 {
     txtNoNotaJual.DataBindings.Add("text", notaJual.getBs(), "noNotaJual");
     txtTanggal.DataBindings.Add("text", notaJual.getBs(), "tanggal");
 }
Esempio n. 15
0
 public FormNotaJual()
 {
     InitializeComponent();
     bind();
     dgvItemNotaJual.DataSource = detail.getBs();
 }