Esempio n. 1
0
        // GET: MuudaJurIsik
        //public ActionResult Index()
        //{
        //   return View();
        //}

        // GET: MuudaJurIsik/Index/5
        public ActionResult Index(int?id = null)
        {
            if (id == null)
            {
                return(Redirect(Url.Content("~/")));
            }
            JurIsikApiController jurIsikApiController = new JurIsikApiController();
            var jurisik = jurIsikApiController.Get(0, id);

            ViewBag.Jurisik = jurisik;
            return(View());
        }
        // GET: LisaOsaleja
        //public ActionResult Index()
        //{
        //    return View("~/Views/Home");
        //}

        // GET: LisaOsaleja/Index/5
        public ActionResult Index(int?id = null)
        {
            if (id == null)
            {
                return(Redirect(Url.Content("~/")));
            }
            ViewBag.Title = "Osaleja lisamine";
            YritusApiController yritusController = new YritusApiController();
            var yritused = yritusController.Get(id);
            EraisikApiController eraisik = new EraisikApiController();
            var eraisikud = eraisik.Get((int)id, null);
            JurIsikApiController jurIsikApiController = new JurIsikApiController();
            var jurisikud = jurIsikApiController.Get((int)id, null);


            ViewBag.Yritus  = yritused;
            ViewBag.Eraisik = eraisikud;
            ViewBag.Jurisik = jurisikud;
            return(View());
        }