/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mniRename_Click(object sender, System.EventArgs e) { #if FunctionPrivilege if (!clsPublicFunction.s_blnCheckCurrentPrivilege(PrivilegeData.enmPrivilegeSF.frmLabCheckItemAdmin, PrivilegeData.enmPrivilegeOperation.AddOrModify)) { clsPublicFunction.s_mthShowNotPermitMessage(); return; } #endif frmInputBox objInputBox = new frmInputBox(); objInputBox.m_ObjParent = this; objInputBox.ShowDialog(); if (objInputBox.DialogResult == DialogResult.Cancel) { return; } clsLabCheckGroup objLabCheckGroup = (clsLabCheckGroup)trvGroup.SelectedNode.Tag; objLabCheckGroup.m_strLabGroupName = m_strGroupName; long lngRes = m_objLabCheckItemAdminDomain.m_lngModifyGroupDesc(objLabCheckGroup.m_strLabGroupID, objLabCheckGroup); if (lngRes <= 0) { return; } trvGroup.SelectedNode.Text = m_StrGroupName; }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mniAddGroup_Click(object sender, System.EventArgs e) { #if FunctionPrivilege if (!clsPublicFunction.s_blnCheckCurrentPrivilege(PrivilegeData.enmPrivilegeSF.frmLabCheckItemAdmin, PrivilegeData.enmPrivilegeOperation.AddOrModify)) { clsPublicFunction.s_mthShowNotPermitMessage(); return; } #endif frmInputBox objInputBox = new frmInputBox(); objInputBox.m_ObjParent = this; objInputBox.ShowDialog(); if (objInputBox.DialogResult == DialogResult.Cancel) { return; } clsLabCheckGroup objLabCheckGroup = new clsLabCheckGroup(); string strMaxGroupID; m_objLabCheckItemAdminDomain.m_lngGetMaxGroupID(out strMaxGroupID); objLabCheckGroup.m_strLabGroupID = (int.Parse(strMaxGroupID) + 1).ToString("00000"); objLabCheckGroup.m_strLabGroupName = m_strGroupName; long lngRes = m_objLabCheckItemAdminDomain.m_lngAddNewGroup(objLabCheckGroup); if (lngRes <= 0) { return; } TreeNode trvNode = new TreeNode(m_strGroupName); trvNode.Tag = objLabCheckGroup; this.trvGroup.Nodes[0].Nodes.Add(trvNode); this.trvGroup.ExpandAll(); this.trvGroup.SelectedNode = trvNode; }