Example #1
0
        protected override void ProcessImpl(User user)
        {
            var service = new MaterialService(user);

            if (string.IsNullOrEmpty(Model.VisitName) || Preferences.AutoGenerateSiteVisitNames.Value)
            {
                Model.VisitName = NameFormatter.FormatSiteVisitName(Model);
            }

            service.UpdateSiteVisitRDE(Model);
        }
Example #2
0
        protected override void ProcessImpl(User user)
        {
            var service = new MaterialService(user);

            if (Model.DateStart.GetValueOrDefault(-1) < 0 && Model.DateEnd.GetValueOrDefault(-1) < 0)
            {
                Model.DateType = 2;
            }
            else
            {
                Model.DateType = 1;
            }

            if (Preferences.AutoGenerateSiteVisitNames.Value)
            {
                Model.SiteVisitName = NameFormatter.FormatSiteVisitName(Model);
            }

            service.UpdateSiteVisit(Model);
        }