private void btnNewGroup_Click(object sender, EventArgs e) { frmProductGroupDetail frm = new frmProductGroupDetail(); if (frm.ShowDialog() == DialogResult.OK) { _curentNode = frm.CurentNode; loadTree(); } }
private void btnEditGroup_Click(object sender, EventArgs e) { try { int id = TextUtils.ToInt(treeData.FocusedNode.GetValue(colIDTree)); if (id == 0) { return; } ProductGroupModel model = (ProductGroupModel)ProductGroupBO.Instance.FindByPK(id); frmProductGroupDetail frm = new frmProductGroupDetail(); frm.ProductGroup = model; if (frm.ShowDialog() == DialogResult.OK) { _curentNode = frm.CurentNode; loadTree(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }