Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            int id = TextUtils.ToInt(treeData.FocusedNode.GetValue(colIDTree));
            frmProductDetail frm = new frmProductDetail();

            frm.ProductGroupID = id;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadInfoSearch();
            }
        }
Beispiel #2
0
        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;

            frmProductDetail frm = new frmProductDetail();

            frm.ProductGroupID = catId;
            frm.Product        = model;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadInfoSearch();
            }
        }