示例#1
0
        public void OnPreDeleteRecord(string entityName, EntityRecord record, List <ErrorModel> errors)
        {
            var service = new EmailServiceManager().GetSmtpService((Guid)record["id"]);

            if (service != null && service.IsDefault)
            {
                errors.Add(new ErrorModel {
                    Key = "id", Message = "Default smtp service cannot be deleted."
                });
            }
            else
            {
                EmailServiceManager.ClearCache();
            }
        }
示例#2
0
 public void OnPostUpdateRecord(string entityName, EntityRecord record)
 {
     EmailServiceManager.ClearCache();
 }