Esempio n. 1
0
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <returns>主键</returns>
        public string Add()
        {
            string returnValue = string.Empty;
            //FrmRoleAdd frmRoleAdd = new FrmRoleAdd(this.cmbRoleCategory.SelectedValue.ToString());
            //if (frmRoleAdd.ShowDialog(this) == DialogResult.OK || frmRoleAdd.Changed)
            //{
            FrmRoleWithUser frmRoleWithUser = new FrmRoleWithUser(this.cmbRoleCategory.SelectedValue.ToString());

            frmRoleWithUser.OnAdded += new FrmRoleWithUser.OnAddedEventHandler(this.OnAdded);
            if (frmRoleWithUser.ShowDialog(this) == DialogResult.OK || frmRoleWithUser.Changed)
            {
                // 获得角色列表
                this.GetList();
                // 设置数据过滤
                this.SetRowFilter();
                // 设置按钮状态
                this.SetControlState();
            }
            return(returnValue);
        }
Esempio n. 2
0
 /// <summary>
 /// 添加角色
 /// </summary>
 /// <returns>主键</returns>
 public string Add()
 {
     string returnValue = string.Empty;
     //FrmRoleAdd frmRoleAdd = new FrmRoleAdd(this.cmbRoleCategory.SelectedValue.ToString());
     //if (frmRoleAdd.ShowDialog(this) == DialogResult.OK || frmRoleAdd.Changed)
     //{
     FrmRoleWithUser frmRoleWithUser = new FrmRoleWithUser(this.cmbRoleCategory.SelectedValue.ToString());
     frmRoleWithUser.OnAdded += new FrmRoleWithUser.OnAddedEventHandler(this.OnAdded);
     if (frmRoleWithUser.ShowDialog(this) == DialogResult.OK || frmRoleWithUser.Changed)
     {
         // 获得角色列表
         this.GetList();
         // 设置数据过滤
         this.SetRowFilter();
         // 设置按钮状态
         this.SetControlState();
     }
     return returnValue;
 }