public string UpdateEmailReceiver(EmailReceiverForm emailReceiverForm) { DefaultController defaultController = new DefaultController(EmailReceiverService.Keywords.EMAILRECEIVER); defaultController.FormValidator = new EmailReceiverFormValidator(); OperationResult result = defaultController.Update(emailReceiverForm); return(Serializer.Json.Serialize(result)); }
public ValidationResult Validate(DataForm form) { ValidationResult result = new ValidationResult(true); EmailReceiverForm emailReceiverForm = (EmailReceiverForm)form; if (emailReceiverForm.Tag.Length == 0) { result.Result = false; result.ErrorMessage = "Tag can not be empty"; } return(result); }