示例#1
0
 public ResourceSchedule(SortUser sortUserTool, ICalcInterfere cInterfere, TDCalcCommonParam m_CommonParam,
     List<TDHSDPABearer> bearerList)
 {
     this.m_SortUser = sortUserTool;
     this.m_CalcInterfere = cInterfere;
     this.m_BearerList = bearerList;
     this.m_Linkloss = m_CommonParam.CalcLinkLoss;
     this.m_trafficpriority = m_CommonParam.TdUIParam.TrafficPriorityFactor;
     this.m_userpriority = m_CommonParam.TdUIParam.UEPriorityFactor;
     this.m_chpriority = m_CommonParam.TdUIParam.CHPriorityFactor;
     this.m_IsCDMAon = m_CommonParam.TdUIParam.IsCDMAon;
     this.m_ScheduleType = m_CommonParam.TdUIParam.HSPA_SheduleType;
     m_GetTDLinkLoss = new TDLinkLossCalc(m_Linkloss);
 }
示例#2
0
        // GET: JobConclusions
        public async Task <IActionResult> Index(string searchString, SortUser sortOrder = SortUser.NameAsc)
        {
            var applicationDbContext = _context.JobConclusions.Include(j => j.ApplicationUsers);

            var job = from jo in _context.JobConclusions
                      select jo;

            if (!String.IsNullOrEmpty(searchString))
            {
                job = job.Where(s => s.JobSatisfactionText.Contains(searchString));
            }

            ViewData["NameSort"]  = sortOrder == SortUser.NameAsc ? SortUser.NameDesc : SortUser.NameAsc;
            ViewData["TitleSort"] = sortOrder == SortUser.TitleAsc ? SortUser.TitleDesc : SortUser.TitleAsc;
            ViewData["DateSort"]  = sortOrder == SortUser.DateAsc ? SortUser.DateDesc : SortUser.DateAsc;

            switch (sortOrder)
            {
            case SortUser.NameDesc:
                job = job.OrderByDescending(s => s.JobSatisfactionText);
                break;

            case SortUser.DateAsc:
                job = job.OrderBy(s => s.JobDate);
                break;

            case SortUser.DateDesc:
                job = job.OrderByDescending(s => s.JobDate);
                break;

            case SortUser.TitleAsc:
                job = job.OrderBy(s => s.JobConclusionHead);
                break;

            case SortUser.TitleDesc:
                job = job.OrderByDescending(s => s.JobConclusionHead);
                break;

            default:
                job = job.OrderBy(s => s.JobDate);
                break;
            }
            return(View(await job.ToListAsync()));
        }
        // GET: LifeConclusions
        public async Task <IActionResult> Index(string searchString, SortUser sortOrder = SortUser.NameAsc)
        {
            var applicationDbContext = _context.LifeConclusions.Include(l => l.ApplicationUsers);

            var life = from jo in _context.LifeConclusions
                       select jo;

            if (!String.IsNullOrEmpty(searchString))
            {
                life = life.Where(s => s.LifeConclusionHead.Contains(searchString));
            }

            ViewData["NameSort"]  = sortOrder == SortUser.NameAsc ? SortUser.NameDesc : SortUser.NameAsc;
            ViewData["TitleSort"] = sortOrder == SortUser.TitleAsc ? SortUser.TitleDesc : SortUser.TitleAsc;
            ViewData["DateSort"]  = sortOrder == SortUser.DateAsc ? SortUser.DateDesc : SortUser.DateAsc;

            switch (sortOrder)
            {
            case SortUser.NameDesc:
                life = life.OrderByDescending(s => s.LifeConExpl);
                break;

            case SortUser.DateAsc:
                life = life.OrderBy(s => s.LifeConDate);
                break;

            case SortUser.DateDesc:
                life = life.OrderByDescending(s => s.LifeConDate);
                break;

            case SortUser.TitleAsc:
                life = life.OrderBy(s => s.LifeConclusionHead);
                break;

            case SortUser.TitleDesc:
                life = life.OrderByDescending(s => s.LifeConclusionHead);
                break;

            default:
                life = life.OrderBy(s => s.LifeConDate);
                break;
            }
            return(View(await life.ToListAsync()));
        }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HomeQuery"/> class.
        /// </summary>
        /// <param name="status">The status.</param>
        /// <param name="sort">The sort.</param>
        /// <param name="order">The order.</param>
        /// <param name="page">The page.</param>
        public HomeQuery(string status, SortUser sort, SortOrder order, int? page)
        {
            IUserSpecification specification = null;

            if (!string.IsNullOrEmpty(status))
            {
                specification = new UserStatusSpecification(status.AsEnum<UserStatus>());
            }

            if (specification == null)
            {
                specification = new UserSpecification();
            }

            specification.Page = page;
            specification.Limit = Setting.UserPageLimit.Value;
            specification.Sort = sort;
            specification.Order = order;

            this.Specification = specification;
        }
