/// <summary>
        /// Returns a list of ServiceEndGrantRequestVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(ServiceEndGrantRequestVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            ViewBag.ProductTypeList = new SelectList(ProductTypeServices.List(db), "Id", "Name");
            if (Model.Filter.HasCriteria)
            {
                Model.List = ServiceEndGrantRequestVwServices.Get(Model.Filter, db);
            }
            else
            {
                Model.List = new List <ServiceEndGrantRequestVw>();
            }
            return(View(Model));
        }
예제 #2
0
        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));
        }