using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using TelerikAspNetCoreApp394.Models;

namespace TelerikAspNetCoreApp394.Controllers
{
    public class HomeController : Controller
    {

        public IActionResult Index()
        {
            TransactionViewModel transaction = new TransactionViewModel
            {
                SourceUri = "SourceTestUri",
                FileDescription = "FileTestDescription",
                BusinessReason = "BusinessTestReason",
                FileVersion = "1.0.0.0"
            };
            return View(transaction);
        }

        public IActionResult Load_Step(string type)
        {
            if (type == "Choose")
            {
                return PartialView("_ChoosePartial");
            }
            return PartialView("_UploadPartial");
        }
        public IActionResult ReadDropDownData()
        {
            var data = Enumerable.Range(1, 10)
                .Select(i => new SelectListItem
                {
                    Text = "Text" + i,
                    Value = i.ToString()
                }).ToList();

            return Json(data);
        }
        public IActionResult About()
        {
            ViewData["Message"] = "Your application description page.";

            return View();
        }

        public IActionResult Contact()
        {
            ViewData["Message"] = "Your contact page.";

            return View();
        }

        public IActionResult Error()
        {
            return View();
        }
    }
}
