Esempio n. 1
0
        /// <summary>
        /// 获得角色信息表格值
        /// </summary>
        private void GetGridInfo()
        {
            系统服务.Query.ClsRoleInfoQuery clsQuery = new 系统服务.Query.ClsRoleInfoQuery();
            DataTable dt = clsQuery.GetAllDt();

            gridControl1.DataSource = dt;
        }
Esempio n. 2
0
        /// <summary>
        /// 启用一条数据
        /// </summary>
        public void UnDelete(string sRoleid)
        {
            系统服务.Query.ClsRoleInfoQuery clsQuery = new 系统服务.Query.ClsRoleInfoQuery();
            if (!clsQuery.ChkClosed(sRoleid))
            {
                throw new Exception(sRoleid + "已经启用!");
            }

            clsDal.UnDelete(sRoleid);
        }
Esempio n. 3
0
        /// <summary>
        /// 关闭一条数据
        /// </summary>
        public void Delete(string sRoleid)
        {
            if (sRoleid == "administrator")
            {
                throw new Exception("administrator 是预置角色不能关闭!");
            }

            系统服务.Query.ClsRoleInfoQuery clsQuery = new 系统服务.Query.ClsRoleInfoQuery();
            if (clsQuery.ChkClosed(sRoleid))
            {
                throw new Exception(sRoleid + "已经关闭!");
            }

            clsDal.Delete(sRoleid);
        }