Esempio n. 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmProduct frm = new frmProduct();

            frm.GroupID = TextUtils.ToInt(treeData.FocusedNode.GetValue(colIDTree));
            if (frm.ShowDialog() == DialogResult.OK)
            {
                loadGrid(true);
            }
        }
Esempio n. 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID));

            if (id == 0)
            {
                return;
            }
            ProductsModel model = (ProductsModel)ProductsBO.Instance.FindByPK(id);

            _rownIndex = grvData.FocusedRowHandle;

            frmProduct frm = new frmProduct();

            frm.Product = model;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                loadGrid(true);
            }
        }