public ActionResult UpdateWLC(WLC WLCToUpdate) { BMR _BMR = _Mapper.Map(_BMRDA.GetRecentBMRByUser_ID((int)Session["User_ID"])); WLCToUpdate.Result = _Calc.WLC_Result(_BMR.Gender, _BMR.Age, _BMR.Height, _BMR.Weight, WLCToUpdate.Goal, WLCToUpdate.GoalTime); _WLCDataAccess.UpdateWLC(_Mapper.Map(WLCToUpdate)); return(RedirectToAction("ViewWLC", "WLC")); }
public ActionResult CreateWLC(WLC _viewModel) { BMR _BMR = _Mapper.Map(_BMRDA.GetRecentBMRByUser_ID((int)Session["User_ID"])); _viewModel.Result = _Calc.WLC_Result(_BMR.Gender, _BMR.Age, _BMR.Height, _BMR.Weight, _viewModel.Goal, _viewModel.GoalTime); _WLCDataAccess.CreateWLC(_Mapper.Map(_viewModel, _BMR)); _viewModel.User_ID = (int)Session["User_ID"]; return(RedirectToAction("ViewWLC", "WLC")); }
public ActionResult UpdateWLC(int ID) { WLC WLCToUpdate = _Mapper.Map(_WLCDataAccess.GetWLCByID(ID)); return(View(WLCToUpdate)); }
public ActionResult CreateWLC() { WLC _viewModel = new WLC(); return(View(_viewModel)); }