Beispiel #1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="manager"></param>
            /// <param name="obj"></param>
            /// <returns></returns>
            public bool ValidateCanDeleteWithoutException(DbManagerProxy manager, VectorSample obj)
            {
                bool result;

                _canDelete(manager
                           , obj.idfMaterial
                           , out result
                           );
                return(result);
            }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 protected static void CustomValidations(VectorSample sample)
 {
     //у всех семплов в сессии должна быть уникальная пара Field Sample ID + Vector Type
     if (sample.VectorType == null)
     {
         return;
     }
     if (sample.Samples == null)
     {
         return;
     }
     if (sample.Samples.Count(s => (s.GetKey() == sample.GetKey()) && (s.idfMaterial != sample.idfMaterial) && !s.IsMarkedToDelete) > 0)
     {
         throw new ValidationModelException("msgVectorSampleUniqueID", "strFieldBarcode", "strFieldBarcode", new object[] { }, null, ValidationEventType.Error, sample);
     }
 }