public IActionResult Index() { CursModel c = new CursModel(); ViewBag.Valutes = c.GetValutes(); return(View()); }
public ActionResult Index(string Valutes, DateTime StartDate, DateTime EndDate, string action) { try { CursModel c = new CursModel(); ViewBag.Valutes = c.GetValutes(); Console.WriteLine(action); Console.WriteLine("StartDate," + StartDate + " EndDate, " + EndDate + " Valutes, " + Valutes); if (action == "GetCurCurs") { ViewBag.Act = true; ViewBag.CurCurs = c.GetCursOnDate(); } else if (action == "GetDynamicCurs") { ViewBag.Act = false; Console.WriteLine("StartDate," + StartDate + " EndDate, " + EndDate + " Valutes, " + Valutes); ViewBag.DynCurs = c.GetDynamicCurs(StartDate, EndDate, Valutes); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } return(View()); }