Agregar archivos de proyecto.
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
Public Class dxwArticulos
|
||||
Private _idProducto As Integer
|
||||
Private _LArticulos As List(Of articulos)
|
||||
Friend idArticulo As Integer
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gcArticulos.CurrentItem IsNot Nothing Then
|
||||
Dim art = DirectCast(gcArticulos.CurrentItem, articulos)
|
||||
idArticulo = art.idarticulo
|
||||
Me.DialogResult = True
|
||||
Me.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Me.DialogResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub dxwproductos_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Try
|
||||
|
||||
Me.gcArticulos.ItemsSource = _LArticulos.Where(Function(x) x.idProducto = _idProducto).OrderBy(Function(x) x.CodigoArticulo).ToList
|
||||
Me.gcArticulos.View.SearchControl.Focus()
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Public Sub New(bd As m3academiaEntities, Existentes As List(Of Integer?))
|
||||
Public Sub New(lArticulos As List(Of articulos), idProducto As Integer)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
_LArticulos = lArticulos
|
||||
_idProducto = idProducto
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub dxw_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown
|
||||
If e.Key = Key.Enter Then
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tv_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs) Handles tvArticulos.MouseDoubleClick
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user