Ejemplo n.º 1
0
 private static DM.Inspection[] FindInspections(DM.Tour tour)
 {
     return(Repository.GetEntities <DM.Inspection>(source =>
     {
         source.SetWhere(MD.Inspection.Fields.TourId, IMRecordset.Operation.Eq, tour.Id);
         source.SetWhere(MD.Inspection.Fields.Status, IMRecordset.Operation.Like, MD.Inspection.Statuses.New);
     }));
 }
Ejemplo n.º 2
0
        private static bool ValidateTour(DM.Tour tour)
        {
            var  messages = new StringBuilder();
            bool result   = true;


            if (tour.MeasTaskId == 0 || tour.MeasTaskId == IM.NullI)
            {
                messages.AppendLine($"Undefined a task ID  of the tour #{tour.Id}");
                result = false;
            }



            if (!result)
            {
                Logger.WriteWarning(PluginMetadata.Processes.CreateMeasTask, messages.ToString(), true);
            }

            return(result);
        }