示例#1
0
 public override void Validate(ValidationMessages messages)
 {
     var service = new TaxaService(PluginManager.Instance.User);
     if (!service.SafeToDeleteTaxon(Taxon.TaxaID.Value)) {
         messages.Warn("There are material and or associations that will be orphaned if you delete this taxon.");
     }
 }
        public override void Validate(ValidationMessages messages)
        {
            var service = new TaxaService(PluginManager.Instance.User);

            if (!service.SafeToDeleteTaxon(Taxon.TaxaID.Value))
            {
                messages.Warn("There are material and or associations that will be orphaned if you delete this taxon.");
            }
        }
        public override void Validate(ValidationMessages messages)
        {
            var service = new LoanService(PluginManager.Instance.User);
            // Search for loans with this loan number...
            var existing = service.FindLoans(Model.LoanNumber, "l", false);

            if (existing != null && existing.Count > 0)
            {
                messages.Warn("A loan already exists with this loan number.");
            }
        }