Example #1
0
 //修改商品类别 2--修改
 private void btnUpdateCategory_Click(object sender, EventArgs e)
 {
     if (dgvCategoryInfo.SelectedRows.Count > 0)
     {
         //获取选中的id
         int id = Convert.ToInt32(dgvCategoryInfo.SelectedRows[0].Cells[0].Value);
         //根据id查询数据
         CategoryInfoBLL bll = new CategoryInfoBLL();
         CategoryInfo    cat = bll.GetCategoryInfoByCaitId(id);
         cat.CatId = id;
         //传对象
         fea.obj = cat;
         ShowFrmChangeCategory(2);
     }
 }