140 lines
5.7 KiB
VB.net
140 lines
5.7 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Data.Entity.Core.Metadata.Edm
|
|
Imports System.Data.Entity.Core.Objects
|
|
Imports DevExpress.Xpf.Docking
|
|
Imports DevExpress.Xpf.Editors
|
|
|
|
Public Enum TiposModificacion
|
|
Modificable = 0
|
|
ModificableEnNuevos = 1
|
|
ModificableEnExistentes = 2
|
|
NoModificable = 3
|
|
End Enum
|
|
|
|
<TypeConverterAttribute(GetType(System.ComponentModel.ExpandableObjectConverter))>
|
|
Public Class PropiedadesTS
|
|
' Public Property ApCablin As ApCabLin
|
|
Public Property NombreCampo As String = ""
|
|
Public Property Modificable As TiposModificacion
|
|
Public Property Obligatorio As Boolean
|
|
Public Property UsualCorreccion As Boolean = True
|
|
Public Property Unico As Boolean = False
|
|
Public Property NumeroObjeto As Integer
|
|
Public Property CapturarEnter As Boolean = True
|
|
Public Property MayusculasMinusculas As CharacterCasing = CharacterCasing.Upper
|
|
|
|
End Class
|
|
<TypeConverterAttribute(GetType(System.ComponentModel.ExpandableObjectConverter))>
|
|
Public Class PropiedadesTSGC
|
|
Public Property Descripcion As String
|
|
Public Property CamposObligatorios As String
|
|
Public Property CamposUnicos As String
|
|
Public Property PermitirEliminar As Boolean = True
|
|
Public Property PermitirExportar As Boolean?
|
|
Public Property EnlazarNulosOVacios As Boolean = False
|
|
Public Property PermisosDefecto As tsUtilidades.Permisos
|
|
Public Property CabeceraImpresion As String
|
|
Public Property BusquedaAcentosInsensitivo As Boolean = False
|
|
End Class
|
|
|
|
|
|
Public Class Plantilla
|
|
Property idPlantilla As Integer
|
|
Property Descripcion As String
|
|
|
|
End Class
|
|
Public Class Accion
|
|
Property idAccion As Integer
|
|
Property Descripcion As String
|
|
End Class
|
|
Public Enum TiposPermisosEnum
|
|
Consultar = 0
|
|
Nuevos = 1
|
|
Eliminar = 2
|
|
Modificar = 3
|
|
Otros = 4
|
|
End Enum
|
|
'Public Enum ModoContextoSavingChangesEnum
|
|
' EventoSavingChanges = 0
|
|
' SoloDespuesGuardar = 1
|
|
'End Enum
|
|
|
|
Public Class Configuracion
|
|
Public Shared ModoBusquedaAND As Boolean = True
|
|
Public Shared ComportamientoValidacion As Validation.InvalidValueBehavior = DevExpress.Xpf.Editors.Validation.InvalidValueBehavior.AllowLeaveEditor
|
|
' Public Shared ComportamientoValidacion As Validation.InvalidValueBehavior = Validation.InvalidValueBehavior.WaitForValidValue
|
|
' Public Shared ModoEventosContextoSavingChanges As ModoContextoSavingChangesEnum = ModoContextoSavingChangesEnum.EventoSavingChanges
|
|
' Public Shared ModoEventosContextoSavingChanges As ModoContextoSavingChangesEnum = ModoContextoSavingChangesEnum.SoloDespuesGuardar
|
|
Public Shared MostrarBotonCerrarEnPestaña As Boolean = True
|
|
Public Shared NuevosRapido As Boolean = True
|
|
Public Shared BusquedaAcentosInsensitivo As Boolean = False
|
|
Public Delegate Function DelegadoModoSuperUsuario(Aplicacion As tsUserControl) As Boolean
|
|
Public Shared FuncionModoSuperUsuario As DelegadoModoSuperUsuario
|
|
Public Shared MostrarPrevisualizar As Boolean = True
|
|
End Class
|
|
|
|
|
|
Public Class Comun
|
|
Public Shared WithEvents dm As DockLayoutManager
|
|
|
|
Public Delegate Sub ErrorNoControlado(Aplicacion As String, ex As Exception)
|
|
Public Shared Sub RefrescaAplicaciones(lg As LayoutGroup, TagsApArefrescar() As String, DocPanelTag As String, Optional AplicacionPadre As Type = Nothing)
|
|
|
|
Try
|
|
Dim dcs As IEnumerable(Of BaseLayoutItem)
|
|
If Not TagsApArefrescar Is Nothing Then
|
|
For Each grupodocumentos As DocumentGroup In lg.Items.Where(Function(x) x.GetType Is GetType(DocumentGroup))
|
|
For Each Etiqueta In TagsApArefrescar
|
|
dcs = (From p In grupodocumentos.Items Where p.Tag = Etiqueta)
|
|
If dcs.Count > 0 Then
|
|
Dim dc As DocumentPanel = dcs.First
|
|
Dim a = DirectCast(dc.Content, ContenedorAplicacion)._Aplicacion
|
|
If a.HabilitarRefresco Then
|
|
If a.RefrescoSolicitado = False Then
|
|
a.RefrescoSolicitado = True
|
|
a.Dispatcher.BeginInvoke(New Action(Sub() a.RefrescaUC(, True)), System.Windows.Threading.DispatcherPriority.SystemIdle)
|
|
End If
|
|
End If
|
|
End If
|
|
Next
|
|
Next
|
|
Else
|
|
For Each grupodocumentos As DocumentGroup In lg.Items.Where(Function(x) x.GetType Is GetType(DocumentGroup))
|
|
dcs = (From p In grupodocumentos.Items Where p.Tag <> DocPanelTag)
|
|
For Each dc As DocumentPanel In dcs
|
|
|
|
Dim a = DirectCast(dc.Content, ContenedorAplicacion)._Aplicacion
|
|
If a.HabilitarRefresco OrElse (AplicacionPadre IsNot Nothing AndAlso a.GetType Is AplicacionPadre) Then
|
|
If a.RefrescoSolicitado = False Then
|
|
a.RefrescoSolicitado = True
|
|
a.Dispatcher.InvokeAsync(New Action(Sub() a.RefrescaUC(, True)), System.Windows.Threading.DispatcherPriority.Background)
|
|
End If
|
|
End If
|
|
Next
|
|
Next
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.Write(ex.Message)
|
|
End Try
|
|
End Sub
|
|
End Class
|
|
|
|
|
|
<Serializable>
|
|
Public Class DiseñoRejillas
|
|
Property Rejillas As New List(Of DiseñoRejilla)
|
|
Property Version As String
|
|
End Class
|
|
<Serializable>
|
|
Public Class DiseñoRejilla
|
|
Public Diseño() As Byte
|
|
Public Version As String
|
|
Public Nombre As String
|
|
End Class
|
|
Public Enum OperacionDiseñoEnum
|
|
ABRIR
|
|
ABRIR_DISEÑO_GUARDADO
|
|
GUARDAR
|
|
GUARDAR_COMO
|
|
RESTAURAR_ORIGINAL
|
|
End Enum |