Example #1
0
        public IActionResult Edit(LheForm lheForm)
        {
            if (ModelState.IsValid)
            {
                var module = new LesniHospodarskaEvidenceTableModule(db);
                var ev     = new LesniHospodarskaEvidence
                {
                    Datum             = lheForm.Datum,
                    Mnozstvi          = lheForm.Mnozstvi,
                    Plocha            = lheForm.Plocha,
                    Poznamka          = lheForm.Poznamka,
                    IdPorostniSkupina = "f6d514ef-f51f-4228-8bec-252c0113291f",
                    IdPodvykon        = "141_0",
                    IdDrevina         = "98B80C09988C407C855302ED924A59FC",
                    IdDruhTezby       = "AFE2719213AD4AFD8118C52654F8EE95",
                    Id = lheForm.Id
                };

                module.UpdateLhe(ev);
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View(lheForm));
            }
        }
Example #2
0
        public IActionResult Edit(string id)
        {
            var module = new LesniHospodarskaEvidenceTableModule(db);
            var lhe    = module.LoadOne(id);
            var form   = new LheForm
            {
                Id       = lhe.Id,
                Mnozstvi = lhe.Mnozstvi,
                Plocha   = lhe.Plocha,
                Poznamka = lhe.Poznamka,
                Datum    = lhe.Datum
            };

            return(View(form));
        }