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

            Db db = new Db(DbServices.ConnectionString);

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


            @ViewBag.ProductTypeVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "ProductType", "ModuleNamePlural");
            // profitStrategyVwViewModel.ProductTypeVwViewModel.List = ProductTypeVwServices.GetByProfitStrategyId(id.Value, db);
            profitStrategyVwViewModel.ProductTypeVwViewModel.List = profitStrategyVwViewModel.Instance.ProductTypeVwList;


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

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