private DataSet LoadSecurityTokens(Int32 userID)
        {
            IAdmin  ds  = new AirportIQ.Domain.Services.AdminServices();
            DataSet ret = ds.LoadSecurityTokens(userID);

            return(ret);
        }
示例#2
0
        /// <summary>
        /// Load the resource tablevalues and populate the Resources Dictionary
        /// </summary>
        private void LoadResources()
        {
            IAdmin    ds  = new AirportIQ.Domain.Services.AdminServices();
            DataSet   ret = ds.LoadResourceTokens();
            DataTable dt  = new DataTable();

            dt = ret.Tables[_RESOURCE_TOKEN_TABLE];

            //-----Create Dictionary-------------------------
            _resources =
                (from model in dt.AsEnumerable()
                 select new
            {
                ResourceName = model.Field <string>("ResourceName"),
                AccessCode = model.Field <long>("AccessCode"),
                AccessTokenID = model.Field <Int32>("AccessTokenID")
            }
                ).Select(x => new SecurityResourceModel()
            {
                ResourceName = x.ResourceName, AccessCode = x.AccessCode, AccessTokenID = x.AccessTokenID
            }).ToDictionary(model => model.ResourceName);
        }