Exemple #1
0
        /// <summary>
        /// 返回模块权限记录表
        /// </summary>
        /// <param name="ConnectInfo"></param>
        /// <param name="UserCode"></param>
        /// <returns></returns>
        public SortedList GetModuleRights(String[] ConnectInfo, String UserCode, out DataTable returnDT)
        {
            //DataTable dt;
            SortedList   ModuleRightList = new SortedList();
            int          i;
            CModuleRight tempModuleRight;;



            try
            {
                ConnectInfo = ConnectInfo;

                //读取该用户的模块权限
                returnDT = this.GetModuleRightTable(UserCode);
                ModuleRightList.Clear();

                for (i = 0; i <= returnDT.Rows.Count - 1; i++)
                {
                    tempModuleRight = new CModuleRight(ConnectInfo, returnDT.Rows[i]);
                    ModuleRightList.Add(tempModuleRight.ModuleCode, tempModuleRight);                    //模块编码做键值
                }


                return(ModuleRightList);
            }
            catch (Exception ee)
            {
                //returnDT=null;
                throw new Exception(ee.Message);
                //return null;
            }
        }
Exemple #2
0
		/// <summary>
		/// 返回模块权限记录表
		/// </summary>
		/// <param name="ConnectInfo"></param>
		/// <param name="UserCode"></param>
		/// <returns></returns>
		public SortedList GetModuleRights(String[] ConnectInfo,String UserCode,out DataTable returnDT)
		{
			
			
			//DataTable dt;
			SortedList ModuleRightList=new SortedList(); 
			int i;
			CModuleRight tempModuleRight;;

			

			try
			{

				ConnectInfo=ConnectInfo; 
				
				//读取该用户的模块权限
				returnDT=this.GetModuleRightTable(UserCode);
				ModuleRightList.Clear();
 
				for(i=0;i<=returnDT.Rows.Count-1;i++)
				{
					tempModuleRight=new CModuleRight(ConnectInfo, returnDT.Rows[i]);
					ModuleRightList.Add(tempModuleRight.ModuleCode,tempModuleRight); //模块编码做键值
				}


				return ModuleRightList;
				
			}
			catch(Exception ee)
			{
				
				//returnDT=null;
				throw new Exception(ee.Message ); 
				//return null;
			}


		}