⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 existposer.cs

📁 很不错的公文流转系统
💻 CS
字号:
using System;
namespace OI.cs
{
	/// <summary>
	/// existPoser 的摘要说明。
	/// </summary>
	public class existPoser
	{  
		public existPoser()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}
		/// <summary>
		/// 检验当前选择的用户有没有权限
		/// </summary>
		/// <param name="userid">选择的用户</param>
		/// <param name="Power">当前操作需要的权限</param>
		/// <returns></returns>
		public static bool ExistPower(string userid,string Power)
		{
			if  (userid=="" || Power =="") return true;
            string  powerStr  =  "select count(*) " ;
			        powerStr +=" from accounts_users a, accounts_userRoles aur, account_RolePermission arp ,models m ";
                    powerStr +=" where a.userid=aur.userid  and  arp.roleid=aur.roleid  and  arp.moduleid=m.moduleid ";
                    powerStr +=" and m.modulename='"+ Power+"'" ;
                    powerStr +=" and a.userid="+userid;
			try
			{
				OI.DatabaseOper.DatabaseConnect Dbc=new OI.DatabaseOper.DatabaseConnect (); 
				int number=int.Parse ( Dbc.GetValueBySql(powerStr));
				if (number >0)
				{
					return true;
				}
				else
				{
					return false;
				}

			}
			catch(Exception er)
			{
				throw  new Exception(er.Message );
				
			}
			
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -