public ActionResult Index() { var awards = awardDm.GetAll(); ViewBag.Breadcrumb = new Breadcrumb("awards", null, null); return(View(awards)); }
public IHttpActionResult Get(string filter = null) { if (string.IsNullOrEmpty(filter)) { var awards = awardDm.GetAll(); return(Json(awards)); } else { var awards = awardDm.GetAwardsByFilter(filter); return(Json(awards)); } }
public ActionResult GetAvaliableAward(int id) { var user = userDm.GetUserByID(id); ViewBag.Breadcrumb = new Breadcrumb("user", "Add award", user.Name); if (user != null) { var awards = awardDM.GetAll(); user.Awards = awards.Except(user.Awards).ToList(); return(View(user)); } else { return(HttpNotFound()); } }