public void Save(MarketAuditViewModel marketAuditViewModel)
 {
     MarketAudit marketAudit = new MarketAudit(marketAuditViewModel.Id) 
     {
         Question=marketAuditViewModel.Question,
         StartDate=marketAuditViewModel.StartDate,
         EndDate=marketAuditViewModel.EndDate  
     };
     _marketAuditRepository.Save(marketAudit );
 }
Пример #2
0
        public ActionResult CreateMarketAudit(MarketAuditViewModel tpvm)
        {
           
            try
            {
                tpvm.Id = Guid.NewGuid();
                _marketAuditViewmodelbuilder.Save(tpvm);
                return RedirectToAction("ListMarketAudits");
            }

            catch (DomainValidationException dve)
            {

                ValidationSummary.DomainValidationErrors(dve,ModelState);
                //ViewBag.msg = msg;
                return View();
            }
            catch (Exception ex)
            {
                ViewBag.msg = ex.Message;

                return View();
            }
        }
Пример #3
0
 public ActionResult EditMarketAudit(MarketAuditViewModel tpvm)
 {
     _marketAuditViewmodelbuilder.Save(tpvm);
     return RedirectToAction("ListMarketAudits");
 }