public ActionResult Board(string close)
        {
            ActivityFilter activityFilter = new ActivityFilter();
            bool isOpen = true;

            if (!string.IsNullOrEmpty(close)) {
                activityFilter.Open = false;
                isOpen = false;
            }

            List<Activity> activities = _ActivityService.GetActivities(activityFilter);
            List<Historic> historic = _HistoricService.GetHistorics();

            ActivityModel activityModel = new ActivityModel()
            {
                Activities = activities,
                Historics = historic,
                IsOpen = isOpen
            };

            return View(activityModel);
        }
        public ActionResult EditBoard(Activity activity)
        {
            if (activity.Title == null)
            {
                ActivityFilter activityFilter = new ActivityFilter()
                {
                    Id = activity.Id
                };

                Activity actvty = _ActivityService.GetActivity(activityFilter);

                return View(actvty);
            }

            if (activity.Date == DateTime.MinValue)
                activity.Date = DateTime.Now;

            _ActivityService.EditActivity(activity);

            return RedirectToAction("Board");
        }
 public Activity GetActivity(ActivityFilter activityFilter = null)
 {
     using (IBusinessProvider provider = base.CreateBusinessProvider())
     using (IActivityBusinessProvider prov = provider.CreateActivityBusinessProvider())
         return prov.GetActivity(activityFilter);
 }
        public ActionResult SubBoard(int activityId, int subActivityId = 0)
        {
            ActivityFilter activityFilter = new ActivityFilter()
            {
                Id = activityId
            };

            ResponsiblesFilter responsiblesFilter = new ResponsiblesFilter()
            {
                SubActivityId = subActivityId
            };

            SubActivityModel subActivityModel = new SubActivityModel()
            {
                Activity = _ActivityService.GetActivity(activityFilter),
                Responsibles = _ResponsiblesService.GetResponsibles(responsiblesFilter)
            };

            return View(subActivityModel);
        }
 public Activity GetActivity(ActivityFilter activityFilter = null)
 {
     using (IDataProvider provider = base.CreateDataProvider())
     using (IActivityRepository repository = provider.CreateActivityRepository())
         return repository.GetActivity(activityFilter);
 }