//[Route("dok/kommunalt/{municipalityCode}/rediger")]
        public ActionResult EditDokMunicipal(string municipalityCode)
        {
            if (_accessControlService.AccessEditOrCreateDOKMunicipalBySelectedMunicipality(municipalityCode))
            {
                var             municipality         = _registerItemService.GetMunicipalityOrganizationByNr(municipalityCode);
                Models.Register dokMunicipalRegister = _registerService.GetDokMunicipalRegister();
                var             municipalDatasets    = _registerService.GetDatasetBySelectedMunicipality(dokMunicipalRegister, municipality);

                if (municipality != null)
                {
                    var dokMunicipalEditList = new List <DokMunicipalEdit>();
                    foreach (Dataset dataset in municipalDatasets)
                    {
                        var row = new DokMunicipalEdit(dataset, municipality);
                        dokMunicipalEditList.Add(row);
                    }
                    ViewBag.selectedMunicipality     = municipality.name;
                    ViewBag.selectedMunicipalityCode = municipalityCode;
                    var statusDokMunicipalList = CreateStatusDokMunicipalList();

                    ViewBag.statusDOKMunicipal = new SelectList(statusDokMunicipalList, "value", "description", DOKmunicipalStatus(municipality));
                    return(View(dokMunicipalEditList));
                }
                else
                {
                    return(HttpNotFound());
                }
            }
            return(HttpNotFound());
        }
        private CoverageDataset CreateNewCoverage(DokMunicipalEdit item, Dataset originalDataset, string municipalityCode, bool coverageFound)
        {
            Organization    municipality = _registerItemService.GetMunicipalityOrganizationByNr(municipalityCode);
            CoverageDataset coverage     = new CoverageDataset
            {
                CoverageId          = Guid.NewGuid(),
                CoverageDOKStatusId = "Accepted",
                ConfirmedDok        = item.Confirmed,
                Coverage            = coverageFound,
                dataset             = originalDataset,
                DatasetId           = originalDataset.systemId,
                MunicipalityId      = municipality.systemId,
                Note = item.Note
            };

            return(coverage);
        }