private void DeleteCyst() { var index = Cysts.IndexOf(SelectedCyst); Cysts.Remove(SelectedCyst); SelectedCyst = Cysts.Any() ? Cysts[index < Cysts.Count ? index : 0] : null; }
private void ApplyChangesToModel() { _model.VisitDate = VisitDate; _model.FIO = FIO; _model.BirthYear = BirthYear; _model.PhisiologicalStatus = PhisiologicalStatus; _model.FirstDayOfLastMenstrualCycle = FirstDayOfLastMenstrualCycle; _model.MenopauseText = MenopauseText; _model.IsSkinChanged = IsSkinChanged; _model.SkinChangedDesc = SkinChangedDesc; _model.Grandular = Grandular; _model.Adipose = Adipose; _model.MaxThicknessGlandularLayer = MaxThicknessGlandularLayer; _model.ActualToPhase = ActualToPhase; _model.CanalsExpandingType = CanalsExpandingType; _model.CanalsExpandingDesc = CanalsExpandingDesc; _model.DiffuseChanges = DiffuseChanges; _model.DiffuseChangesFeatures = DiffuseChangesFeatures; _model.VisualizatioNippleArea = VisualizatioNippleArea; _model.AreCysts = AreCysts; if (_model.Cysts == null) { _model.Cysts = new List <CystModel>(); } _model.Cysts.Clear(); if (Cysts != null && Cysts.Any()) { _model.Cysts.AddRange(Cysts.Select(x => new CystModel { Localization = x.Localization, Outlines = x.Outlines, Echogenicity = x.Echogenicity, Structure = x.Structure, Size = x.Size, CDK = x.CDK, Form = x.Form })); } _model.AreFocalFormations = AreFocalFormations; if (_model.FocalFormations == null) { _model.FocalFormations = new List <FocalFormationModel>(); } _model.FocalFormations.Clear(); if (FocalFormations != null && FocalFormations.Any()) { _model.FocalFormations.AddRange(FocalFormations.Select(x => new FocalFormationModel { Localization = x.Localization, Outlines = x.Outlines, Echogenicity = x.Echogenicity, Structure = x.Structure, Size = x.Size, CDK = x.CDK, Form = x.Form })); } _model.IsDeterminateLymphNodes = IsDeterminateLymphNodes; _model.LymphNodesDesc = LymphNodesDesc; _model.AdditionalDesc = AdditionalDesc; _model.IsNotPatalogyConclusion = IsNotPatalogyConclusion; _model.IsCystsConclusion = IsCystsConclusion; _model.CystConslusionDesc = CystConslusionDesc; _model.IsInvolutionConclusion = IsInvolutionConclusion; _model.IsSpecificConclusion = IsSpecificConclusion; _model.IsFocalFormationConclusion = IsFocalFormationConclusion; _model.FocalFormationConclusionPosition = FocalFormationConclusionPosition; _model.IsAdenosisConclusion = IsAdenosisConclusion; _model.IsEctasiaConclusion = IsEctasiaConclusion; _model.SpecificConclusionDesc = SpecificConclusionDesc; _model.Recomendation = MammaSpecialistsRecomendation; _model.IsLypomAdditionalInfo = IsLypomAdditionalInfo; }