/// <summary> /// Verzamelt de URL delen in een URL. /// </summary> /// <param name="sectie">Huidige sectie.</param> /// <param name="huidigeFormulierVanUitNav">Een formulier.</param> /// <returns>De URL van deze adress.</returns> protected string GetUrl(FormulierSectie sectie, Formulier huidigeFormulierVanUitNav) { int formulierNummer = -1; foreach (Formulier huidigeFormulier in this.formulieren) { formulierNummer++; if (huidigeFormulierVanUitNav == huidigeFormulier) { foreach (FormulierSectie huidigeSectie in huidigeFormulier.Kinderen) { if (sectie == huidigeSectie) { return(this.HashTagName = "/" + formulierNummer.ToString() + "#" + sectie.SectionNumber.ToString()); } } } } return(this.HashTagName); }
/// <summary> /// Voeg de data van een secties in. /// </summary> /// <param name="sectie">De sectie die zijn data wordt ingevoegd.</param> protected void ToggleDataSection(FormulierSectie sectie) { if (sectie.SectionKinderen != null) { if (sectie != this.Section) { this.oldSection = this.Section; } this.Section = sectie; if (this.formulierSectionsKindGroup == null) { // bringt de element van de huidige formulier. // Sorteert de element bij groepen. this.formulierSectionsKindGroup = this.Section.SectionKinderen.GroupBy(g => g.Row).OrderBy(o => o.Key); } else { this.formulierSectionsKindGroup = null; } this.StateHasChanged(); } }