/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Details(Nullable <int> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GrantDecisionVwViewModel grantDecisionVwViewModel = new GrantDecisionVwViewModel(); Db db = new Db(DbServices.ConnectionString); // grantDecisionVwViewModel.Instance = GrantDecisionVwServices.Get(id.Value, db); grantDecisionVwViewModel.Instance = GrantDecisionVwServices.GetChildren(id.Value, db); if (grantDecisionVwViewModel.Instance == null) { return(HttpNotFound()); } @ViewBag.GrantVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "Grant", "ModuleNamePlural"); // grantDecisionVwViewModel.GrantVwViewModel.List = GrantVwServices.GetByGrantDecisionId(id.Value, db); grantDecisionVwViewModel.GrantVwViewModel.List = grantDecisionVwViewModel.Instance.GrantVwList; return(View(grantDecisionVwViewModel)); }
/// <summary> /// Returns a list of GrantDecisionVw objects /// </summary> /// <returns></returns> public ActionResult Index(GrantDecisionVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); ViewBag.GrantTypeGroup = new SelectList(GrantTypeGroupServices.List(db), "Id", "Name"); if (Model.Filter.HasCriteria) { Model.List = GrantDecisionVwServices.Get(Model.Filter, db); } else { Model.List = new List <GrantDecisionVw>(); } return(View(Model)); }