Exemplo n.º 1
0
        private A1CViewModel GetA1cForThisUser()
        {
            var          a1C   = db.A1C.Include(a => a.User);
            A1CViewModel model = new A1CViewModel(a1C.ToList());

            return(model);
        }
Exemplo n.º 2
0
        public ActionResult Chart()
        {
            A1CViewModel model = GetA1cForThisUser();

            model.Chart.Write("bmp");
            return(null);
        }
Exemplo n.º 3
0
        public void InputA1CData(A1CViewModel model)
        {
            InputModel dataMappedModel = Mapper.Map <A1CViewModel, InputModel>(model);

            dataMappedModel.user = _user;
            AddModel(dataMappedModel);
        }
Exemplo n.º 4
0
 public ActionResult A1C(A1CViewModel model)
 {
     if (ModelState.IsValid)
     {
         service.InputA1CData(model);
         return(RedirectToAction("Index", "Input"));
     }
     return(View(model));
 }
Exemplo n.º 5
0
        // GET: A1C
        public ActionResult Index()
        {
            A1CViewModel model = GetA1cForThisUser();

            return(View(model));
        }