示例#1
0
        public string UnClose(string sRoleid)
        {
            string sErr = "";

            try
            {
                ClsRoleInfoQuery clsQuery = new ClsRoleInfoQuery();
                if (!clsQuery.ChkClosed(sRoleid))
                {
                    throw new Exception(sRoleid + "已经启用!");
                }
                this.clsDal.UnDelete(sRoleid);
            }
            catch (Exception ee)
            {
                sErr = ee.Message;
            }
            return(sErr);
        }
示例#2
0
        public string Close(string sRoleid)
        {
            string sErr = "";

            try
            {
                if (sRoleid == "administrator")
                {
                    throw new Exception("administrator 是预置角色不能关闭!");
                }
                ClsRoleInfoQuery clsQuery = new ClsRoleInfoQuery();
                if (clsQuery.ChkClosed(sRoleid))
                {
                    throw new Exception(sRoleid + "已经关闭!");
                }
                this.clsDal.Delete(sRoleid);
            }
            catch (Exception ee)
            {
                sErr = ee.Message;
            }
            return(sErr);
        }