Exemple #1
0
        private void Rpot_ItemList_Load(object sender, EventArgs e)
        {
            cb_ctgy    = cbx_ctgy;
            cb_Subctgy = cbx_subctgy;


            pnl_itmlst.Controls.Clear();
            Rpot_ItemList1 ilist1 = new Rpot_ItemList1();

            ilist1.TopLevel = false;
            ilist1.Visible  = true;
            pnl_itmlst.Controls.Add(ilist1);



            String         csql = "SELECT*FROM tbl_catogory";
            SqlDataAdapter cget = new SqlDataAdapter(csql, ConnectionDB.Connection());
            DataTable      cdt  = new DataTable();

            cget.Fill(cdt);
            for (int i = 0; i < cdt.Rows.Count; i++)
            {
                cbx_ctgy.Items.Add(cdt.Rows[i]["catogory"]);
            }
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            pnl_itmlst.Controls.Clear();
            Rpot_ItemList1 ilist1 = new Rpot_ItemList1();

            ilist1.TopLevel = false;
            ilist1.Visible  = true;
            pnl_itmlst.Controls.Add(ilist1);

            cbx_ctgy.Text    = "";
            cbx_subctgy.Text = "";
            cbx_subctgy.Items.Clear();
        }