/// <summary> /// Returns a list of GrantTypeVw objects /// </summary> /// <returns></returns> public ActionResult Index(GrantTypeVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); Model.List = GrantTypeVwServices.List(db); return(View(Model)); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Details(Nullable <byte> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GrantTypeVwViewModel grantTypeVwViewModel = new GrantTypeVwViewModel(); Db db = new Db(DbServices.ConnectionString); // grantTypeVwViewModel.Instance = GrantTypeVwServices.Get(id.Value, db); grantTypeVwViewModel.Instance = GrantTypeVwServices.GetChildren(id.Value, db); if (grantTypeVwViewModel.Instance == null) { return(HttpNotFound()); } return(View(grantTypeVwViewModel)); }