// Create view with day history recs. public ActionResult Create(int nShowDayHistory = 0) { try { InvestingMVC.Models.InvestingTax mo = new InvestingMVC.Models.InvestingTax(); mo.tradeDate = DateTime.Now; ViewBag.DefBuyingCount = Constants.Values.DefBuyingCount; ViewBag.DefCommissionFee = Constants.Values.DefCommissionFee; return(View("CreateView", mo)); //return RedirectToAction("Index"); } catch (Exception ex) { Console.WriteLine("Error in retrieve records: " + ex.Message); return(Create()); } }
// GET: InvestingTax/Edit/5 //[HttpPost] public ActionResult Create3(string name) { InvestingMVC.Models.InvestingTax mo = new InvestingMVC.Models.InvestingTax(); mo.comments = name; return(View("CreateView", mo)); }