private void btnNew_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(treeData.FocusedNode.GetValue(colIDTree)); frmModule frm = new frmModule(); frm.CatID = id; //if (frm.ShowDialog() == DialogResult.OK) //{ // LoadInfoSearch(); //} frm.LoadDataChange += main_LoadDataChange; frm.Show(); }
private void btnCopy_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } ModulesModel model = (ModulesModel)ModulesBO.Instance.FindByPK(id); int catId = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colGroup)); frmModule frm = new frmModule(); frm.CatID = catId; frm.Module = model; frm.IsCopy = true; //if (frm.ShowDialog() == DialogResult.OK) //{ // LoadInfoSearch(); //} frm.LoadDataChange += main_LoadDataChange; frm.Show(); }