public ActionResult CreateAlert()
        {
            var model      = new AlertCreateViewModel();
            var itemSelect = im.GetItems().Select(x => new SelectListItem {
                Value = x.ItemId.ToString(), Text = x.Name
            });

            model.Items = new SelectList(itemSelect, "Value", "Text");
            return(View(model));
        }
 public ActionResult CreateAlert(AlertCreateViewModel alert)
 {
     try
     {
         Alert a = new Alert
         {
             Item          = im.GetItem(alert.Id),
             ConditionPerc = alert.Percentage
                             //User = userManager.g
         };
         return(RedirectToAction("AlertOverview"));
         // am.CreateAlert()
     }
     catch
     {
         return(View());
     }
 }