public ActionResult Details(int?id) { @ViewBag.ServiceEndGrantRequestVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "ServiceEndGrantRequest", "ModuleName"); // Details Of Products if (id == null) { return(RedirectToAction("Index")); } Db db = new Db(DbServices.ConnectionString); // Product ProductVwViewModel productVwViewModel = new ProductVwViewModel(); productVwViewModel.Instance = ProductVwServices.GetChildren(id.Value, db); if (productVwViewModel.Instance == null) { return(HttpNotFound()); } productVwViewModel.RequestVwViewModel.Instance = RequestVwServices.Get(id.Value); productVwViewModel.RequestVwViewModel.GrantRequestVwViewModel.Instance = GrantRequestVwServices.Get(id.Value); productVwViewModel.RequestVwViewModel.GrantRequestVwViewModel.ServiceEndGrantRequestVwViewModel.Instance = ServiceEndGrantRequestVwServices.Get(id.Value); return(View(productVwViewModel)); }
/// <summary> /// Returns a list of GrantRequestVw objects /// </summary> /// <returns></returns> public ActionResult Index(GrantRequestVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); ViewBag.GrantType = new SelectList(GrantTypeServices.List(db), "Id", "Name"); if (Model.Filter.HasCriteria) { Model.List = GrantRequestVwServices.Get(Model.Filter, db); } else { Model.List = new List <GrantRequestVw>(); } return(View(Model)); }