Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <short> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProductTypeVwViewModel productTypeVwViewModel = new ProductTypeVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

            // productTypeVwViewModel.Instance = ProductTypeVwServices.Get(id.Value, db);
            productTypeVwViewModel.Instance = ProductTypeVwServices.GetChildren(id.Value, db);
            if (productTypeVwViewModel.Instance == null)
            {
                return(HttpNotFound());
            }


            @ViewBag.LoanTypeVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "LoanType", "ModuleName");
            if (productTypeVwViewModel.Instance.LoanTypeVw != null)
            {
                productTypeVwViewModel.LoanTypeVwViewModel.List.Add(productTypeVwViewModel.Instance.LoanTypeVw);
            }
            // productTypeVwViewModel.LoanTypeVwViewModel.Instance = productTypeVwViewModel.Instance.LoanTypeVw;

            @ViewBag.ProductTypeAvailabilityVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "ProductTypeAvailability", "ModuleNamePlural");
            // productTypeVwViewModel.ProductTypeAvailabilityVwViewModel.List = ProductTypeAvailabilityVwServices.GetByProductTypeId(id.Value, db);
            productTypeVwViewModel.ProductTypeAvailabilityVwViewModel.List = productTypeVwViewModel.Instance.ProductTypeAvailabilityVwList;


            return(View(productTypeVwViewModel));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a list of ProductTypeVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(ProductTypeVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            Model.List = ProductTypeVwServices.List(db);
            return(View(Model));
        }