Example #1
0
        // GET: MuudaEraisik
        //public ActionResult Index()
        //{
        //    return View();
        //}

        // GET: MuudaEraisik/Details/5
        public ActionResult Index(int?id = null)
        {
            if (id == null)
            {
                return(Redirect(Url.Content("~/")));
            }
            EraisikApiController eraisikApiController = new EraisikApiController();
            var eraisik = eraisikApiController.Get(0, id);

            ViewBag.Eraisik = eraisik;
            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());
        }