private void btnAddNodeCha_Click(object sender, EventArgs e) { var idCategory = categoryIdLookUpEdit.EditValue != null?Convert.ToInt32(categoryIdLookUpEdit.EditValue) : 0; var frm = new FrmAddNewPropertyGroupByParentId(0, idCategory, 1); frm.Text = "Thêm node cha!!!"; frm.ShowDialog(); InitData(); }
private void AddNewPropertyGroupWithParentId_Click(object sender, EventArgs e) { var idParent = Convert.ToInt32(idTextEdit.Text); var idCategory = categoryIdLookUpEdit.EditValue != null?Convert.ToInt32(categoryIdLookUpEdit.EditValue) : 0; var levelGroup = 1; if (!string.IsNullOrEmpty(groupLevelTextEdit.Text)) { var levelGroupTemp = Convert.ToInt32(groupLevelTextEdit.Text); if (levelGroupTemp > 0) { levelGroup = levelGroupTemp + 1; } } var frm = new FrmAddNewPropertyGroupByParentId(idParent, idCategory, levelGroup); frm.Text = "Thêm node con từ node cha : " + nameTextEdit.Text; frm.ShowDialog(); InitData(); }