private void tsmiAdd_Click(object sender, EventArgs e) { DlgEditBusinessData dlg = new DlgEditBusinessData(); if (DialogResult.OK == dlg.ShowDialog()) { BusinessServcie.AddBusinessData(dlg.BusinessName, dlg.BusinessDescription); RefreshBusinessDataTree(); } }
private void tsmiEdit_Click(object sender, EventArgs e) { TreeListNode currNode = treeBusinessData.FocusedNode; SYS_BUSINESSDATA bData = currNode.Tag as SYS_BUSINESSDATA; DlgEditBusinessData dlg = new DlgEditBusinessData(); dlg.BusinessId = bData.ID; dlg.BusinessName = bData.NAME; dlg.BusinessDescription = bData.DESCRIPTION; if (DialogResult.OK == dlg.ShowDialog()) { BusinessServcie.EditBusinessData(bData.ID, dlg.BusinessName, dlg.BusinessDescription); RefreshBusinessDataTree(); } }