using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Lskj.Control; using Lskj.Business; using Lskj.Business.Impl; namespace Lskj.PubUserTomodule { public partial class FrmAddRole : BaseForm { public string RoleName; public Label LabelObj { get { return label1; } } public FrmAddRole() { InitializeComponent(); } /// /// 说明:确定事件 /// 创建人:龚宇超 /// 创建日期:2019-06-21 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// The sender. /// The instance containing the event data. void OnBtnOKClick(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(this.txtEdit.Text)) { MessageUtil.Show(this.label1.Text.Replace(":", "!")); return; } this.RoleName = this.txtEdit.Text; this.Close(); this.DialogResult = System.Windows.Forms.DialogResult.OK; } catch (Exception ex) { LogUtil.WriteError("确定事件出错!", ex); //MessageUtil.Show("确定事件出错!" + ex); string Message = ErrorMessage.PromptErrorMessage(ex); MessageUtil.Show(Message, ex.Message); } } /// /// 说明:取消事件 /// 创建人:龚宇超 /// 创建日期:2019-06-21 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// The sender. /// The instance containing the event data. void OnBtnCancelClick(object sender, EventArgs e) { this.Close(); } } }