public void setControlToData(ref tblPro pro)
 {
     bll                = new BLL_QuanLySP();
     pro.ProID          = Convert.ToInt32(lbl_masp.Text);
     pro.ProName        = txt_Name.Text;
     pro.ProDescription = txt_Des.Text;
     pro.CatID          = bll.GetCatID(cbo_DanhMuc.SelectedItem.ToString());
 }
        private void btn_xembc_Click(object sender, EventArgs e)
        {
            bll = new BLL_QuanLySP();
            Frm_Report frm_Report = new Frm_Report();

            frm_Report.CatID = bll.GetCatID(cbo_DanhMuc.SelectedItem.ToString()).ToString();
            frm_Report.Show();
        }
 private void cbo_DanhMuc_SelectedIndexChanged(object sender, EventArgs e)
 {
     bll = new BLL_QuanLySP();
     if (cbo_DanhMuc.SelectedIndex == 0)
     {
         dataGridView1.DataSource = bll.GetDSSP();
     }
     else
     {
         int catID = bll.GetCatID(cbo_DanhMuc.SelectedItem.ToString());
         dataGridView1.DataSource = bll.GetSPWithIDCat(catID);
     }
     lbl_slsp.Text = dataGridView1.RowCount.ToString();
 }