This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Hola, esta clase es para detectar duplicados visualmente en el listview de nuestro proyecto de Blazor en XAF / DevExpress | |
Ayuda a que sea para diversas propiedades, es reutilizable, centralizado, se usa el caché de la sesión para | |
evitar consultar la BD en cada refresh, y se tiene una funcionalidad de que se borré el caché cuando | |
algun coolaborador actualice algún registro | |
Puntos en este módulo: | |
🔧 1. Clase DuplicadoHelper.cs | |
🧬 2. Cómo usarlo en cualquier clase XPO (por ejemplo Servidor) | |
🎨 3. Usa Appearance para aplicar color visual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private byte[] _VistaImagen; | |
[NonPersistent] | |
[ImageEditor(ListViewImageEditorMode = ImageEditorMode.PictureEdit, DetailViewImageEditorMode = ImageEditorMode.PictureEdit, ListViewImageEditorCustomHeight = 40, DetailViewImageEditorFixedHeight = 80)] | |
[XafDisplayName("Vista (cuando es imagen)")] | |
public byte[] VistaImagen | |
{ | |
get | |
{ | |
if (_VistaImagen == null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Esta propiedad permite visualizar el PDF en modo lectura, presentando el PDF y poder navegar dentro de sus páginas. | |
[VisibleInListView(false), VisibleInDetailView(true)] | |
[XafDisplayName("Visor PDF Original")] | |
public byte[] PdfDataOriginal | |
{ | |
get | |
{ | |
if (ArchivoOriginal == null) return new byte[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Fuente: https://database.guide/3-ways-to-list-all-stored-procedures-in-a-sql-server-database/*/ | |
SELECT | |
ROUTINE_SCHEMA, | |
ROUTINE_NAME | |
FROM INFORMATION_SCHEMA.ROUTINES | |
WHERE ROUTINE_TYPE = 'PROCEDURE'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Fuente https://stackoverflow.com/a/4305751 */ | |
SELECT | |
sysobjects.name AS trigger_name | |
,USER_NAME(sysobjects.uid) AS trigger_owner | |
,s.name AS table_schema | |
,OBJECT_NAME(parent_obj) AS table_name | |
,OBJECTPROPERTY( id, 'ExecIsUpdateTrigger') AS isupdate | |
,OBJECTPROPERTY( id, 'ExecIsDeleteTrigger') AS isdelete | |
,OBJECTPROPERTY( id, 'ExecIsInsertTrigger') AS isinsert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***Guarda tu imagen en formato base64, y el DevExpress te mostrará la vista previa.***/ | |
private string base64; | |
[VisibleInDetailView(false), VisibleInListView(false), VisibleInLookupListView(false)] | |
[Size(SizeAttribute.Unlimited)] | |
public string Base64 | |
{ | |
get { return base64; } | |
set { SetPropertyValue("Base64", ref base64, value); } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
print('Estamos a punto de pedir datos'); | |
httpGet("hola").then((data){ | |
print(data); | |
}); | |
print('Recibimos los datos'); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final pato = new Pato(); | |
pato.volar(); | |
final pezVolador = new PezVolador(); | |
pezVolador.nadar(); | |
} | |
abstract class Volador { | |
void volar() => print("Estoy volando"); | |
} |