Example #1
0
        public ActionResult GetActivities(string type = null, int?id = null)
        {
            _logger.LogInformation("Logging Info");

            List <ActivityType> types = new ActivityTypeService(type, id).GetActivities();

            return(Ok(types));
        }
Example #2
0
 public ActivityController(TestTaskContext db)
 {
     _eservice  = new EmployeeService(db);
     _atservice = new ActivityTypeService(db);
     _aservice  = new ActivityService(db);
     _pservice  = new ProjectService(db);
     _rservice  = new RoleService(db);
 }
Example #3
0
        public ActionResult List()
        {
            var activityType = ActivityTypeService.GetEntities(u => u.Status == delNormal).AsQueryable();

            ViewBag.ActivityTypeID = (from u in activityType select new SelectListItem {
                Value = u.ActivityTypeID + "", Text = u.ActivityTypeName
            }).ToList();

            var PageData = GetActivityData(5, 1);

            return(View(PageData.ToList()));
        }
Example #4
0
        public ActionResult OrgCreate()
        {
            var allActivityType = ActivityTypeService.GetEntities(u => u.Status == delNormal).AsQueryable();

            ViewBag.ActivityTypeID = (from u in allActivityType select new SelectListItem()
            {
                Selected = false, Text = u.ActivityTypeName, Value = u.ActivityTypeID + ""
            }).ToList();
            ViewBag.MajorDict      = MajorService.GetEntities(u => u.Status == delNormal).AsQueryable().ToDictionary(u => u.MajorID, u => u.MajorName);
            ViewBag.PoliticalDict  = PoliticalService.GetEntities(u => u.Status == delNormal).AsQueryable().ToDictionary(u => u.PoliticalID, u => u.PoliticalName);
            ViewBag.DepartmentDict = DepartmentService.GetEntities(u => u.Status == delNormal).AsQueryable().ToDictionary(u => u.DepartmentID, u => u.DepartmentName);
            return(View());
        }
 public ActivityTypesProvider(ApplicationDbContext dataContext)
 {
     _activityTypeService = new ActivityTypeService(dataContext);
     pageSize             = Convert.ToInt32(ConfigurationManager.AppSettings["pageSize"]);
 }