/// <summary> /// Returns a list of EventCategoryVw objects /// </summary> /// <returns></returns> public ActionResult Index(EventCategoryVwViewModel Model) { if (Model.Filter.HasCriteria) { Db db = new Db(DbServices.ConnectionString); Model.List = EventCategoryVwServices.Get(Model.Filter, db); } else { Model.List = new List <EventCategoryVw>(); } return(View(Model)); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Details(Nullable <int> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EventCategoryVwViewModel eventCategoryVwViewModel = new EventCategoryVwViewModel(); Db db = new Db(DbServices.ConnectionString); // eventCategoryVwViewModel.Instance = EventCategoryVwServices.Get(id.Value, db); eventCategoryVwViewModel.Instance = EventCategoryVwServices.GetChildren(id.Value, db); if (eventCategoryVwViewModel.Instance == null) { return(HttpNotFound()); } return(View(eventCategoryVwViewModel)); }