コード例 #1
0
        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));
        }
コード例 #2
0
        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);
        }