Classe responsável por representar o subHistórico de atividades
Наследование: BaseEntity
        public ActionResult Create(SubHistoric subHistoric, int id)
        {
            if (string.IsNullOrEmpty(subHistoric.ParticipantsAmount))
                return View();

            subHistoric.HistoricId = id;

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

            _SubHistoricService.CreateSubHistoric(subHistoric);

            return RedirectToAction("Index", "Historic", new { id = id });
        }
        public ActionResult Edit(SubHistoric subHistoric)
        {
            if (string.IsNullOrEmpty(subHistoric.ParticipantsAmount))
            {
                SubHistoricFilter subHistoricFilter = new SubHistoricFilter()
                {
                    Id = subHistoric.Id
                };

                SubHistoric sbhstrc = _SubHistoricService.GetSubHistoric(subHistoricFilter);

                return View(sbhstrc);
            }

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

            _SubHistoricService.EditSubHistoric(subHistoric);

            return RedirectToAction("Index", "Historic", new { id = subHistoric.HistoricId });
        }
 public void EditSubHistoric(SubHistoric subHistoric)
 {
     using (IBusinessProvider provider = base.CreateBusinessProvider())
     using (ISubHistoricBusinessProvider prov = provider.CreateSubHistoricBusinessProvider())
         prov.EditSubHistoric(subHistoric);
 }
 public void EditSubHistoric(SubHistoric subHistoric)
 {
     using (IDataProvider provider = base.CreateDataProvider())
     using (ISubHistoricRepository repository = provider.CreateSubHistoricRepository())
         repository.Update(subHistoric);
 }