示例#5
0
        public ActionResult Index(string status, SortUser sort, SortOrder order, int? page)
        {
            var query = new HomeQuery(status, sort, order, page);
            var users = UserService.GetPaged(query.Specification);
            var user = users.FirstOrDefault();
            var privilege = new UserPrivilege();

            return privilege.CanViewAny(user) ? View(Views.Index, users) : NotAuthorized();
        }
示例#6
0
        public ActionResult Index(SortUser sort, SortOrder order, int? page)
        {
            var users = this.UserService.GetPaged(new UserSpecification
            {
                Page = page,
                Limit = Setting.UserPageLimit.Value,
                Sort = sort,
                Order = order
            });

            return base.View(Views.Index, users);
        }
示例#7
0
        public void Run_Test()
        {
            HSDPASimulization simulization = new HSDPASimulization();
            TDIterationBase tdIterationBase = new TDIteration();

            SnapshotContext context = new SnapshotContext();
            List<Transceiver> trans = new List<Transceiver>();
            TDSimCellCollection cellCollection = new TDSimCellCollection();

            TDSimCell cell;
            cell = MockTDSimCell.CreatTDSimCell();

            simulization.AccessControl = new Access();
            simulization.SimulizeTTICount = 50;

            IGetLinkloss linkloss = new MockIGetLinkloss();
            ICalcInterfere interfere = null;
            TDCalcCommonParam param = new TDCalcCommonParam();
            TDLinkLossCalc TDLinkLoss = new TDLinkLossCalc(linkloss);
            ISimUser simUser = new MockISimUserBase();
            ISimCellBase cellBase = new MockISimCellBase();
            TDLinkLoss.GetDLTotalLoss(simUser, cellBase);
            HSDPABearerManagement retainGain = new HSDPABearerManagement(NetWorkType.TDSCDMA);
            HARQ m_Harq = new HARQ(interfere, linkloss, retainGain);
            simulization.HarqArithmetic = new HARQ(interfere, linkloss, retainGain);
            simulization.HarqArithmetic.CalcInterfere = new MockICalcInterfere();

            SortUser sortUserTool = new SortUser();
            ICalcInterfere cInterfere = new MockICalcInterfere();
            TDCalcCommonParam m_CommonParam = new TDCalcCommonParam();
            List<TDHSDPABearer> bearerList = new List<TDHSDPABearer>();
            TDHSDPABearer bearer1 = new TDHSDPABearer();
            TDHSDPABearer bearer2 = new TDHSDPABearer();
            bearer1.RTBS = 50;
            bearer2.RTBS = 50;
            bearer2.CI = 2d;
            bearerList.Add(bearer1);
            bearerList.Add(bearer2);
            m_CommonParam.CalcLinkLoss = new MockIGetLinkloss();
            simulization.ResourceSchedule = new ResourceSchedule(sortUserTool, cInterfere, m_CommonParam, bearerList);
            simulization.SortUserTool = new SortUser();

            TDSimCell cell1;
            cell1 = MockTDSimCell.CreatTDSimCell();
            TDSimCell cell2;
            cell2 = MockTDSimCell.CreatTDSimCell();
            TDSimUser user3;
            user3 = MockTDSimUser.CreatTDSimUser_CS();
            TDSimUser user4;
            user4 = MockTDSimUser.CreatTDSimUser_CS();
            TDSimUser user1;
            user1 = MockTDSimUser.CreatTDSimUser_CS();
            user1.HSDPAThrowput = 100f;
            user1.IsHSDPARetransmited = true;
            TDSimUser user2;
            user2 = MockTDSimUser.CreatTDSimUser_PS();
            user2.HSDPAThrowput = 200f;
            cell2.HSDPAServedUserList.Add(user3);
            cell2.HSDPAServedUserList.Add(user4);
            cell2.HSDPAServedUserCount = 2;
            cell1.HSDPATimeslot[0].HSDPAScheduledUsers.Add(user1);
            cell1.HSDPATimeslot[0].HSDPAScheduledUsers.Add(user2);
            cell1.HSDPAAccessedUsers.Add(user1);
            cell1.HSDPAAccessedUsers.Add(user2);
            List<TDSimCell> cellList = new List<TDSimCell>();
            cellList.Add(cell1);
            cellList.Add(cell2);
            List<TDSimUser> userList = new List<TDSimUser>();
            userList.Add(user1);
            userList.Add(user2);
            simulization.TimeSlotSimulization = new TimeSlotSim(cellList, userList);

            cellCollection.TDCells.Add(cell1);
            cellCollection.TDCells.Add(cell2);

            context.AddKey(ContextKeys.TranceiverList, trans);
            context.AddKey(ContextKeys.TDSimCellCollection, cellCollection);

            simulization.InitCells(context);
            simulization.SimResultReport();

            DPAResult dpaResult =(DPAResult)simulization.Run();
            Assert.AreEqual(dpaResult.CellResult.Count, 2);
        }