示例#1
0
        public TestClass GetFromDb(CSOMContext dbContext)
        {
            var app = dbContext.APPLICATIONS.Find(8206847);

            Id   = app.PROGRAM_ID;
            Name = app.PROGRAM.PROGRAM1;
            Term = app.TERM.TERM1;
            return(this);
        }
示例#2
0
        public TestClass GetFromDb(CSOMContext dbContext)
        {
            var app = dbContext.APPLICATIONS.Find(8206847);

            Id = app.PROGRAM_ID;
            Name = app.PROGRAM.PROGRAM1;
            Term = app.TERM.TERM1;
            return this;
        }
 public IQueryable <BaseProgramViewModel> GetPrograms(CSOMContext dbContext, int?programId)
 {
     return(dbContext.PROGRAMS
            .Where(p => p.TERMS_APPLY_ACTIVE.Any())
            .OrderBy(p => p.SORT_ORDER)
            .Select(p => new BaseProgramViewModel()
     {
         Id = p.PROGRAM_ID,
         Name = p.PROGRAM1
     }));
 }
示例#4
0
        public IQueryable <BaseTermVeiwModel> GetTerms(CSOMContext dbContext, int?programId)
        {
            var result = dbContext
                         .TERMS_APPLY_ACTIVE
                         .Where(t => t.PROGRAM_ID == programId)
                         .Select(t => new BaseTermVeiwModel()
            {
                Id   = t.TERM_ID,
                Name = t.TERM.TERM1
            });

            return(result);
        }
示例#5
0
        public IQueryable <CounterModel> GetPrograms(CSOMContext dbContext, int?programId)
        {
            var programs = dbContext.PROGRAMS
                           .Where(p => p.TERMS_APPLY_ACTIVE.Any())
                           .OrderBy(p => p.SORT_ORDER)
                           .Select(p => new CounterModel()
            {
                Id   = p.PROGRAM_ID,
                Name = p.PROGRAM1,
                NumberOfApplications = p.APPLICATIONS.Count(),
                IsSelected           = (p.PROGRAM_ID == programId)
            });

            Console.WriteLine(programs);
            return(programs);
        }
示例#6
0
        public IQueryable <TimeLineModel> GetTerms(CSOMContext dbContext, int?programId)
        {
            var result = dbContext
                         .TERMS_APPLY_ACTIVE
                         .Where(t => t.PROGRAM_ID == programId)
                         .Where(t => t.TERM.DATE_START != null)
                         .Where(t => t.TERM.DATE_END != null)
                         .Select(t => new TimeLineModel()
            {
                Id        = t.TERM_ID,
                Name      = t.TERM.TERM1,
                StartDate = t.TERM.DATE_START.Value,
                EndDate   = t.TERM.DATE_END.Value
            });

            return(result);
        }
 public BaseDashboardController()
 {
     _dbContext = new CSOMContext();
 }
示例#8
0
 public TimeLineController()
 {
     _dbContext = new CSOMContext();
 }
示例#9
0
 public HomeController()
 {
     DbContext = new CSOMContext();
 }
示例#10
0
 public TimeLineController()
 {
     _dbContext = new CSOMContext();
 }
示例#11
0
 public CounterController()
 {
     _dbContext = new CSOMContext();
 }
示例#12
0
 // doing a simle query for a widget
 public TestController()
 {
     DbContext = new CSOMContext();
 }
示例#13
0
 public HomeController()
 {
     DbContext = new CSOMContext();
 }
 public PageValidationResult Validate(CSOMContext dbContext, APPLICATION app)
 {
     throw new System.NotImplementedException();
 }
示例#15
0
 public CounterController()
 {
     _dbContext = new CSOMContext();
 }
 public BaseDashboardController()
 {
     _dbContext = new CSOMContext();
 }
示例#17
0
 // doing a simle query for a widget
 public TestController()
 {
     DbContext = new CSOMContext();
 }