Classe responsável por representar uma atividade
Inheritance: BaseEntity
        public ActionResult CreateBoard(Activity activity)
        {
            if (activity == null || activity.Title == null)
                return View();

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

            activity.Status = true;
            _ActivityService.CreateActivity(activity);

            return RedirectToAction("Board");
        }
        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");
        }
Ejemplo n.º 3
0
 public void EditActivity(Activity activity)
 {
     using (IBusinessProvider provider = base.CreateBusinessProvider())
     using (IActivityBusinessProvider prov = provider.CreateActivityBusinessProvider())
         prov.EditActivity(activity);
 }
 public void EditActivity(Activity activity)
 {
     using (IDataProvider provider = base.CreateDataProvider())
     using (IActivityRepository repository = provider.CreateActivityRepository())
         repository.Update(activity);
 }