private void btnAdd_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(treeData.FocusedNode.GetValue(colIDTree)); frmProductDetailH frm = new frmProductDetailH(); frm.ProductGroupID = id; if (frm.ShowDialog() == DialogResult.OK) { LoadInfoSearch(); } }
private void btnEdit_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } ProductModel model = (ProductModel)ProductBO.Instance.FindByPK(id); int catId = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colGroup)); _rownIndex = grvData.FocusedRowHandle; frmProductDetailH frm = new frmProductDetailH(); frm.ProductGroupID = catId; frm.Product = model; if (frm.ShowDialog() == DialogResult.OK) { LoadInfoSearch(); } }