コード例 #1
0
 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());
 }
コード例 #2
0
        public IActionResult getCurrentCurses()
        {
            try
            {
                CursModel c = new CursModel();

                CURSES curses = c.GetCursOnDate();

                return(View(curses));
            }
            catch (Exception ex)
            {
                Console.WriteLine("controllerEX - " + ex.ToString());
                return(View());
            }
        }