Exemple #1
0
        public IActionResult AddInvestmentInfo(int id)
        {
            if (id < 1)
            {
                return(RedirectToAction("Index"));
            }
            var product  = _product.Get(s => s.Id == id).SingleOrDefault();
            var features = new ProductInvestmentInformationView();

            features.ProductId   = id;
            features.ProductName = $"{ product.Name.ToUpper()} ||  {product.ProductCategory.Name.ToUpper()}";

            return(View("_investment", features));
        }
Exemple #2
0
        public IActionResult AddInvestmentInfo(ProductInvestmentInformationView model)
        {
            if (ModelState.IsValid)
            {
                var rs = _product.Save(model);
                if (rs.Id > 0)
                {
                    model.RangOrCost = string.Empty;
                    model.Abs        = string.Empty;
                    return(View("_investment", model));
                }
            }

            return(View("_properties", model));
        }