- 2026-09-15 V1.4.5 Corrección ocultación de botón previsualizar
This commit is contained in:
@@ -127,12 +127,12 @@ Public MustInherit Class tsUserControl
|
||||
End Get
|
||||
Set(value As EstadosAplicacion)
|
||||
Dim EstadoAnterior As EstadosAplicacion = _Estado
|
||||
If EstadoAnterior = EstadosAplicacion.ModificandoRegistro And value <> EstadosAplicacion.Nuevo AndAlso BloqueoActivo IsNot Nothing Then _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.DESBLOQUEAR)
|
||||
If EstadoAnterior = EstadosAplicacion.ModificandoRegistro AndAlso value <> EstadosAplicacion.Nuevo AndAlso BloqueoActivo IsNot Nothing Then _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.DESBLOQUEAR)
|
||||
If CambiarEstado(EstadoAnterior, value) Then
|
||||
_Estado = value
|
||||
RaiseEvent EstadoCambiado(EstadoAnterior, _Estado)
|
||||
If value = EstadosAplicacion.ModificandoRegistro And _DelegadoBloqueo IsNot Nothing Then BloqueoActivo = _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.BLOQUEAR)
|
||||
CompruebaBloqueo
|
||||
If value = EstadosAplicacion.ModificandoRegistro AndAlso _DelegadoBloqueo IsNot Nothing Then BloqueoActivo = _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.BLOQUEAR)
|
||||
CompruebaBloqueo()
|
||||
If Me.docpanel IsNot Nothing Then Me.docpanel.Tag = Me.idRegistroAplicacionActual
|
||||
End If
|
||||
End Set
|
||||
@@ -349,6 +349,7 @@ Public MustInherit Class tsUserControl
|
||||
EstableceDataContextSecundarios(BackGround)
|
||||
_ContenedorAplicacion.bePlantilla.IsVisible = Not (_ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource.Count = 0 OrElse Me.PermisosConcedidos.Impresion = False)
|
||||
_ContenedorAplicacion.btImprimirPlantilla.IsVisible = Not (_ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource.Count = 0 OrElse Me.PermisosConcedidos.Impresion = False)
|
||||
_ContenedorAplicacion.btPrevisualizaPlantilla.IsVisible = _ContenedorAplicacion.btImprimirPlantilla.IsVisible
|
||||
_ContenedorAplicacion.beAcciones.IsVisible = Not (_ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbAcciones.ItemsSource.Count = 0)
|
||||
_ContenedorAplicacion.btAcciones.IsVisible = Not (_ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing OrElse _ContenedorAplicacion.cbAcciones.ItemsSource.Count = 0)
|
||||
Catch ex As Exception
|
||||
@@ -372,21 +373,21 @@ Public MustInherit Class tsUserControl
|
||||
Private Sub uc_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
Select Case e.Key
|
||||
Case Key.F1
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btGuardarYBuscar.IsVisible And Me.ContenedorAplicacion.btGuardarYBuscar.IsEnabled Then Me.ContenedorAplicacion.btGuardarYBuscar_ItemClick(Nothing, Nothing)
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btGuardarYBuscar.IsVisible AndAlso Me.ContenedorAplicacion.btGuardarYBuscar.IsEnabled Then Me.ContenedorAplicacion.btGuardarYBuscar_ItemClick(Nothing, Nothing)
|
||||
Case Key.F2
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btGuardar.IsVisible And Me.ContenedorAplicacion.btGuardar.IsEnabled Then Me.ContenedorAplicacion.btGuardar_ItemClick(Nothing, Nothing)
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btGuardar.IsVisible AndAlso Me.ContenedorAplicacion.btGuardar.IsEnabled Then Me.ContenedorAplicacion.btGuardar_ItemClick(Nothing, Nothing)
|
||||
Case Key.F3
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btBuscar.IsVisible And Me.ContenedorAplicacion.btBuscar.IsEnabled Then Me.ContenedorAplicacion.btBuscar_ItemClick(Nothing, Nothing)
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btBuscar.IsVisible AndAlso Me.ContenedorAplicacion.btBuscar.IsEnabled Then Me.ContenedorAplicacion.btBuscar_ItemClick(Nothing, Nothing)
|
||||
Case Key.F4
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btNuevo.IsVisible And Me.ContenedorAplicacion.btNuevo.IsEnabled Then Me.ContenedorAplicacion.Nuevo(Nothing, Nothing)
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btNuevo.IsVisible AndAlso Me.ContenedorAplicacion.btNuevo.IsEnabled Then Me.ContenedorAplicacion.Nuevo(Nothing, Nothing)
|
||||
Case Key.F5
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btActualizar.IsVisible And Me.ContenedorAplicacion.btActualizar.IsEnabled Then Me.ContenedorAplicacion.btActualizar_ItemClick(Nothing, Nothing)
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btActualizar.IsVisible AndAlso Me.ContenedorAplicacion.btActualizar.IsEnabled Then Me.ContenedorAplicacion.btActualizar_ItemClick(Nothing, Nothing)
|
||||
Case Key.F7
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible And Me.ContenedorAplicacion.btImprimirPlantilla.IsVisible And Me.ContenedorAplicacion.btImprimirPlantilla.IsEnabled Then Me.ContenedorAplicacion.btImprimirPlantilla_ItemClick(Nothing, Nothing)
|
||||
If Me.ContenedorAplicacion.BarraPrincipal.Visible AndAlso Me.ContenedorAplicacion.btImprimirPlantilla.IsVisible AndAlso Me.ContenedorAplicacion.btImprimirPlantilla.IsEnabled Then Me.ContenedorAplicacion.btImprimirPlantilla_ItemClick(Nothing, Nothing)
|
||||
Case Key.F8
|
||||
Comun.dm.DockController.RemovePanel(docpanel)
|
||||
Case Key.Pause
|
||||
If Keyboard.Modifiers = ModifierKeys.Shift And ModoSuperUsuario = False And Configuracion.FuncionModoSuperUsuario IsNot Nothing Then
|
||||
If Keyboard.Modifiers = ModifierKeys.Shift AndAlso ModoSuperUsuario = False AndAlso Configuracion.FuncionModoSuperUsuario IsNot Nothing Then
|
||||
ModoSuperUsuario = Configuracion.FuncionModoSuperUsuario(Me)
|
||||
If ModoSuperUsuario Then
|
||||
'Me.ContenedorCL.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorCL.IniciaAnimacion("Datos Guardadados", Colors.Black)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||
@@ -421,7 +422,7 @@ Public MustInherit Class tsUserControl
|
||||
Case Else
|
||||
bContinuar = True
|
||||
End Select
|
||||
If bContinuar And CapturarEnter Then
|
||||
If bContinuar AndAlso CapturarEnter Then
|
||||
|
||||
Dim os As ObjetoSeleccionable = (From o In ObjetosSeleccionables Where o.PropiedadesTS.NumeroObjeto = clave).First
|
||||
Dim i As Integer = ObjetosSeleccionables.IndexOf(os)
|
||||
@@ -437,7 +438,7 @@ Public MustInherit Class tsUserControl
|
||||
'Dim pt As Object = ObjetosSeleccionables(i).Objeto.parent
|
||||
'If pt IsNot Nothing AndAlso pt.GetType Is GetType(DevExpress.Xpf.Core.DXTabItem) Then
|
||||
' Dim tb As DevExpress.Xpf.Core.DXTabItem = pt
|
||||
' If Not tb.IsSelected And tb.Visibility = Visibility.Visible Then
|
||||
' If Not tb.IsSelected andalso tb.Visibility = Visibility.Visible Then
|
||||
' btbDeshabilitado = True
|
||||
' End If
|
||||
'End If
|
||||
@@ -449,7 +450,7 @@ Public MustInherit Class tsUserControl
|
||||
Do While Not p Is Nothing
|
||||
If p.GetType Is GetType(DevExpress.Xpf.Core.DXTabItem) Then
|
||||
Dim tb As DevExpress.Xpf.Core.DXTabItem = p
|
||||
If Not tb.IsSelected And tb.Visibility = Visibility.Visible Then
|
||||
If Not tb.IsSelected AndAlso tb.Visibility = Visibility.Visible Then
|
||||
|
||||
' bEnfocar = False
|
||||
'p.focus()
|
||||
@@ -497,7 +498,7 @@ Public MustInherit Class tsUserControl
|
||||
End If
|
||||
Else
|
||||
If Not ObjetoActual Is Nothing AndAlso Keyboard.Modifiers = ModifierKeys.Control Then
|
||||
If (e.Key = Key.Insert OrElse e.Key = Key.A) And ObjetoActual.GetType Is GetType(tsGridControl) Then
|
||||
If (e.Key = Key.Insert OrElse e.Key = Key.A) AndAlso ObjetoActual.GetType Is GetType(tsGridControl) Then
|
||||
Dim gc As tsGridControl = TryCast(ObjetoActual, tsGridControl)
|
||||
gc.View.CommitEditing()
|
||||
|
||||
@@ -525,7 +526,7 @@ Public MustInherit Class tsUserControl
|
||||
'End If
|
||||
|
||||
'Else
|
||||
' If (e.Key = Key.A OrElse e.Key = Key.R) And Keyboard.Modifiers = ModifierKeys.Control Then
|
||||
' If (e.Key = Key.A OrElse e.Key = Key.R) andalso Keyboard.Modifiers = ModifierKeys.Control Then
|
||||
|
||||
' Dim scaler = TryCast(dm.LayoutTransform, ScaleTransform)
|
||||
|
||||
@@ -549,7 +550,7 @@ Public MustInherit Class tsUserControl
|
||||
' End If
|
||||
End If
|
||||
End If
|
||||
If (Keyboard.Modifiers And ModifierKeys.Control) AndAlso e.Key = Key.B Then
|
||||
If (Keyboard.Modifiers AndAlso ModifierKeys.Control) AndAlso e.Key = Key.B Then
|
||||
If Me.GridSeleccion IsNot Nothing OrElse Me.GridBusqueda IsNot Nothing Then
|
||||
If GridBusqueda IsNot Nothing Then
|
||||
Dim tv = TryCast(Me.GridBusqueda.View, TableView)
|
||||
@@ -838,7 +839,7 @@ Public MustInherit Class tsUserControl
|
||||
ObjetosSeleccionables.Add(os)
|
||||
|
||||
Dim be As BindingExpression = bte.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
||||
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||
Dim Longitud As Integer
|
||||
If bte.DataContext Is Nothing Then
|
||||
@@ -866,7 +867,7 @@ Public MustInherit Class tsUserControl
|
||||
ObjetosSeleccionables.Add(os)
|
||||
|
||||
Dim be As BindingExpression = pbe.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
||||
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||
Dim Longitud As Integer
|
||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||
If pbe.DataContext Is Nothing Then
|
||||
@@ -896,7 +897,7 @@ Public MustInherit Class tsUserControl
|
||||
ObjetosSeleccionables.Add(os)
|
||||
|
||||
Dim be As BindingExpression = te.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
||||
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||
Dim Longitud As Integer
|
||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||
If te.DataContext Is Nothing Then
|
||||
@@ -936,7 +937,7 @@ Public MustInherit Class tsUserControl
|
||||
Dim os As New ObjetoSeleccionable(cbe, cbe.TabIndex, o.PropiedadesTS)
|
||||
ObjetosSeleccionables.Add(os)
|
||||
Dim be As BindingExpression = cbe.GetBindingExpression(BaseEdit.EditValueProperty)
|
||||
If Not be Is Nothing And Contexto IsNot Nothing Then
|
||||
If Not be Is Nothing AndAlso Contexto IsNot Nothing Then
|
||||
o.propiedadests.NombreCampo = be.ParentBinding.Path.Path
|
||||
Dim Longitud As Integer
|
||||
If cbe.DataContext Is Nothing Then
|
||||
@@ -1200,8 +1201,8 @@ Public MustInherit Class tsUserControl
|
||||
If e.Key = Key.Enter Then
|
||||
Try
|
||||
Dim tsgc As tsGridControl = DirectCast(sender, tsGridControl)
|
||||
If tsgc.Columns.Any(Function(x) x.CellTemplate IsNot Nothing) And tsgc.View.AllowEditing = False Then
|
||||
If tsgc.CurrentItem IsNot Nothing And tsgc.CurrentColumn.CellTemplate IsNot Nothing Then
|
||||
If tsgc.Columns.Any(Function(x) x.CellTemplate IsNot Nothing) AndAlso tsgc.View.AllowEditing = False Then
|
||||
If tsgc.CurrentItem IsNot Nothing AndAlso tsgc.CurrentColumn.CellTemplate IsNot Nothing Then
|
||||
RaiseEvent Enlazar(Nothing, True)
|
||||
e.Handled = True
|
||||
End If
|
||||
@@ -1285,7 +1286,7 @@ Public MustInherit Class tsUserControl
|
||||
Throw New Exception("No se permite valores duplicados en la columna " & tsgc.Columns(sCampo).Header)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Else
|
||||
Exit Do
|
||||
End If
|
||||
End If
|
||||
@@ -1332,7 +1333,7 @@ Public MustInherit Class tsUserControl
|
||||
Next
|
||||
For Each rw In tsgc.GetSelectedRowHandles
|
||||
Try
|
||||
If vista.GetType = GetType(TableView) Then
|
||||
If vista.GetType.BaseType = GetType(TableView) OrElse vista.GetType Is GetType(tsTableView) Then
|
||||
DirectCast(vista, TableView).DeleteRow(rw)
|
||||
Else
|
||||
DirectCast(vista, CardView).DeleteRow(rw)
|
||||
@@ -1352,7 +1353,7 @@ Public MustInherit Class tsUserControl
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.Message)
|
||||
End Try
|
||||
If vista.GetType = GetType(TableView) Then
|
||||
If vista.GetType = GetType(TableView) OrElse vista.GetType = GetType(tsTableView) Then
|
||||
DirectCast(vista, TableView).DeleteRow(vista.FocusedRowHandle)
|
||||
Else
|
||||
DirectCast(vista, CardView).DeleteRow(vista.FocusedRowHandle)
|
||||
@@ -1378,11 +1379,11 @@ Public MustInherit Class tsUserControl
|
||||
Dim EliminacionManual As Boolean = False
|
||||
RaiseEvent AntesEliminar(sender, e, Cancelar, MensajesError, EliminacionManual)
|
||||
If ErroresValidacion.Errores.Count > 0 Then
|
||||
If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical And Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
||||
If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical AndAlso Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
||||
Cancelar = True
|
||||
End If
|
||||
End If
|
||||
If Not Cancelar And GridSeleccion IsNot Nothing Then
|
||||
If Not Cancelar AndAlso GridSeleccion IsNot Nothing Then
|
||||
If GridSeleccion.ElementosSeleccionados IsNot Nothing AndAlso _ContenedorAplicacion.btSeleccionar.IsChecked AndAlso GridSeleccion.ElementosSeleccionados.Any Then
|
||||
If EliminacionManual OrElse DXMessageBox.Show("¿Está seguro de querer eliminar los registros seleccionados?", "Atención", MessageBoxButton.YesNo) = MessageBoxResult.Yes Then
|
||||
ErroresValidacion.LimpiarErrores("Almacenar-")
|
||||
@@ -1470,7 +1471,7 @@ Public MustInherit Class tsUserControl
|
||||
For Each it In its
|
||||
Select Case it.tag
|
||||
Case "MI_ELIMINA"
|
||||
it.isEnabled = If(Me.Estado = EstadosAplicacion.AplicacionSinIndice, tsgc.PropiedadesTSGC.PermitirEliminar, True) And tsgc.PropiedadesTSGC.PermitirEliminar And ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnExistentes And Me.Estado = EstadosAplicacion.ModificandoRegistro) Or ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnNuevos And Me.Estado = EstadosAplicacion.Nuevo) Or tsgc.PropiedadesTS.Modificable = TiposModificacion.Modificable))
|
||||
it.isEnabled = If(Me.Estado = EstadosAplicacion.AplicacionSinIndice, tsgc.PropiedadesTSGC.PermitirEliminar, True) AndAlso tsgc.PropiedadesTSGC.PermitirEliminar AndAlso ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnExistentes AndAlso Me.Estado = EstadosAplicacion.ModificandoRegistro) Or ((tsgc.PropiedadesTS.Modificable = TiposModificacion.ModificableEnNuevos AndAlso Me.Estado = EstadosAplicacion.Nuevo) Or tsgc.PropiedadesTS.Modificable = TiposModificacion.Modificable))
|
||||
Case "MI_EXPORTAR_EXCEL", "MI_EXPORTAR"
|
||||
If tsgc.PropiedadesTSGC.PermitirExportar.HasValue Then
|
||||
it.isenabled = tsgc.PropiedadesTSGC.PermitirExportar.Value
|
||||
@@ -1521,7 +1522,7 @@ Public MustInherit Class tsUserControl
|
||||
vista.ExportToCsv(sfd.FileName)
|
||||
End Select
|
||||
End If
|
||||
Process.Start(sfd.FileName)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If DelegadoErrorNoControlado IsNot Nothing Then DelegadoErrorNoControlado.Invoke(Me, ex)
|
||||
@@ -1608,7 +1609,7 @@ Public MustInherit Class tsUserControl
|
||||
ValidaControlObjetoActual()
|
||||
|
||||
'If ErroresValidacion.Errores.Count > 0 Then
|
||||
' If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical And Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
||||
' If (From ev In ErroresValidacion.Errores Where ev.Tipo = DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical andalso Not ev.id.ToLower.StartsWith("almacenar-")).Count > 0 Then
|
||||
' Cancelar = True
|
||||
' End If
|
||||
'End If
|
||||
@@ -1660,7 +1661,7 @@ Public MustInherit Class tsUserControl
|
||||
BloqueoActivo = _DelegadoBloqueo.Invoke(Me, tsBloqueo.AccionBloqueEnum.ACTUALIZAVERSION)
|
||||
End If
|
||||
RaiseEvent DespuesGuardar(sender, e, OpcionGuardado)
|
||||
If FuerzaCambioEstado And OpcionGuardado <> 1 Then
|
||||
If FuerzaCambioEstado AndAlso OpcionGuardado <> 1 Then
|
||||
If Not OcultarStoryBoard Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me._ContenedorAplicacion.IniciaAnimacion("Datos Guardadados", Colors.Black)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||
If ModoSuperUsuario Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorAplicacion.IniciaAnimacionBlink("Modo Super Usuario", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||
If Me.Estado = EstadosAplicacion.Nuevo Then
|
||||
@@ -1717,7 +1718,7 @@ Public MustInherit Class tsUserControl
|
||||
RaiseEvent DespuesCancelarGuardar(sender, e, OpcionGuardado)
|
||||
End If
|
||||
End Try
|
||||
If Cancelar And ErroresValidacion.Errores.Count > 0 And Not OcultarStoryBoard Then
|
||||
If Cancelar AndAlso ErroresValidacion.Errores.Count > 0 AndAlso Not OcultarStoryBoard Then
|
||||
Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me._ContenedorAplicacion.IniciaAnimacion("Datos no guardadados. Revise los mensajes.", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||
If ModoSuperUsuario Then If ModoSuperUsuario Then Me._ContenedorAplicacion.Dispatcher.BeginInvoke(New Action(Sub() Me.ContenedorAplicacion.IniciaAnimacionBlink("Modo Super Usuario", Colors.Red)), System.Windows.Threading.DispatcherPriority.Normal)
|
||||
End If
|
||||
@@ -1728,8 +1729,8 @@ Public MustInherit Class tsUserControl
|
||||
Try
|
||||
CompruebaObligatoriosOUnicos = True
|
||||
For Each c In ControlesTS.Where(Function(x) x.PropiedadesTS.Unico OrElse x.PropiedadesTS.Obligatorio).ToList
|
||||
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos And CompruebaObligatorio(c)
|
||||
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos And CompruebaUnico(c)
|
||||
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos AndAlso CompruebaObligatorio(c)
|
||||
CompruebaObligatoriosOUnicos = CompruebaObligatoriosOUnicos AndAlso CompruebaUnico(c)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
@@ -1804,14 +1805,14 @@ Public MustInherit Class tsUserControl
|
||||
' Parametros(0) = valor
|
||||
' Parametros(1) = DataContext.entitykey.entitykeyvalues(0).value
|
||||
' Dim CampoIndice As String = DataContext.entitykey.entitykeyvalues(0).key
|
||||
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = :0 and " & NombreTablaBase & "." & CampoIndice & " <> :1", Parametros).Any
|
||||
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = :0 andalso " & NombreTablaBase & "." & CampoIndice & " <> :1", Parametros).Any
|
||||
' Return Not r
|
||||
' Else
|
||||
' Dim Parametros(1) As Object
|
||||
' Parametros(0) = valor
|
||||
' Parametros(1) = DataContext.entitykey.entitykeyvalues(0).value
|
||||
' Dim CampoIndice As String = DataContext.entitykey.entitykeyvalues(0).key
|
||||
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = {0} and " & NombreTablaBase & "." & CampoIndice & " <> {1}", Parametros).Any
|
||||
' Dim r = oc.ExecuteStoreQuery(Of Object)("select " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " from " & NombreTablaBase & " where " & NombreTablaBase & "." & c.PropiedadesTS.NombreCampo & " = {0} andalso " & NombreTablaBase & "." & CampoIndice & " <> {1}", Parametros).Any
|
||||
' Return Not r
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Reference in New Issue
Block a user