Example #1
0
 public DTO_Pro setControlToDTO(ref DTO_Pro pro, BLL_QuanLySP bll)
 {
     pro.CatID          = Convert.ToInt32(bll.GetCatIDWithCatName(ref err, cbo_dm.SelectedItem.ToString()));
     pro.ProName        = txt_name.Text;
     pro.proDescription = txt_des.Text;
     pro.ProID          = Convert.ToInt32(lbl_ProID.Text);
     return(pro);
 }
Example #2
0
        private void btn_ViewReport_Click(object sender, EventArgs e)
        {
            bll = new BLL_QuanLySP();
            Frm_Report frm_report = new Frm_Report();

            frm_report.CatID = bll.GetCatIDWithCatName(ref err, cbo_dm.SelectedItem.ToString()).ToString();
            frm_report.Show();
        }
Example #3
0
        private void cbo_dm_SelectedIndexChanged(object sender, EventArgs e)
        {
            bll = new BLL_QuanLySP();
            DataTable dt = new DataTable();

            if (cbo_dm.SelectedIndex == 0)
            {
                dt = bll.GetListPro(ref err);
            }
            else
            {
                int id = bll.GetCatIDWithCatName(ref err, cbo_dm.SelectedItem.ToString());
                dt = bll.GetListProWithCatID(ref err, id);
            }
            dataGridView1.DataSource = dt;
            lbl_QuantityPro.Text     = dt.Rows.Count.ToString();
        }