private A1CViewModel GetA1cForThisUser() { var a1C = db.A1C.Include(a => a.User); A1CViewModel model = new A1CViewModel(a1C.ToList()); return(model); }
public ActionResult Chart() { A1CViewModel model = GetA1cForThisUser(); model.Chart.Write("bmp"); return(null); }
public void InputA1CData(A1CViewModel model) { InputModel dataMappedModel = Mapper.Map <A1CViewModel, InputModel>(model); dataMappedModel.user = _user; AddModel(dataMappedModel); }
public ActionResult A1C(A1CViewModel model) { if (ModelState.IsValid) { service.InputA1CData(model); return(RedirectToAction("Index", "Input")); } return(View(model)); }
// GET: A1C public ActionResult Index() { A1CViewModel model = GetA1cForThisUser(); return(View(model)); }