Beispiel #1
0
        public void SaveComments(MapComponentSummaryVM summary)
        {
            if (summary == null)
            {
                throw new PhenotypeException("Invalid viewModel");
            }
            if (summary.Id < 0)
            {
                throw new PhenotypeException("Invalid viewModel");
            }

            MapComponentYears mapcompyears = u_repo.GetMapComponentYear(summary.Id);

            mapcompyears.Comments = summary.Comments;
            try
            {
                u_repo.DoSaveMapComponentYear(mapcompyears);
            }
            catch (ArgumentNullException)
            {
                throw new PhenotypeException("Invalid mapcompyears to save");
            }
        }