/// <summary> /// Valid description /// </summary> /// <returns></returns> public ValidationReturn ValidSub_descricao() { ValidationReturn valid = _subcategoriaValidation.CheckSub_descricaoIsNullOrEmpty(Entity.Sub_descricao); if (!valid.Valid) { return(valid); } valid = _subcategoriaValidation.CheckSub_descricaoThereAreOtherEqual(Entity.Sub_id, Entity.Sub_descricao); if (!valid.Valid) { return(valid); } return(new ValidationReturn()); }
/// <summary> /// Valida Subcategoria /// </summary> /// <returns></returns> public ValidationReturn ValidSubcategoria() { ValidationReturn valid = _subcategoriaValidation.CheckSub_descricaoIsNullOrEmpty(Entity.Sub_descricaoView); if (!valid.Valid) { return(valid); } valid = _subcategoriaValidation.CheckSub_descricaoRegistered(_subcategoriaAppService.GetSub_idBySub_descricao(Entity.Sub_descricaoView)); if (!valid.Valid) { return(valid); } valid = _subcategoriaValidation.CheckSub_inativo(_subcategoriaAppService.GetSub_idBySub_descricao(Entity.Sub_descricaoView)); if (!valid.Valid) { return(valid); } return(new ValidationReturn()); }