Exemplo n.º 1
0
        public ActionResult MyHistory()
        {
            var MyCars = JJAutosDB.CarDBs.Where(c => c.UserId == User.Identity.Name).ToList();
            MyHistoryViewModel myHistory = new MyHistoryViewModel();

            foreach (var car in MyCars)
            {
                var qoutes = (JJAutosDB.QouteDBs.Where(q => q.CarId == car.RegNo).ToList());
                myHistory.MyQoutes.AddRange(QouteViewModel.ToQouteViewModel(qoutes));
            }
            return(View(myHistory));
        }
Exemplo n.º 2
0
        public ActionResult MiHistorial()
        {
            SelectorBL   oSelectorBL   = new SelectorBL();
            MeritRangeBL oMeritRangeBL = new MeritRangeBL();

            List <MeritRangeViewModel> oMeritRange = oMeritRangeBL.ObtenerTodos();

            ViewBag.merit_ranges_json = JsonConvert.SerializeObject(oMeritRange);
            ViewBag.merit_ranges      = oMeritRange;
            ConceptBL          oConceptBL          = new ConceptBL();
            MyHistoryViewModel oMyHistoryViewModel = oConceptBL.ObtenerMiHistorial(AuthorizeUserAttribute.UsuarioLogeado().investigator_id);

            if (oMyHistoryViewModel == null)
            {
                oMyHistoryViewModel = new MyHistoryViewModel();

                oMyHistoryViewModel.nro_concepts       = 0;
                oMyHistoryViewModel.my_points          = 0;
                oMyHistoryViewModel.qualified_concepts = 0;
                oMyHistoryViewModel.approved_concepts  = 0;
            }
            ViewBag.my_points = oMyHistoryViewModel.my_points;
            return(View(oMyHistoryViewModel));
        }
Exemplo n.º 3
0
 public ActionResult MyHistory(MyHistoryViewModel myHistory)
 {
     return(View());
 }