protected override void tbcDelete_Commanded(object sender, EventArgs e) { GetSelectNode(); if (m_CurrentNode == null) { return; } string message = string.Format("确定要删除[{0}]吗?", (m_CurrentNode as Dictionary).Name); if ((m_CurrentNode as Dictionary).ParentID == 0) { message += "删除将删除此数据项的子项!"; } if (MsgHelper.ShowQuestionMsgBox(message) == DialogResult.Yes) { if ((m_CurrentNode as Dictionary).Delete()) { MsgHelper.ShowInformationMsgBox("删除功能成功!"); m_CurrentNode = null; BindGridData(); } else { MsgHelper.ShowInformationMsgBox("删除功能失败!"); } } }
public new bool Validate() { string errorMessage; if (!validater.Validate(out errorMessage)) { MsgHelper.ShowInformationMsgBox(errorMessage); return(false); } return(true); }
private void tbcUpdate_Commanded(object sender, EventArgs e) { if (!base.Validate()) { return; } GetFormToEdition(); if (m_Edition.Update()) { MsgHelper.ShowInformationMsgBox("更新版本成功!"); this.DialogResult = DialogResult.OK; } else { MsgHelper.ShowInformationMsgBox("更新版本失败!"); } }
private void tbcSave_Commanded(object sender, EventArgs e) { if (!base.Validate()) { return; } GetFormToDictionary(); if (m_Dictionary.Add()) { MsgHelper.ShowInformationMsgBox("添加数据项成功!"); this.DialogResult = DialogResult.OK; } else { MsgHelper.ShowInformationMsgBox("添加数据项失败!"); } }
private void tbcSave_Commanded(object sender, EventArgs e) { if (!base.Validate()) { return; } GetFormToRole(); if (m_Role.Add(CurrentUser.Instance.Edition.ID)) { MsgHelper.ShowInformationMsgBox("添加角色成功!"); this.DialogResult = DialogResult.OK; } else { MsgHelper.ShowInformationMsgBox("添加角色失败!"); } }
private void tbcSave_Commanded(object sender, EventArgs e) { if (!base.Validate()) { return; } string message; GetFormToUser(); if (m_UserInfo.Add(out message)) { MsgHelper.ShowInformationMsgBox(message); this.DialogResult = DialogResult.OK; } else { MsgHelper.ShowInformationMsgBox(message); } }
protected override void tbcDelete_Commanded(object sender, EventArgs e) { GetSelectNode(); if (m_CurrentNode == null) { return; } if (MsgHelper.ShowQuestionMsgBox(string.Format("确定要删除[{0}]吗?删除将删除版本和角色的功能模块!", (m_CurrentNode as Module).Name)) == DialogResult.Yes) { if ((m_CurrentNode as Module).Delete()) { MsgHelper.ShowInformationMsgBox("删除功能成功!"); m_CurrentNode = null; BindGridData(); } else { MsgHelper.ShowInformationMsgBox("删除功能失败!"); } } }