Example #1
0
        public void CariData(string kelompok)
        {
            using (Database db = new Database())
            {
                DataTable dt = new DataTable();
                if (GlobalVar.Gudang != "2808")
                {
                    db.Commands.Add(db.CreateCommand("usp_STOK_STOKBARCODE_SEARCH2_perKode"));
                }
                else
                {
                    db.Commands.Add(db.CreateCommand("usp_STOK_STOKBARCODE_SEARCH2_perKode2808"));
                }

                db.Commands[0].Parameters.Add(new Parameter("@katakunci", SqlDbType.VarChar, txtCari.Text.ToString()));
                db.Commands[0].Parameters.Add(new Parameter("@kelompok", SqlDbType.VarChar, kelompok.ToString()));
                db.Commands[0].Parameters.Add(new Parameter("@flagkg", SqlDbType.VarChar, Tools.isNull(KreditGenuine, "")));
                dt = db.Commands[0].ExecuteDataTable();
                if (dt.Rows.Count > 0)
                {
                    CGBarang.DataSource = dt;
                    CGBarang.Focus();
                }
            }
        }
Example #2
0
        public void TampilData(string kelompok)
        {
            using (Database db = new Database())
            {
                DataTable dt = new DataTable();

                db.Commands.Add(db.CreateCommand("usp_STOK_STOKBARCODE_LIST_perKode"));
                db.Commands[0].Parameters.Add(new Parameter("@kelompok", SqlDbType.VarChar, kelompok.ToString()));
                db.Commands[0].Parameters.Add(new Parameter("@flagkg", SqlDbType.VarChar, KreditGenuine));
                dt = db.Commands[0].ExecuteDataTable();
                if (dt.Rows.Count > 0)
                {
                    CGBarang.DataSource = dt;
                    CGBarang.Focus();
                }
            }
        }
Example #3
0
        public void TampilData(string kelompok)
        {
            using (Database db = new Database())
            {
                DataTable dt = new DataTable();

                db.Commands.Add(db.CreateCommand("usp_STOK_STOKBARCODE_SEARCH2_perKode"));
                db.Commands[0].Parameters.Add(new Parameter("@katakunci", SqlDbType.VarChar, txtCari.Text.ToString()));
                db.Commands[0].Parameters.Add(new Parameter("@kelompok", SqlDbType.VarChar, _kelompok.ToString()));
                //db.Commands[0].Parameters.Add(new Parameter("@TransactionTypeRowID", SqlDbType.UniqueIdentifier, JenisTransact));
                dt = db.Commands[0].ExecuteDataTable();
                CGBarang.DataSource = dt;
                if (dt.Rows.Count > 0)
                {
                    CGBarang.Focus();
                }
            }
        }
Example #4
0
        private void CBStok_CheckedChanged(object sender, EventArgs e)
        {
            if (CBStok.Checked == true)
            {
                using (Database db = new Database())
                {
                    DataTable dt = new DataTable();

                    db.Commands.Add(db.CreateCommand("usp_STOK_STOKBARCODE_LIST_MASIH_perKode"));
                    db.Commands[0].Parameters.Add(new Parameter("@kelompok", SqlDbType.VarChar, _kelompok.ToString()));
                    dt = db.Commands[0].ExecuteDataTable();
                    CGBarang.DataSource = dt;
                    if (dt.Rows.Count > 0)
                    {
                        CGBarang.Focus();
                    }
                }
            }
            else
            {
                TampilData(_kelompok);
            }
        }
Example #5
0
        private void CBStok_CheckedChanged(object sender, EventArgs e)
        {
            if (CBStok.Checked == true)
            {
                using (Database db = new Database())
                {
                    DataTable dt = new DataTable();

                    db.Commands.Add(db.CreateCommand("usp_STOK_STOKBARCODE_SEARCH2_perKode"));
                    db.Commands[0].Parameters.Add(new Parameter("@katakunci", SqlDbType.VarChar, txtCari.Text.ToString()));
                    db.Commands[0].Parameters.Add(new Parameter("@kelompok", SqlDbType.VarChar, _kelompok.ToString()));
                    //db.Commands[0].Parameters.Add(new Parameter("@TransactionTypeRowID", SqlDbType.UniqueIdentifier, JenisTransact));
                    CGBarang.DataSource = dt;
                    if (dt.Rows.Count > 0)
                    {
                        CGBarang.Focus();
                    }
                }
            }
            else
            {
                TampilData(_kelompok);
            }
        }