コード例 #1
0
 public ActionResult Create(VisitsViewModel model)
 {
     if (ModelState.IsValid)
     {
         Visit one = new Visit();
         one.Status   = "Oczekująca";
         one.TestsId  = CartHelper.GetCart();
         one.dateTime = model.Date;
         one.User     = _user.FindByIdAsync(_user.GetUserId(HttpContext.User)).Result;
         _visits.Add(one);
         CartHelper.ResetCart();
     }
     ViewBag.Save = 1;
     return(RedirectToAction("Create"));
 }
コード例 #2
0
 public void AddVisits(string year, string month, int visitCount)
 {
     visits.Add(year, month, visitCount);
 }