Esempio n. 1
0
        private void barBtnDataBarang_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ListBarang form = ListBarang.GetForm();

            form.MdiParent = this;
            form.Show();
            form.Activate();
        }
Esempio n. 2
0
        private void navBarDataBarang_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            ListBarang form = ListBarang.GetForm();

            form.MdiParent = this;
            form.Show();
            form.Activate();
        }
Esempio n. 3
0
        private void TxtCariBarang_TextChanged(object sender, EventArgs e)
        {
            //cari nama barang
            SqlConnection conn = konn.GetConn();

            conn.Open();
            cmd = new SqlCommand("execute cari_barang '" + TxtCariBarang.Text + "'", conn);
            ds  = new DataSet();
            da  = new SqlDataAdapter(cmd);
            da.Fill(ds, "barang");
            ListBarang.DataSource = ds;
            ListBarang.DataMember = "barang";
            ListBarang.Refresh();
            conn.Close();
        }
Esempio n. 4
0
        //prosedur refresh barang
        void refresh_barang()
        {
            SqlConnection conn = konn.GetConn();

            try {
                conn.Open();
                cmd = new SqlCommand("select * from barang", conn);
                ds  = new DataSet();
                da  = new SqlDataAdapter(cmd);
                da.Fill(ds, "barang");
                ListBarang.DataSource = ds;
                ListBarang.DataMember = "barang";
                ListBarang.Refresh();
            }
            catch (Exception e) {
                MessageBox.Show(e.ToString());
            }
            finally {
                conn.Close();
            }
        }