Agregar archivos de proyecto.
This commit is contained in:
131
GestionGrupoSanchoToro/.editorconfig
Normal file
131
GestionGrupoSanchoToro/.editorconfig
Normal file
@@ -0,0 +1,131 @@
|
||||
[*.cs]
|
||||
|
||||
# CS8981: El nombre de tipo solo contiene caracteres ASCII en minúsculas. Estos nombres pueden reservarse para el idioma.
|
||||
dotnet_diagnostic.CS8981.severity = none
|
||||
|
||||
[*.cs]
|
||||
#### Estilos de nomenclatura ####
|
||||
|
||||
# Reglas de nomenclatura
|
||||
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||
|
||||
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Especificaciones de símbolos
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
|
||||
# Estilos de nomenclatura
|
||||
|
||||
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||
dotnet_naming_style.begins_with_i.required_suffix =
|
||||
dotnet_naming_style.begins_with_i.word_separator =
|
||||
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
csharp_style_expression_bodied_methods = false:silent
|
||||
csharp_style_expression_bodied_constructors = false:silent
|
||||
csharp_style_expression_bodied_operators = false:silent
|
||||
csharp_style_expression_bodied_properties = true:silent
|
||||
csharp_style_expression_bodied_indexers = true:silent
|
||||
csharp_style_expression_bodied_accessors = true:silent
|
||||
csharp_style_expression_bodied_lambdas = true:silent
|
||||
csharp_style_expression_bodied_local_functions = false:silent
|
||||
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
|
||||
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
|
||||
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
|
||||
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
|
||||
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
|
||||
csharp_prefer_simple_using_statement = true:suggestion
|
||||
csharp_prefer_braces = true:silent
|
||||
csharp_style_namespace_declarations = block_scoped:silent
|
||||
csharp_style_prefer_method_group_conversion = true:silent
|
||||
csharp_style_prefer_top_level_statements = true:silent
|
||||
csharp_style_prefer_primary_constructors = true:suggestion
|
||||
csharp_style_prefer_switch_expression = true:suggestion
|
||||
csharp_style_prefer_pattern_matching = true:silent
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
|
||||
csharp_style_prefer_not_pattern = true:suggestion
|
||||
csharp_style_prefer_extended_property_pattern = true:suggestion
|
||||
|
||||
[*.vb]
|
||||
#### Estilos de nomenclatura ####
|
||||
|
||||
# Reglas de nomenclatura
|
||||
|
||||
dotnet_naming_rule.interface_should_be_empieza_por_i.severity = suggestion
|
||||
dotnet_naming_rule.interface_should_be_empieza_por_i.symbols = interface
|
||||
dotnet_naming_rule.interface_should_be_empieza_por_i.style = empieza_por_i
|
||||
|
||||
dotnet_naming_rule.tipos_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.tipos_should_be_pascal_case.symbols = tipos
|
||||
dotnet_naming_rule.tipos_should_be_pascal_case.style = pascal_case
|
||||
|
||||
dotnet_naming_rule.miembros_que_no_son_un_campo_should_be_pascal_case.severity = suggestion
|
||||
dotnet_naming_rule.miembros_que_no_son_un_campo_should_be_pascal_case.symbols = miembros_que_no_son_un_campo
|
||||
dotnet_naming_rule.miembros_que_no_son_un_campo_should_be_pascal_case.style = pascal_case
|
||||
|
||||
# Especificaciones de símbolos
|
||||
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.tipos.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.tipos.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
|
||||
dotnet_naming_symbols.tipos.required_modifiers =
|
||||
|
||||
dotnet_naming_symbols.miembros_que_no_son_un_campo.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.miembros_que_no_son_un_campo.applicable_accessibilities = public, friend, private, protected, protected_friend, private_protected
|
||||
dotnet_naming_symbols.miembros_que_no_son_un_campo.required_modifiers =
|
||||
|
||||
# Estilos de nomenclatura
|
||||
|
||||
dotnet_naming_style.empieza_por_i.required_prefix = I
|
||||
dotnet_naming_style.empieza_por_i.required_suffix =
|
||||
dotnet_naming_style.empieza_por_i.word_separator =
|
||||
dotnet_naming_style.empieza_por_i.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
dotnet_naming_style.pascal_case.required_prefix =
|
||||
dotnet_naming_style.pascal_case.required_suffix =
|
||||
dotnet_naming_style.pascal_case.word_separator =
|
||||
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||
|
||||
[*.{cs,vb}]
|
||||
end_of_line = crlf
|
||||
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
|
||||
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
|
||||
dotnet_style_readonly_field = true:suggestion
|
||||
9
GestionGrupoSanchoToro/Application.xaml
Normal file
9
GestionGrupoSanchoToro/Application.xaml
Normal file
@@ -0,0 +1,9 @@
|
||||
<Application x:Class="Application"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:GrupoSanchoToro" xmlns:Local="clr-namespace:GrupoSanchoToro.Convertidores"
|
||||
StartupUri="dxwInicio.xaml">
|
||||
<Application.Resources>
|
||||
<Local:DoubleToDecimalConverter x:Key="DoubleToDecimalConverter"/>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
25
GestionGrupoSanchoToro/Application.xaml.vb
Normal file
25
GestionGrupoSanchoToro/Application.xaml.vb
Normal file
@@ -0,0 +1,25 @@
|
||||
Imports System.Configuration
|
||||
Imports System.Globalization
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Threading
|
||||
Imports DevExpress.Xpf.Core
|
||||
|
||||
Namespace GrupoSanchoToro
|
||||
''' <summary>
|
||||
''' Interaction logic for App.xaml
|
||||
''' </summary>
|
||||
Partial Public Class App
|
||||
Inherits Application
|
||||
Private Sub OnAppStartup_UpdateThemeName(sender As Object, e As StartupEventArgs)
|
||||
DevExpress.Xpf.Core.ApplicationThemeHelper.UpdateApplicationThemeName()
|
||||
End Sub
|
||||
|
||||
Private Sub App_DispatcherUnhandledException(sender As Object, e As DispatcherUnhandledExceptionEventArgs) Handles Me.DispatcherUnhandledException
|
||||
MsgBox(e.Exception.Message)
|
||||
End Sub
|
||||
|
||||
Private Sub App_Startup(sender As Object, e As StartupEventArgs) Handles Me.Startup
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("es-ES")
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
11
GestionGrupoSanchoToro/AssemblyInfo.vb
Normal file
11
GestionGrupoSanchoToro/AssemblyInfo.vb
Normal file
@@ -0,0 +1,11 @@
|
||||
Imports System.Windows
|
||||
|
||||
'The ThemeInfo attribute describes where any theme specific AndAlso generic resource dictionaries can be found.
|
||||
'1st parameter: where theme specific resource dictionaries are located
|
||||
'(used if a resource is not found in the page,
|
||||
' OrElse application resource dictionaries)
|
||||
|
||||
'2nd parameter: where the generic resource dictionary is located
|
||||
'(used if a resource is not found in the page,
|
||||
'app, AndAlso any theme specific resource dictionaries)
|
||||
<Assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)>
|
||||
460
GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml
Normal file
460
GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml
Normal file
@@ -0,0 +1,460 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucFacturaRecibida"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1400">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos De la Factura" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="840">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<tsWPF:tsLayoutItem Label="Nº Registro:" Width="180">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding idFactura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="100" NullText="« AUTOMÁTICO »">
|
||||
<dxe:TextEdit.NullValue>
|
||||
<sys:Int32>0</sys:Int32>
|
||||
</dxe:TextEdit.NullValue>
|
||||
</dxe:TextEdit>
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Registro:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaRegistro, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="101" DisplayFormatString="yyyy/MM/dd HH:mm" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Razón Social:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbRazonSocial" AutoComplete="True" ValidateOnTextInput="False" IsTextEditable="True" DisplayMember="RazonSocialNIF" ValueMember="idEntidad" EditValue="{Binding idProveedor_Nulable, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" AllowDefaultButton="False" TabIndex="1">
|
||||
<dxe:ComboBoxEdit.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarProveedor" GlyphKind="Search" IsDefaultButton="False" Click="BiBuscarProveedor_Click" />
|
||||
</dxe:ComboBoxEdit.Buttons>
|
||||
</dxe:ComboBoxEdit>
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<tsWPF:tsLayoutItem Label="Categoría:" >
|
||||
<dxe:ComboBoxEdit x:Name="cbCategoria" EditValue="{Binding idCategoria, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" ValueMember="idEnumeracion" DisplayMember="Descripcion" AutoComplete="True" IncrementalFiltering="True" ImmediatePopup="True" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Pago:" Width="250">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaPago, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Observaciones:">
|
||||
<dxe:TextEdit EditValue="{Binding Observaciones, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="420">
|
||||
<dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Nº Factura:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding NumeroFactura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" Mask="G" MaskUseAsDisplayFormat="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Fecha Factura:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaFactura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true, Converter={StaticResource DateOnlyToDateTimeConverter}}" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Usuario:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding idUsuarioNavigation.Nombre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="200" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Datos del Proveedor" View="GroupBox" Width="Auto" HorizontalAlignment="Stretch" x:Name="lgDatosProveedor" IsCollapsible="True" IsCollapsed="False">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="465">
|
||||
<tsWPF:tsLayoutItem Label="Direccion:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Direccion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teDireccionProveedor" TabIndex="7" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 1:" Width="230">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Telefono1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teTelefono1Proveedor" TabIndex="11" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Telefono2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teTelefono2Proveedor" TabIndex="12" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="800">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Código Postal:" Width="190">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding CodigoPostal, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="8" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Población:" x:Name="Poblacion" Width="318">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Poblacion, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="9" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Provincia:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Provincia, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="10" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Email:" Width="512" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Email, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teEmailProveedor" TabIndex="13" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dx:DXTabControl x:Name="DXTabPersonal1" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Detalle Factura">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcDetalle" TabIndex="25" >
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC CamposObligatorios="idProducto,Cantidad,Precio,idTipoIva" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvDetalle" ShowGroupPanel="False" NewItemRowPosition="Bottom" TabIndex="14" EnableImmediatePosting="True" >
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
|
||||
<dxg:GridColumn FieldName="idProducto" Header="Producto" Width="400">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings x:Name="cbProducto" ValueMember="idProducto" DisplayMember="Descripcion" AllowDefaultButton="False" AutoComplete="True">
|
||||
<dxe:ComboBoxEditSettings.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarProducto" GlyphKind="Search" IsDefaultButton="False" Click="BiBuscarProducto_Click" />
|
||||
</dxe:ComboBoxEditSettings.Buttons>
|
||||
</dxe:ComboBoxEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Cantidad" Header="Cantidad" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Precio" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c4" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Importe" IsSmart="True" Width="80" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c4" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="idTipoIva" Header="% IVA" IsSmart="True" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings x:Name="cbIva" ValueMember="idEnumeracion" DisplayMember="Descripcion" AllowDefaultButton="False" AutoComplete="True" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Header="Observaciones" IsSmart="True" Width="380" />
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Pagos">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Header="Recibos" View="GroupBox">
|
||||
<tsWPF:tsGridControl TabIndex="29" x:Name="gcRecibos" NombreTablaBase="movimientoscaja">
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowTotalSummary="False" ShowGroupPanel="False" x:Name="tvRecibos" NewItemRowPosition="Bottom" AutoWidth="False" AllowGrouping="False" TabIndex="15" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC CamposObligatorios="Fecha,FechaCreacion,idCaja" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.Columns>
|
||||
<dxg:GridColumn FieldName="ImporteNegativo" Width="150" Header="Importe">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskUseAsDisplayFormat="True" MaskType="Numeric" Mask="c2" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Width="150" Header="Fecha Pago" FieldName="Fecha" SortOrder="Ascending" SortIndex="0" />
|
||||
|
||||
<tsWPF:tsGridColumn Width="250" Header="Caja" FieldName="idCaja">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings ValueMember="idCaja" PopupWidth="600" x:Name="cbCaja" IncrementalFiltering="True" DisplayMember="Descripcion" AutoComplete="True" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" Header="Observaciones" Width="350" />
|
||||
<tsWPF:tsGridColumn Width="120" IsSmart="True" Header="Fecha Creación" FieldName="FechaCreacion" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn Width="90" Header="Nº Pago" HorizontalHeaderContentAlignment="Center" FieldName="idMovimiento" SoloLectura="True" />
|
||||
</tsWPF:tsGridControl.Columns>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Documentos" Height="22" VerticalAlignment="Top">
|
||||
<tsWPF:tsGridControl x:Name="gcDocumentos" NombreTablaBase="documentosfacturasrecibidas" TabIndex="24">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvDocumentos" ShowTotalSummary="False" AllowGrouping="False" ShowGroupPanel="False" AutoWidth="False" NewItemRowPosition="Bottom" PreviewKeyDown="tvDocumentos_PreviewKeyDown" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="Descripción" Width="500">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridColumn Width="250" Header="Tipo" FieldName="Tipo">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings ValueMember="Valor" PopupWidth="600" x:Name="cbTipoDocumento" IncrementalFiltering="True" DisplayMember="Descripcion" AutoComplete="True" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="idFicheroNavigation.NombreFichero" Header="Fichero" Width="300" x:Name="gcNombreFichero">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ButtonEditSettings x:Name="btFichero" IsTextEditable="False">
|
||||
<dxe:ButtonEditSettings.Buttons>
|
||||
<dxe:ButtonInfo GlyphKind="Search" Click="VerDocumento" />
|
||||
</dxe:ButtonEditSettings.Buttons>
|
||||
</dxe:ButtonEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Fecha" Header="Fecha" Width="140" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Registro de cambios">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="21">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaHora" Header="Fecha Hora Cambio">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Usuario" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
<!--<dx:DXTabItem Header="Registro de cambios" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="21" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable"/>
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View >
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaHora" Header="Fecha Hora Cambio" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="usuarios.Nombre" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>-->
|
||||
</dx:DXTabControl>
|
||||
<dxlc:LayoutGroup View="GroupBox" x:Name="lgTotalesClase" IsCollapsible="True" IsLocked="True" Height="Auto" HorizontalAlignment="Stretch" Header="Totales">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="150">
|
||||
|
||||
|
||||
<tsWPF:tsLayoutItem Label="% I.V.A. 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="16" HorizontalAlignment="Stretch" EditValue="{Binding PorcentajeIVA1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
|
||||
<tsWPF:tsLayoutItem Label="% I.V.A. 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="19" HorizontalAlignment="Stretch" EditValue="{Binding PorcentajeIVA2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="% I.V.A. 3:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="22" HorizontalAlignment="Stretch" EditValue="{Binding PorcentajeIVA3, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="230">
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible 1:" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="17" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponible1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teBI1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="20" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponible2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teBI2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible 3:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="23" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponible3, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teBI3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible Exenta:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="23" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponibleExenta, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="180">
|
||||
<tsWPF:tsLayoutItem Label="Importe IVA 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="18" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding CuotaIVA1, Mode=TwoWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teCuotaIVA1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Importe IVA 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="21" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding CuotaIVA2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teCuotaIVA2"/>
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Importe IVA 3:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="24" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValueType="{x:Type sys:Double}" EditValue="{Binding CuotaIVA3, Mode=TwoWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teCuotaIVA3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="Total Base Imponible:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="25" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding TotalBaseImponible, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Total IVA:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="27" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding TotalIVA, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="200" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="% I.R.P.F:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="26" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding PorcentajeIRPF, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Cuota I.R.P.F.:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="28" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding IRPF, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="270" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="Total Factura:" FontWeight="Bold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="29" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding TotalFactura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Importe Pagado:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="30" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding ImportePagado, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Pendiente Pago:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="31" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding ImportePendiente, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
683
GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml.vb
Normal file
683
GestionGrupoSanchoToro/Compras/ucFacturaRecibida.xaml.vb
Normal file
@@ -0,0 +1,683 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.LayoutControl
|
||||
Imports tsWPFCore
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Editors.Validation
|
||||
Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports tsUtilidades.Datos
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.Collections
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
Imports tsUtilidades.Enumeraciones
|
||||
Imports tsUtilidades
|
||||
Imports bdGrupoSanchoToro.db.productos
|
||||
Imports System.IO
|
||||
Imports Microsoft.Win32
|
||||
Imports tsUtilidades.Extensiones
|
||||
|
||||
'TODO: Comprobar cuando se puede modificar una factura (o eliminar)
|
||||
Public Class ucFacturaRecibida
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idFactura As Nullable(Of Integer)
|
||||
Private lProductos As List(Of productos)
|
||||
Private ivas As List(Of enumeraciones)
|
||||
Friend idLog As Integer?
|
||||
Dim ra As facturasrecibidas
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucFacturasRecibidas)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Try
|
||||
lProductos = bd.productos.OrderBy(Function(x) x.Descripcion).ToList
|
||||
Dim lProductosFra = ra.detallesfacturasrecibidas.Select(Function(x) x.idProducto).ToArray
|
||||
lProductos = lProductos.Where(Function(x) x.FechaBaja Is Nothing OrElse lProductosFra.Contains(x.idProducto)).ToList
|
||||
cbProducto.ItemsSource = lProductos
|
||||
|
||||
|
||||
'For Each d In ra.detallesfacturasrecibidas
|
||||
' If Not ivas.Contains(d.PorcentajeIVA) Then ivas.Add(d.PorcentajeIVA)
|
||||
'Next
|
||||
|
||||
cbIva.ItemsSource = ivas
|
||||
cbTipoDocumento.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.documentosfacturasrecibidas.TipoDocumentoFacturaEnum)).OrderBy(Function(x) x.Descripcion)
|
||||
cbCategoria.ItemsSource = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "CATFR").OrderBy(Function(x) x.Descripcion).ToList
|
||||
Dim plantillas As List(Of tsWPFCore.Plantilla) = Comun.ObtienePlantillas(bd, {"GRUPLA.FACREC"}, False)
|
||||
Me.ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource = plantillas
|
||||
If plantillas.Count > 0 Then
|
||||
Me.ContenedorAplicacion.bePlantilla.EditValue = plantillas.First.idPlantilla
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
|
||||
ivas = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "PIVA").OrderBy(Function(x) x.ValorNumerico2).ToList
|
||||
|
||||
If idLog.HasValue Then
|
||||
Try
|
||||
Dim log = bd.logs.First(Function(x) x.idLog = idLog)
|
||||
ra = tsUtilidades.Utilidades.DeserializarSinErrores(log.Log, GetType(facturasrecibidas))
|
||||
If ra.idUsuario.HasValue Then ra.idUsuarioNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuario.Value)
|
||||
Dim df = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "DETALLESFACTURASRECIBIDAS")
|
||||
If df IsNot Nothing Then
|
||||
Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(df.Log, GetType(List(Of detallesfacturasrecibidas)))
|
||||
For Each d In ld
|
||||
ra.detallesfacturasrecibidas.Add(d)
|
||||
Next
|
||||
End If
|
||||
Dim mv = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "MOVIMIENTOSCAJA_FR")
|
||||
If mv IsNot Nothing Then
|
||||
Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(mv.Log, GetType(List(Of movimientoscaja)))
|
||||
For Each d In ld
|
||||
ra.movimientoscaja.Add(d)
|
||||
Next
|
||||
End If
|
||||
Dim lent = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ENTIDADES")
|
||||
If lent IsNot Nothing Then
|
||||
Dim ent = tsUtilidades.Utilidades.DeserializarSinErrores(lent.Log, GetType(entidades))
|
||||
ra.idProveedorNavigation = ent
|
||||
lgDatosProveedor.DataContext = ra.idProveedorNavigation
|
||||
End If
|
||||
Dim lfic = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "FICHEROS")
|
||||
If lfic IsNot Nothing Then
|
||||
Dim fic = tsUtilidades.Utilidades.DeserializarSinErrores(lfic.Log, GetType(db.ficheros))
|
||||
ra.idFicheroNavigation = fic
|
||||
End If
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
Catch EX As Exception
|
||||
Throw New Exception("No ha sido posible mostrar el registro del cambio (id " & idLog.Value.ToString & ").", EX)
|
||||
End Try
|
||||
Else
|
||||
If FuerzaNuevo OrElse _idFactura Is Nothing Then
|
||||
ra = New facturasrecibidas
|
||||
ra.FechaFactura = DateOnly.FromDateTime(Today)
|
||||
_idFactura = Nothing
|
||||
ra.FechaRegistro = DateOnly.FromDateTime(Today)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
lgDatosProveedor.DataContext = ra.idProveedorNavigation
|
||||
Else
|
||||
ra = bd.facturasrecibidas.First(Function(x) x.idFactura = _idFactura)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
lgDatosProveedor.DataContext = ra.idProveedorNavigation
|
||||
End If
|
||||
End If
|
||||
cbIVA.ItemsSource = ivas
|
||||
Dim lCajas = bd.cajas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa).ToList.Where(Function(x) (x.FechaBaja.HasValue = False OrElse ra.movimientoscaja.Any(Function(y) y.idCaja = x.idCaja))).OrderBy(Function(x) x.Descripcion).ToList
|
||||
Me.cbCaja.ItemsSource = lCajas
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cbRazonSocial.ItemsSource = bd.entidades.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso ((x.EsProveedor AndAlso x.FechaBaja.HasValue = False) OrElse x.idEntidad = ra.idProveedor)).ToList
|
||||
gcDetalle.ItemsSource = ra.detallesfacturasrecibidas
|
||||
gcRecibos.ItemsSource = ra.movimientoscaja
|
||||
gcDocumentos.ItemsSource = ra.documentosfacturasrecibidas
|
||||
Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "FACTURASRECIBIDAS").ToList
|
||||
|
||||
'Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
'Acciones.Add(New Accion With {
|
||||
' .idAccion = 1,
|
||||
' .Descripcion = "AGREGAR PRODUCTOS PENDIENTES DE FACTURAR"})
|
||||
'Acciones.Add(New Accion With {
|
||||
' .idAccion = 2,
|
||||
' .Descripcion = "SALDAR FACTURA POR CAJA CONTADO"})
|
||||
'Acciones.Add(New Accion With {
|
||||
' .idAccion = 3,
|
||||
' .Descripcion = "SALDAR FACTURA POR TPV"})
|
||||
'Acciones.Add(New Accion With {
|
||||
' .idAccion = 4,
|
||||
' .Descripcion = "SALDAR FACTURA POR BANCO"})
|
||||
'Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
'Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
Me.DataContext = ra
|
||||
Return NuevoEstado
|
||||
End Function
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "facturasrecibidas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public Overrides ReadOnly Property CampoIndice As String
|
||||
' Get
|
||||
' Return "idFactura"
|
||||
' End Get
|
||||
'End Property
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If idLog.HasValue Then
|
||||
Return "Gastos / Factura Proveedor R.C.:" & idLog.ToString
|
||||
Else
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "Gastos / Factura Proveedor.Nuevo"
|
||||
Else
|
||||
Return "Gastos / Factura Proveedor." & DirectCast(Me.DataContext, facturasrecibidas).idFactura.ToString
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Gastos / Factura Proveedor"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idFactura As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idFactura = idFactura
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
If idLog.HasValue Then
|
||||
Dim fr As facturasrecibidas = Me.DataContext
|
||||
Me.docpanel.Caption = "R.C. Gastos / Factura de Proveedor " & fr.NumeroFactura
|
||||
Me.docpanel.Tag = "R.C. Gastos / Factura Recibida." & fr.NumeroFactura
|
||||
Else
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim fr As facturasrecibidas = Me.DataContext
|
||||
Me.docpanel.Caption = " Gastos / Factura de Proveedor " & fr.NumeroFactura
|
||||
Me.docpanel.Tag = " Gastos / Factura Recibida." & fr.NumeroFactura
|
||||
Else
|
||||
Me.docpanel.Caption = " Gastos / Factura de Proveedor Nueva"
|
||||
Me.docpanel.Tag = " Gastos / FacturaRecibida.Nuevo"
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim pers = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
' pers.Eliminar = False
|
||||
Return pers
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ap_ValidarControl(sender As Object, e As ValidationEventArgs, ByRef ev As ErrorValidacion, ByRef ValorOriginalCambiado As Object) Handles Me.ValidarControl
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
Try
|
||||
If Not pts Is Nothing Then
|
||||
Me.ErroresValidacion.EliminaError("validando-" & pts.NombreCampo)
|
||||
Dim ra As facturasrecibidas = Me.DataContext
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "idproveedor_nulable"
|
||||
Dim id As Integer = e.Value
|
||||
Dim ent = bd.entidades.First(Function(x) x.idEntidad = id)
|
||||
lgDatosProveedor.DataContext = ent
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Dim sCodigoError As String = "validando-"
|
||||
If pts IsNot Nothing Then
|
||||
sCodigoError &= pts.NombreCampo
|
||||
End If
|
||||
ev = New ErrorValidacion(sCodigoError, sender, ex.Message, ex, DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical)
|
||||
e.IsValid = False
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ap_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
_idFactura = ra.idFactura
|
||||
RefrescaUC()
|
||||
' Me.gcRecibos.ItemsSource = ra.movimientoscaja
|
||||
' Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "FACTURASRECIBIDAS").ToList
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim ra As facturasrecibidas = Me.DataContext
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "idlog"
|
||||
Dim log As logs = gcLogs.CurrentItem
|
||||
Dim id As Integer = log.idLog
|
||||
Dim uc As New ucFacturaRecibida
|
||||
uc.idLog = log.idLog
|
||||
FuncionesDinamicas.AbrirAP(uc, OtrosParametros)
|
||||
End Select
|
||||
'Select Case Celda.Column.FieldName.ToLower
|
||||
' Case "numeroalbaranentrega"
|
||||
' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturasrecibidas)
|
||||
' Dim id As Integer = ra.detallesalbaranes.idAlbaranEntrega
|
||||
' FuncionesDinamicas.AbrirAP(New ucAlbaranEntrega(id), OtrosParametros)
|
||||
' Case "numeroalbaranrecogida"
|
||||
' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturasrecibidas)
|
||||
' Dim id As Integer = ra.detallesalbaranes.idAlbaranRecogida
|
||||
' FuncionesDinamicas.AbrirAP(New ucAlbaranRecogida(id), OtrosParametros)
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ap_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado
|
||||
Select Case EstadoNuevo
|
||||
Case EstadosAplicacion.ModificandoRegistro
|
||||
Dim ra As facturasrecibidas = Me.DataContext
|
||||
|
||||
' Dim ra As albaranesrecogida = Me.DataContext
|
||||
' If ra.detallesfacturasrecibidas.ToList.Any(Function(x) x.idAlbaranRecogida.HasValue OrElse (x.idUltimaFactura.HasValue AndAlso (x.facturasrecibidas.Fecha > ra.Fecha.Date))) Then me.EstableceSoloLectura()
|
||||
End Select
|
||||
If idLog.HasValue Then EstableceSoloLectura()
|
||||
EstableceSoloLecturaCI()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub BiBuscarProducto_Click(sender As Object, e As RoutedEventArgs)
|
||||
'Dim dxw As New dxwProductos(lProductos)
|
||||
'If dxw.ShowDialog Then
|
||||
' If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow()
|
||||
' Dim def As detallesfacturasrecibidas = gcDetalle.CurrentItem
|
||||
' Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto)
|
||||
' def.idProducto = prod.idProducto
|
||||
' RellenaDatosProducto(def)
|
||||
' tvDetalle.MoveNextCell()
|
||||
' gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle)
|
||||
'End If
|
||||
If tvDetalle.ActiveEditor Is Nothing Then
|
||||
Dispatcher.BeginInvoke(New Action(Sub() tvDetalle.ShowEditor()), System.Windows.Threading.DispatcherPriority.Render)
|
||||
End If
|
||||
|
||||
Dim dxw As New dxwProductos(lProductos)
|
||||
If dxw.ShowDialog Then
|
||||
If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow()
|
||||
Dim def As detallesfacturasrecibidas = gcDetalle.CurrentItem
|
||||
Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto)
|
||||
def.idProducto = prod.idProducto
|
||||
If tvDetalle.ActiveEditor IsNot Nothing Then tvDetalle.ActiveEditor.EditValue = prod.idProducto
|
||||
tvDetalle.PostEditor()
|
||||
tvDetalle.CloseEditor()
|
||||
gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar
|
||||
|
||||
ra.idUsuario = idUsuario
|
||||
Dim hte As New Hashtable
|
||||
If ra.detallesfacturasrecibidas.Count = 0 Then
|
||||
hte.Add("ALMACENAR-DETALLE_OBLIGATORIO", "Es obligatorio introducir al menos un artículo")
|
||||
End If
|
||||
If bd.facturasrecibidas.Any(Function(x) x.NumeroFactura = ra.NumeroFactura AndAlso x.idProveedor = ra.idProveedor AndAlso x.idFactura <> ra.idFactura) Then
|
||||
hte.Add("ALMACENAR-YA-EXISTE-OTRA-FACTURA", "Ya existe esta factura del mismo cliente registrada")
|
||||
End If
|
||||
If ra.TotalFactura = 0 Then
|
||||
hte.Add("ALMACENAR-IMPORTE_0", "El total de la factura no puede ser 0")
|
||||
End If
|
||||
If Math.Abs(ra.ImportePagado) > Math.Abs(ra.TotalFactura) Then
|
||||
hte.Add("ALMACENAR-IMPORTE_PAGADO_SUPERIOR", "El importe pagado de los recibos no puede superar al total de la factura")
|
||||
End If
|
||||
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
Else
|
||||
For Each mv In ra.movimientoscaja
|
||||
mv.Tipo = TipoMovimientoEnum.RECIBO_PROVEEDOR
|
||||
If mv.idUsuario.HasValue = False Then mv.idUsuario = idUsuario
|
||||
Next
|
||||
For Each d In ra.documentosfacturasrecibidas
|
||||
If d.idUsuario.HasValue = False Then d.idUsuario = idUsuario
|
||||
Next
|
||||
If ra.ImportePendiente = 0 Then
|
||||
ra.FechaPago = DateOnly.FromDateTime(ra.movimientoscaja.OrderByDescending(Function(x) x.Fecha).First.Fecha)
|
||||
Else
|
||||
ra.FechaPago = Nothing
|
||||
End If
|
||||
If ra.PorcentajeIVA2.HasValue = False Then
|
||||
ra.BaseImponible2 = Nothing
|
||||
ra.CuotaIVA2 = Nothing
|
||||
End If
|
||||
If ra.PorcentajeIVA3.HasValue = False Then
|
||||
ra.BaseImponible3 = Nothing
|
||||
ra.CuotaIVA3 = Nothing
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvDetalle_CellValueChanged(sender As Object, e As CellValueChangedEventArgs) Handles tvDetalle.CellValueChanged
|
||||
Try
|
||||
Dim def As detallesfacturasrecibidas = e.Row
|
||||
Select Case e.Column.FieldName.ToLower
|
||||
Case "idproducto"
|
||||
RellenaDatosProducto(def)
|
||||
'Case "cantidad", "precio"
|
||||
' def.RefrescaImporte()
|
||||
Case "idtipoiva"
|
||||
Dim idTIVA = CInt(e.Value)
|
||||
def.PorcentajeIVA = ivas.First(Function(x) x.idEnumeracion = idTIVA).ValorNumerico1
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RellenaDatosProducto(dea As detallesfacturasrecibidas)
|
||||
Dim ae As facturasrecibidas = Me.DataContext
|
||||
Dim pr = lProductos.First(Function(x) x.idProducto = dea.idProducto)
|
||||
dea.Precio = pr.UltimoPrecioCompra
|
||||
If dea.Cantidad = 0 Then dea.Cantidad = 1
|
||||
'dea.RefrescaImporte()
|
||||
End Sub
|
||||
|
||||
Private Sub BiBuscarProveedor_Click(sender As Object, e As RoutedEventArgs)
|
||||
If Me.ContenedorAplicacion.btGuardar.IsEnabled Then
|
||||
Dim dxw As New dxwEntidades(bd, False, True)
|
||||
If dxw.ShowDialog Then
|
||||
Dim ra As facturasrecibidas = Me.DataContext
|
||||
Dim ent = bd.entidades.First(Function(x) x.idEntidad = dxw.Entidad.idEntidad)
|
||||
ra.idProveedorNavigation = ent
|
||||
ra.idProveedor_Nulable = ent.idEntidad
|
||||
lgDatosProveedor.DataContext = ent
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ap_ImprimirPlantilla(sender As Object, e As ItemClickEventArgs, idPlantilla As Integer) Handles Me.ImprimirPlantilla
|
||||
Imprimir(idPlantilla, False, 1)
|
||||
End Sub
|
||||
Private Sub Imprimir(idPlantilla As Integer, ImpresoraDefecto As Boolean, Copias As Integer)
|
||||
|
||||
Dim ds As List(Of facturasrecibidas)
|
||||
Dim pl = bd.plantillas.AsNoTracking.Where(Function(x) x.idPlantilla = idPlantilla).Select(Function(x) New With {.Fichero = x.idFicheroNavigation.Fichero, .Tipo = x.idGrupoNavigation.Codigo}).FirstOrDefault
|
||||
ds = New List(Of facturasrecibidas)
|
||||
ds.Add(ra)
|
||||
Informes.ImprimirPlantilla(bd, pl.Fichero, ds, ImpresoraDefecto, Copias)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Private Sub ap_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Private Sub tvDetalle_RowUpdated(sender As Object, e As DevExpress.Xpf.Grid.RowEventArgs) Handles tvDetalle.RowUpdated
|
||||
Call CalculaTotales()
|
||||
End Sub
|
||||
Sub CalculaTotales()
|
||||
Dim ra As facturasrecibidas = Me.DataContext
|
||||
Dim ivas(2) As Double?
|
||||
For Each df In ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue).ToList
|
||||
For i = 0 To 3
|
||||
If i = 3 Then Throw New Exception("Demasiados tipos de iva en la misma factura.")
|
||||
If ivas(i).HasValue = False OrElse ivas(i).Value = df.PorcentajeIVA Then
|
||||
ivas(i) = df.PorcentajeIVA
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
ra.PorcentajeIVA1 = ivas(0)
|
||||
ra.PorcentajeIVA2 = ivas(1)
|
||||
ra.PorcentajeIVA3 = ivas(2)
|
||||
ra.BaseImponibleExenta = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue = False).Sum(Function(x) x.Importe)
|
||||
ra.BaseImponible1 = Nothing
|
||||
ra.BaseImponible2 = Nothing
|
||||
ra.BaseImponible3 = Nothing
|
||||
If ivas(0).HasValue Then ra.BaseImponible1 = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(0)).Sum(Function(x) x.Importe)
|
||||
If ivas(1).HasValue Then ra.BaseImponible2 = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(1)).Sum(Function(x) x.Importe)
|
||||
If ivas(2).HasValue Then ra.BaseImponible3 = ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(2)).Sum(Function(x) x.Importe)
|
||||
'ra.BaseImponible2 = If(ivas(2).HasValue, ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA = ivas(1)).Sum(Function(x) x.Importe), 0)
|
||||
'ra.BaseImponible3 = If(ivas(2).HasValue, ra.detallesfacturasrecibidas.Where(Function(x) x.PorcentajeIVA = ivas(2)).Sum(Function(x) x.Importe), 0)
|
||||
ra.TotalBaseImponible = Math.Round(ra.detallesfacturasrecibidas.Sum(Function(x) x.Importe), 2)
|
||||
CalculaIRPF(ra)
|
||||
CalculaCuotasIVA(ra)
|
||||
CalculaTotalesFinales(ra)
|
||||
End Sub
|
||||
Public Sub CalculaIRPF(F As facturasrecibidas)
|
||||
F.IRPF = Math.Round(F.TotalBaseImponible * F.PorcentajeIRPF / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End Sub
|
||||
Public Sub CalculaCuotasIVA(F As facturasrecibidas)
|
||||
F.CuotaIVA1 = Nothing
|
||||
F.CuotaIVA2 = Nothing
|
||||
F.CuotaIVA3 = Nothing
|
||||
If F.PorcentajeIVA1.HasValue Then
|
||||
F.CuotaIVA1 = Math.Round(F.BaseImponible1.Value * F.PorcentajeIVA1.Value / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
If F.PorcentajeIVA2.HasValue Then
|
||||
F.CuotaIVA2 = Math.Round(F.BaseImponible2.Value * F.PorcentajeIVA2.Value / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
If F.PorcentajeIVA3.HasValue Then
|
||||
F.CuotaIVA3 = Math.Round(F.BaseImponible3.Value * F.PorcentajeIVA3.Value / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
End Sub
|
||||
Public Sub CalculaTotalesFinales(ra As facturasrecibidas)
|
||||
ra.TotalIVA = If(ra.CuotaIVA1.HasValue, ra.CuotaIVA1.Value, 0) + If(ra.CuotaIVA2.HasValue, ra.CuotaIVA2.Value, 0) + If(ra.CuotaIVA3.HasValue, ra.CuotaIVA3.Value, 0)
|
||||
ra.TotalFactura = Math.Round(ra.TotalBaseImponible + ra.TotalIVA - ra.IRPF, 2, MidpointRounding.AwayFromZero)
|
||||
ra.ImportePagado = Math.Round(ra.movimientoscaja.Sum(Function(x) x.ImporteNegativo), 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
End Sub
|
||||
Private Sub tvDetalle_ValidaFila(sender As Object, e As DevExpress.Xpf.Grid.GridRowValidationEventArgs) Handles tvDetalle.ValidateRow
|
||||
'Dim df As detallesfacturasrecibidas = e.Row
|
||||
'Dim htErrores = New Hashtable
|
||||
'If df.Cantidad = 0 Then
|
||||
' DXMessageBox.Show("La Cantidad no puede ser 0", "Error")
|
||||
' e.SetError("La Cantidad no puede ser 0")
|
||||
' e.IsValid = False
|
||||
'End If
|
||||
Try
|
||||
Dim htErrores = New Hashtable
|
||||
ErroresValidacion.LimpiarErrores("TSGC-" & gcDetalle.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":")
|
||||
Dim df As detallesfacturasrecibidas = e.Row
|
||||
|
||||
If df.Cantidad = 0 Then
|
||||
htErrores.Add("Cantidad0", "La Cantidad no puede ser 0")
|
||||
End If
|
||||
|
||||
If htErrores.Count > 0 Then
|
||||
Me.AgregaErroresTSGC(gcDetalle, htErrores, e)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub gcDetalle_DespuesEliminar(gc As tsGridControl) Handles gcDetalle.DespuesEliminar
|
||||
CalculaTotales()
|
||||
End Sub
|
||||
|
||||
Private Sub tvRecibos_ValidaFila(sender As Object, e As GridRowValidationEventArgs) Handles tvRecibos.ValidateRow
|
||||
'Dim mv As movimientoscaja = e.Row
|
||||
'If mv.Importe = 0 Then
|
||||
' DXMessageBox.Show("El Importe no puede ser 0", "Error")
|
||||
' e.SetError("El Importe no puede ser 0")
|
||||
' e.IsValid = False
|
||||
'End If
|
||||
Try
|
||||
Dim htErrores = New Hashtable
|
||||
ErroresValidacion.LimpiarErrores("TSGC-" & gcRecibos.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":")
|
||||
Dim mv As movimientoscaja = e.Row
|
||||
|
||||
If mv.Importe = 0 Then
|
||||
htErrores.Add("Importe0", "El Importe no puede ser 0")
|
||||
End If
|
||||
If htErrores.Count > 0 Then
|
||||
Me.AgregaErroresTSGC(gcRecibos, htErrores, e)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub gcRecibos_DespuesEliminar(gc As tsGridControl) Handles gcRecibos.DespuesEliminar
|
||||
CalculaTotales()
|
||||
End Sub
|
||||
|
||||
Private Sub tvRecibos_RowUpdated(sender As Object, e As RowEventArgs) Handles tvRecibos.RowUpdated
|
||||
Dim ra As facturasrecibidas = Me.DataContext
|
||||
CalculaTotalesFinales(ra)
|
||||
End Sub
|
||||
|
||||
Private Sub tvRecibos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvRecibos.InitNewRow
|
||||
gcRecibos.SetCellValue(e.RowHandle, "Fecha", Now)
|
||||
gcRecibos.SetCellValue(e.RowHandle, "FechaCreacion", Now)
|
||||
End Sub
|
||||
|
||||
Private Sub ucFacturaRecibida_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
If Not pts Is Nothing Then
|
||||
Dim ra As facturasrecibidas = Me.DataContext
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "porcentajeirpf"
|
||||
CalculaIRPF(ra)
|
||||
CalculaTotalesFinales(ra)
|
||||
Case "cuotaiva1", "cuotaiva2", "cuotaiva3", "irpf"
|
||||
CalculaTotalesFinales(ra)
|
||||
Case "idproveedor_nulable"
|
||||
ra.idProveedorNavigation = bd.entidades.First(Function(x) x.idEntidad = ra.idProveedor)
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvDetalle_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDetalle.InitNewRow
|
||||
gcDetalle.SetCellValue(e.RowHandle, "idTipoIVA", ivas.OrderByDescending(Function(x) x.ValorNumerico1).First.idEnumeracion)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub tvDetalle_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles tvDetalle.PreviewKeyDown
|
||||
If e.Key = Key.F6 Then
|
||||
Select Case gcDetalle.CurrentColumn.FieldName.ToLower
|
||||
Case "idproducto"
|
||||
tvDetalle.ShowEditor()
|
||||
BiBuscarProducto_Click(Nothing, Nothing)
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cbRazonSocial_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles cbRazonSocial.PreviewKeyDown
|
||||
If e.Key = Key.F6 Then
|
||||
BiBuscarProveedor_Click(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub gcRecibos_AntesEliminar(gc As tsGridControl, ByRef Cancelar As Boolean) Handles gcRecibos.AntesEliminar
|
||||
Dim da As movimientoscaja = gc.CurrentItem
|
||||
If da.idMovimientoCierre.HasValue Then
|
||||
DXMessageBox.Show("No se puede eliminar un pago ya que está cerrado")
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvDocumentos_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvDocumentos.ValidateRow
|
||||
Dim ges As documentosfacturasrecibidas = gcDocumentos.CurrentItem
|
||||
If ges.idUsuario.HasValue = False Then
|
||||
ges.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
End If
|
||||
End Sub
|
||||
Private Sub VerDocumento(sender As System.Object, e As System.Windows.RoutedEventArgs)
|
||||
Try
|
||||
Dim exp As documentosfacturasrecibidas = gcDocumentos.CurrentItem
|
||||
If exp IsNot Nothing AndAlso exp.idFicheroNavigation IsNot Nothing AndAlso exp.idFicheroNavigation.NombreFichero IsNot Nothing AndAlso exp.idFicheroNavigation.Fichero IsNot Nothing Then
|
||||
Dim sftmp As String = tsUtilidades.Utilidades.ObtieneDirectorioAleatorio("GrupoSanchoToro") & "\" & exp.idFicheroNavigation.NombreFichero
|
||||
tsUtilidades.Utilidades.ByteArrayAFichero(exp.idFicheroNavigation.Fichero, sftmp, True)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sftmp)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Examinar(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btFichero.DefaultButtonClick
|
||||
Try
|
||||
If gcDocumentos.CurrentItem Is Nothing Then tvDocumentos.AddNewRow()
|
||||
Dim exp As documentosfacturasrecibidas = gcDocumentos.CurrentItem
|
||||
Dim ofd As New OpenFileDialog
|
||||
If ofd.ShowDialog() Then
|
||||
Dim fin As New FileInfo(ofd.FileName)
|
||||
If fin.Length > 1024 * 1024 * 50 Then
|
||||
DXMessageBox.Show("El fichero no puede ser mayor de 50 Mb", "Atención")
|
||||
Else
|
||||
Dim f() As Byte = IO.File.ReadAllBytes(ofd.FileName)
|
||||
Dim idTipoDocumentoExp = bd.enumeraciones.First(Function(x) x.Codigo = "TIPFIC.EXPENT").idEnumeracion
|
||||
If exp.idFicheroNavigation Is Nothing Then
|
||||
Dim fi As New db.ficheros
|
||||
exp.idFicheroNavigation = fi
|
||||
End If
|
||||
exp.idFicheroNavigation.NombreFichero = IO.Path.GetFileName(ofd.FileName)
|
||||
exp.idFicheroNavigation.Fichero = f
|
||||
exp.idFicheroNavigation.Fecha = Now
|
||||
exp.idFicheroNavigation.Descripcion = exp.Descripcion.Acortar(80)
|
||||
exp.idFicheroNavigation.idTipo = idTipoDocumentoExp
|
||||
exp.Fecha = Now
|
||||
Dim usu = bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
exp.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
exp.idUsuarioNavigation = usu
|
||||
tvDocumentos.MoveNextCell()
|
||||
gcDocumentos.RefreshRow(tvDocumentos.FocusedRowHandle)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub tvDocumentos_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key = Key.F6 AndAlso gcDocumentos.CurrentColumn.FieldName.ToLower = "ficheros.nombrefichero" Then
|
||||
Examinar(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvDocumentos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDocumentos.InitNewRow
|
||||
gcDocumentos.SetCellValue(e.RowHandle, "Fecha", Now)
|
||||
End Sub
|
||||
|
||||
Private Sub teBI1_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teBI1.EditValueChanged
|
||||
EstableceSoloLectura(teCuotaIVA1, ra IsNot Nothing AndAlso ra.BaseImponible1.HasValue AndAlso ra.BaseImponible1.Value <> 0)
|
||||
End Sub
|
||||
Private Sub teBI2_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teBI1.EditValueChanged
|
||||
EstableceSoloLectura(teCuotaIVA2, ra IsNot Nothing AndAlso ra.BaseImponible2.HasValue AndAlso ra.BaseImponible2.Value <> 0)
|
||||
End Sub
|
||||
Private Sub teBI3_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teBI1.EditValueChanged
|
||||
EstableceSoloLectura(teCuotaIVA3, ra IsNot Nothing AndAlso ra.BaseImponible3.HasValue AndAlso ra.BaseImponible3.Value <> 0)
|
||||
End Sub
|
||||
Private Sub EstableceSoloLecturaCI()
|
||||
EstableceSoloLectura(teCuotaIVA1, ra IsNot Nothing AndAlso ra.BaseImponible1.HasValue AndAlso ra.BaseImponible1.Value <> 0)
|
||||
EstableceSoloLectura(teCuotaIVA2, ra IsNot Nothing AndAlso ra.BaseImponible2.HasValue AndAlso ra.BaseImponible2.Value <> 0)
|
||||
EstableceSoloLectura(teCuotaIVA3, ra IsNot Nothing AndAlso ra.BaseImponible3.HasValue AndAlso ra.BaseImponible3.Value <> 0)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
196
GestionGrupoSanchoToro/Compras/ucFacturasRecibidas.xaml
Normal file
196
GestionGrupoSanchoToro/Compras/ucFacturasRecibidas.xaml
Normal file
@@ -0,0 +1,196 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" x:Class="ucFacturasRecibidas"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Búsqueda Rápida" Orientation="Vertical" x:Name="BusquedaRapida">
|
||||
<dxlc:LayoutGroup Width="900" HorizontalAlignment="Left" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicio (Factura):" TabIndex="8" >
|
||||
<dxe:DateEdit x:Name="teFechaInicio" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Fin (Factura):" TabIndex="1" >
|
||||
<dxe:DateEdit x:Name="teFechaFin" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Mostar solo las no Enviadas a la Asesoría:" HorizontalAlignment="Left" HorizontalContentAlignment="Left" TabIndex="1" >
|
||||
<dxe:CheckEdit x:Name="cbSoloPendientes" IsChecked="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Búsqueda:" FontWeight="Bold" >
|
||||
<dxe:TextEdit x:Name="teBusqueda" TabIndex="0" FontWeight="Normal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="BtBuscar_Click" IsDefault="True" TabIndex="1" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutItem Label="Campos de búsqueda:">
|
||||
<Border BorderThickness="1" BorderBrush="Black" >
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<TextBlock x:Name="tbCamposBusqueda" Text="Razón Social, NIF, Nº Factura, Obras"/>
|
||||
<TextBlock Margin="20,0,0,0" Text="(En Blanco Muestra Todos)" FontWeight="Bold" ></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</dxlc:LayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="1" >
|
||||
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="idFactura" Width="120" IsSmart="True" Header="Nº Registro" CellTemplate="{DynamicResource VerDetalleTemplate}" Fixed="Left" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaRegistro" Header="Fecha Registro" IsSmart="True" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d"/>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="NumeroFactura" Width="150" IsSmart="True" Header="Nº Factura Proveedor" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaFactura" Header="Fecha Factura" IsSmart="True" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d"/>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="idProveedorNavigation.RazonSocial" Header="Razón Social" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="idProveedorNavigation.NIF" Header="N.I.F." Width="100" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="BaseImponible1" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="PorcentajeIVA1" Header="% IVA 1" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="n0" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="CuotaIVA1" Header="IVA 1" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="BaseImponible2" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="PorcentajeIVA2" Header="% IVA 2" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="n0" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="CuotaIVA2" Header="IVA 2" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="BaseImponible3" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="PorcentajeIVA3" Header="% IVA 3" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="n0" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="CuotaIVA3" Header="IVA 3" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="PorcentajeIRPF" Header="% IRPF" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="n0" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="IRPF" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="TotalFactura" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="ImportePagado" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaPago" IsSmart="True" Width="100" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d"/>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="ImportePendiente" HorizontalHeaderContentAlignment="Right" Width="120" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="idCategoriaNavigation.Descripcion" Width="150" IsSmart="True" Header="Categoría" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaEnvioAsesoria" Header="Fecha Envío Asesoría" IsSmart="True" Width="150" AllowPrinting="False" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Width="400" IsSmart="True" AllowPrinting="False" />
|
||||
<tsWPF:tsGridColumn FieldName="idUsuarioNavigation.Nombre" Header="Usuario" Width="150" IsSmart="True" AllowPrinting="False" />
|
||||
<tsWPF:tsGridColumn FieldName="NumeroDocumentos" Header="Nº Docs. Adjuntos" HorizontalHeaderContentAlignment="Right" AllowPrinting="False" Width="120" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="N0" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowSearchPanelMode="Always" ShowGroupPanel="True" ShowTotalSummary="True" ShowGroupFooters="True" />
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInColumn="TotalFactura" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="BaseImponible1" SummaryType="Sum" ShowInColumn="BaseImponible1" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="BaseImponible2" SummaryType="Sum" ShowInColumn="BaseImponible2" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="BaseImponible3" SummaryType="Sum" ShowInColumn="BaseImponible3" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="CuotaIVA1" SummaryType="Sum" ShowInColumn="CuotaIVA1" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="CuotaIVA2" SummaryType="Sum" ShowInColumn="CuotaIVA2" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="CuotaIVA3" SummaryType="Sum" ShowInColumn="CuotaIVA3" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInColumn="ImportePagado" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInColumn="ImportePendiente" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="BaseImponible1" SummaryType="Sum" ShowInGroupColumnFooter="BaseImponible1" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="BaseImponible2" SummaryType="Sum" ShowInGroupColumnFooter="BaseImponible2" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="BaseImponible3" SummaryType="Sum" ShowInGroupColumnFooter="BaseImponible3" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="CuotaIVA1" SummaryType="Sum" ShowInGroupColumnFooter="CuotaIVA1" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="CuotaIVA2" SummaryType="Sum" ShowInGroupColumnFooter="CuotaIVA2" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="CuotaIVA3" SummaryType="Sum" ShowInGroupColumnFooter="CuotaIVA3" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
286
GestionGrupoSanchoToro/Compras/ucFacturasRecibidas.xaml.vb
Normal file
286
GestionGrupoSanchoToro/Compras/ucFacturasRecibidas.xaml.vb
Normal file
@@ -0,0 +1,286 @@
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports System.Collections
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Linq.Dynamic
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
Imports Microsoft.Win32
|
||||
Imports System.IO
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports DevExpress.Mvvm.Native
|
||||
|
||||
Public Class ucFacturasRecibidas
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
ContenedorAplicacion.btGuardar.IsVisible = False
|
||||
ContenedorAplicacion.siEstado.IsVisible = False
|
||||
Dim Hoy = Date.Today
|
||||
teFechaFin.EditValue = Hoy
|
||||
teFechaInicio.EditValue = New Date(Hoy.Year, 1, 1)
|
||||
GridSeleccion = gc
|
||||
Me.HabilitarRefresco = True
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
If Background OrElse Refrescar Then ObtienefacturasAsync(bd, Background)
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "GENERA EXCEL DE FACTURAS SELECCIONADAS"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 2,
|
||||
.Descripcion = "ENVIA EXCEL Y FRAS. IMPRESAS SELECCIONADAS A ASESORIA"})
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Facturas de Proveedores/Gastos"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "FacturasRecibidas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "facturasrecibidas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Facturas de Proveedores"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim per = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
per.Eliminar = False
|
||||
Return per
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub Nuevo() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucFacturaRecibida, OtrosParametros)
|
||||
End Sub
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim ra = DirectCast(Me.gc.CurrentItem, facturasrecibidas)
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "idfactura"
|
||||
Dim id As Integer = ra.idFactura
|
||||
FuncionesDinamicas.AbrirAP(New ucFacturaRecibida(id), OtrosParametros)
|
||||
Case "idproveedornavigation.razonsocial"
|
||||
Dim id As Integer = ra.idProveedor
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad(id), OtrosParametros)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar
|
||||
|
||||
End Sub
|
||||
Public Function ObtieneFacturasRecibidas(ByRef DataContext As Object, TextoBusqueda As String, FechaInicio As DateOnly?, FechaFin As DateOnly?, SoloPendientes As Boolean) As List(Of facturasrecibidas)
|
||||
Dim rs As IQueryable(Of facturasrecibidas)
|
||||
Dim lf As New List(Of facturasrecibidas)
|
||||
Dim iNumExc As Integer = 0
|
||||
Do
|
||||
Try
|
||||
rs = bd.facturasrecibidas.Where(Function(x) x.idProveedorNavigation.idEmpresa = EmpresaActual.idEmpresa) _
|
||||
.Include(Function(x) x.idProveedorNavigation) _
|
||||
.Include(Function(x) x.idUsuarioNavigation) _
|
||||
.Include(Function(x) x.documentosfacturasrecibidas) _
|
||||
.AsQueryable
|
||||
If FechaInicio.HasValue Then
|
||||
rs = rs.Where(Function(x) x.FechaFactura >= FechaInicio.Value)
|
||||
End If
|
||||
If FechaFin.HasValue Then
|
||||
rs = rs.Where(Function(x) x.FechaFactura <= FechaFin.Value)
|
||||
End If
|
||||
If SoloPendientes Then
|
||||
rs = rs.Where(Function(x) x.fechaEnvioAsesoria.HasValue = False)
|
||||
End If
|
||||
If TextoBusqueda <> "" Then
|
||||
Dim CamposBusquedaNumericos() As String = {"idFactura"}
|
||||
Dim CamposBusquedaAlfabeticos() As String = {"idProveedorNavigation.RazonSocial", "idProveedorNavigation.NIF", "NumeroFactura"}
|
||||
Dim parametros(0) As Object
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, CamposBusquedaNumericos, CamposBusquedaAlfabeticos, Nothing)
|
||||
rs = rs.Where(ExpresionBusqueda)
|
||||
End If
|
||||
lf = rs.OrderByDescending(Function(x) x.FechaFactura).ToList
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
iNumExc += 1
|
||||
If iNumExc > 3 Then
|
||||
rs = Nothing
|
||||
Exit Do
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
Return lf
|
||||
End Function
|
||||
|
||||
Public Async Sub ObtienefacturasAsync(bd As tscGrupoSanchoToro, Background As Boolean)
|
||||
Try
|
||||
Dim rs As New List(Of facturasrecibidas)
|
||||
Dim Busqueda = If(Me.teBusqueda.EditValue Is Nothing, "", Me.teBusqueda.EditValue)
|
||||
Dim fi As DateOnly? : If teFechaInicio.EditValue IsNot Nothing Then fi = DateOnly.FromDateTime(teFechaInicio.EditValue)
|
||||
Dim ff As DateOnly? : If teFechaFin.EditValue IsNot Nothing Then ff = DateOnly.FromDateTime(teFechaFin.EditValue)
|
||||
Dim bPendientes As Boolean = cbSoloPendientes.IsChecked
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
rs = ObtieneFacturasRecibidas(bd, Busqueda, fi, ff, bPendientes)
|
||||
End Sub)
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando Facturas Recibidas ...")
|
||||
rs = ObtieneFacturasRecibidas(bd, Busqueda, fi, ff, bPendientes)
|
||||
End If
|
||||
|
||||
gc.ItemsSource = rs
|
||||
DataContext = rs
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
Me.ContenedorAplicacion.IsEnabled = True
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BtBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtienefacturasAsync(bd, False)
|
||||
End Sub
|
||||
|
||||
Private Sub ucFacturasRecibidas_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
Try
|
||||
' Dim ra As entidades = Me.DataContext
|
||||
Dim tf As List(Of facturasrecibidas) = gc.ItemsSource
|
||||
Dim fras = gc.ElementosSeleccionados.Cast(Of facturasrecibidas).ToList
|
||||
If fras.Count = 0 Then
|
||||
DXMessageBox.Show("Antes debe seleccionar alguna factura recibida", "Atención")
|
||||
Else
|
||||
|
||||
Select Case idAccion
|
||||
Case 1
|
||||
Try
|
||||
Dim sfd As New SaveFileDialog
|
||||
sfd.FileName = IO.Path.GetDirectoryName("Exportacion") & ("FacturasRecibidas.xlsx").Trim
|
||||
sfd.Filter = "Fichero Excel (*.xls, *.xlsx, *.csv)|*.xls;*.xlsx;*.csv"
|
||||
sfd.DefaultExt = ".xlsx"
|
||||
If sfd.ShowDialog Then
|
||||
gc.ItemsSource = fras
|
||||
Select Case IO.Path.GetExtension(sfd.FileName).ToLower
|
||||
Case ".xls"
|
||||
tv.ExportToXls(sfd.FileName)
|
||||
Case ".xlsx"
|
||||
tv.ExportToXlsx(sfd.FileName)
|
||||
Case ".csv"
|
||||
tv.ExportToCsv(sfd.FileName)
|
||||
End Select
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
Finally
|
||||
gc.ItemsSource = tf
|
||||
End Try
|
||||
Case 2
|
||||
Try
|
||||
Dim sCorreo = bd.enumeraciones.First(Function(x) x.Codigo = "CONF.EMAILASESORIA").ValorAlfabeticoLargo
|
||||
Dim dxnc = New dxwEnvioCorreo(sCorreo, "", "", EmpresaActual.RazonSocial & " - Adjunto le remitimos listado de facturas recibidas solicitadas", "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos listado de facturas solicitadas", "FacturasRecibidas.zip")
|
||||
If dxnc.ShowDialog Then
|
||||
Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO" AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
gc.ItemsSource = fras
|
||||
Dim ms As New MemoryStream
|
||||
tv.ExportToXlsx(ms)
|
||||
|
||||
Dim bFacturas = ms.ToArray
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
Dim dArchivos As New Dictionary(Of String, Byte())
|
||||
dArchivos.Add("FacturasRecibidas_" & Today.ToString("yyyy-MM-dd") & ".xlsx", bFacturas)
|
||||
For Each fr In fras
|
||||
DXSplashScreen.SetState("Generando archivos de la factura " & fr.NumeroFactura & ", por favor espere ...")
|
||||
Dim doc = fr.documentosfacturasrecibidas.FirstOrDefault(Function(x) x.Tipo = documentosfacturasrecibidas.TipoDocumentoFacturaEnum.FACTURA_IMPRESA)
|
||||
If doc IsNot Nothing Then
|
||||
dArchivos.Add(fr.NumeroFactura.Replace("/", "-").Replace("\", "-") & ".pdf", doc.idFicheroNavigation.Fichero)
|
||||
Else
|
||||
Throw New Exception("No se ha adjuntado la factura impresa de la factura " & fr.NumeroFactura)
|
||||
End If
|
||||
Next
|
||||
DXSplashScreen.SetState("Comprimiendo Archivos, por favor espere ...")
|
||||
Dim bzip = tsUtilidades.zip.ComprimirArchivos(dArchivos)
|
||||
bdGrupoSanchoToro.db.correos.GeneraRegistroCorreon(bd, dxnc._Asunto, dxnc._Cuerpo, cta, dxnc._Destinatarios, dxnc._CC, dxnc._BCC, bzip, dxnc._Adjunto,, "FACTURASRECIBIDAS")
|
||||
For Each f In fras
|
||||
f.FechaEnvioAsesoria = Now
|
||||
Next
|
||||
bd.GuardarCambios()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If ex.Message.StartsWith("No se ha adjuntado la factura impresa de la factura") = False Then Throw New Exception(ex.Message, ex)
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Atención")
|
||||
Finally
|
||||
gc.ItemsSource = tf
|
||||
End Try
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
'Comun.GeneraRegistroCorreoExcepcion(bd, ex, "ucEntidad_EjecutarAccion")
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show("Error " & ex.Message, "Error")
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Private Sub ap_ImprimirPlantilla(sender As Object, e As ItemClickEventArgs, idPlantilla As Integer) Handles me.ImprimirPlantilla
|
||||
' Dim ds As List(Of facturas)
|
||||
' Dim pl As plantillas = (From p In bd.plantillas Where p.idPlantilla = idPlantilla).First
|
||||
' Dim sTipo As String = pl.enumeraciones.Codigo
|
||||
' Dim al As facturas = Me.DataContext
|
||||
' ds = New List(Of facturas)
|
||||
' ds.Add(al)
|
||||
' Select Case sTipo
|
||||
' Case "GRUPLA.AV-ALBARANES"
|
||||
' Informes.ImprimirPlantilla(bd, idPlantilla, ds, False)
|
||||
' End Select
|
||||
'End Sub
|
||||
End Class
|
||||
144
GestionGrupoSanchoToro/Compras/ucPagoMultipleFacturas.xaml
Normal file
144
GestionGrupoSanchoToro/Compras/ucPagoMultipleFacturas.xaml
Normal file
@@ -0,0 +1,144 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" x:Class="ucPagoMultipleFacturas"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Seleccione Cliente para el Pago Múltiple" x:Name="lgFiltrosBusquedaRapida" Width="Auto" HorizontalAlignment="Stretch" >
|
||||
<tsWPF:tsLayoutItem Label="Razón Social:" Width="500" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbRazonSocial" AutoComplete="True" ValidateOnTextInput="False" IsTextEditable="True" DisplayMember="RazonSocial" ValueMember="idEntidad" AllowDefaultButton="False" TabIndex="0">
|
||||
<dxe:ComboBoxEdit.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarCliente" GlyphKind="Search" IsDefaultButton="False" Click="BiBuscarCliente_Click" />
|
||||
</dxe:ComboBoxEdit.Buttons>
|
||||
</dxe:ComboBoxEdit>
|
||||
</tsWPF:tsLayoutItem>
|
||||
<Button Content="Mostrar Facturas Pendientes de Pago" Height="25" Width="250" x:Name="btMostrar" Click="btMostrar_Click" IsDefault="True" TabIndex="1" Margin="20,0,0,0" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gcFacturas" TabIndex="2" >
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn Header="Seleccionar" FieldName="Marca_TMP" Width="80" IsSmart="True" SoloLectura="False" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="NumeroFactura" Width="120" IsSmart="True" Header="Nº Factura" CellTemplate="{DynamicResource VerDetalleTemplate}" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="idClienteNavigation.RazonSocial" Header="Razón Social" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="idClienteNavigation.NIF" Header="N.I.F." Width="100" IsSmart="True" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaFactura" Header="Fecha Factura" IsSmart="True" Width="100" SoloLectura="True" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d"/>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="TotalBaseImponible" HorizontalHeaderContentAlignment="Right" Width="100" SoloLectura="True" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="TotalIVA" HorizontalHeaderContentAlignment="Right" Width="100" SoloLectura="True" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="TotalFactura" HorizontalHeaderContentAlignment="Right" Width="100" SoloLectura="True" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="ImportePagado" HorizontalHeaderContentAlignment="Right" Width="100" SoloLectura="True" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="ImportePendiente" HorizontalHeaderContentAlignment="Right" Width="120" SoloLectura="True" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Width="400" IsSmart="True" SoloLectura="True"/>
|
||||
<tsWPF:tsGridColumn FieldName="usuarios.Usuario" Header="Usuario" Width="150" IsSmart="True" SoloLectura="True"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView x:Name="tv" ShowSearchPanelMode="Always" ShowGroupPanel="True" ShowTotalSummary="True" ShowGroupFooters="True" />
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="BaseImponible" SummaryType="Sum" ShowInColumn="TotalBaseImponible" DisplayFormat=" {0:c2}"/>
|
||||
<!--<dxg:GridSummaryItem FieldName="Descuento" SummaryType="Sum" ShowInColumn="Descuento" DisplayFormat=" {0:c2}"/>-->
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInColumn="IVA" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInColumn="TotalFactura" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInColumn="ImportePagado" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInColumn="ImportePendiente" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInColumn="entidades.RazonSocial" DisplayFormat="Nº Facturas: {0:n0}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="ImporteBruto" SummaryType="Sum" ShowInGroupColumnFooter="ImporteBruto" DisplayFormat=" {0:c2}"/>
|
||||
<!--<dxg:GridSummaryItem FieldName="Descuento" SummaryType="Sum" ShowInGroupColumnFooter="Descuento" DisplayFormat=" {0:c2}"/>-->
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInGroupColumnFooter="entidades.RazonSocial" DisplayFormat=" {0:n0}" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Seleccione Datos del Pago" Width="Auto" HorizontalAlignment="Stretch" >
|
||||
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="850">
|
||||
<dxlc:LayoutGroup >
|
||||
<tsWPF:tsLayoutItem Label="Total Facturas A Pagar:" Width="300" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit x:Name="teTotalAPagar" IsReadOnly="True" Mask="C2" MaskType="Numeric" MaskUseAsDisplayFormat="True" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Caja:" Width="300">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbCaja" AutoComplete="True" DisplayMember="Descripcion" ValueMember="idCaja" TabIndex="4" AllowNullInput="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Pago:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit x:Name="deFechaPago" AllowNullInput="False" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Observaciones:" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit x:Name="teObservaciones" TabIndex="6" MaxLength="200" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<Button Content="Cobrar Facturas Seleccionadas" Height="25" Width="250" x:Name="btPagar" Click="btPagar_Click" IsDefault="True" TabIndex="6" Margin="20,0,0,0" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical"/>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
202
GestionGrupoSanchoToro/Compras/ucPagoMultipleFacturas.xaml.vb
Normal file
202
GestionGrupoSanchoToro/Compras/ucPagoMultipleFacturas.xaml.vb
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
|
||||
|
||||
|
||||
Imports bdGrupoSanchoToro.tscGrupoSanchoToro
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports Microsoft.Win32
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro.db
|
||||
|
||||
|
||||
Public Class ucPagoMultipleFacturas
|
||||
|
||||
|
||||
Private bd As bdGrupoSanchoToro.tscGrupoSanchoToro
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
ContenedorAplicacion.btGuardar.IsVisible = True
|
||||
ContenedorAplicacion.btNuevo.IsVisible = False
|
||||
ContenedorAplicacion.siEstado.IsVisible = False
|
||||
Me.HabilitarRefresco = False
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
cbRazonSocial.ItemsSource = bd.entidades.Where(Function(x) x.EsCliente AndAlso x.idEmpresa = EmpresaActual.idEmpresa).ToList
|
||||
cbCaja.ItemsSource = bd.cajas.OrderBy(Function(x) x.Descripcion AndAlso x.idEmpresa = EmpresaActual.idEmpresa).ToList
|
||||
deFechaPago.EditValue = Now.Date
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Cobro Múltiple de Fras. Clientes"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "PagoMultiple"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "facturas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Cobro Multiple de Facturas A Clientes"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim per = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
per.Eliminar = False
|
||||
per.Nuevos = False
|
||||
per.Modificar = False
|
||||
Return per
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim ra = DirectCast(Me.gcFacturas.CurrentItem, facturas)
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "numerofactura"
|
||||
Dim id As Integer = ra.idFactura
|
||||
FuncionesDinamicas.AbrirAP(New ucFacturaEmitida(id), OtrosParametros)
|
||||
Case "idclientenavigation.razonsocial"
|
||||
Dim id As Integer = ra.idCliente
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad(id), OtrosParametros)
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
Private Sub btMostrar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Try
|
||||
If cbRazonSocial.EditValue Is Nothing Then
|
||||
DXMessageBox.Show("Seleccione primero el cliente", "Atención")
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando facturas ...")
|
||||
Dim idcliente As Integer = cbRazonSocial.EditValue
|
||||
Dim facs = bd.facturas.Include(Function(x) x.movimientoscaja).Include(Function(x) x.idClienteNavigation).Include(Function(x) x.idUsuarioNavigation).Where(Function(x) x.idCliente = idcliente).OrderBy(Function(x) x.FechaFactura).ToList.Where(Function(x) x.ImportePendiente <> 0).ToList
|
||||
Me.gcFacturas.ItemsSource = facs
|
||||
CalculaTotalAPagar()
|
||||
End If
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub BiBuscarCliente_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim dxw As New dxwEntidades(bd, True, False)
|
||||
If dxw.ShowDialog Then
|
||||
cbRazonSocial.EditValue = dxw.Entidad.idEntidad
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CalculaTotalAPagar()
|
||||
Dim lf As List(Of facturas) = Me.gcFacturas.ItemsSource
|
||||
lf = lf.Where(Function(x) x.Marca_TMP).ToList
|
||||
|
||||
Dim TotalFacturas = lf.Sum(Function(x) x.ImportePendiente)
|
||||
|
||||
teTotalAPagar.EditValue = Math.Round(TotalFacturas, 2, MidpointRounding.AwayFromZero)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub tvMovimientos_CellValueChanging(sender As Object, e As CellValueChangedEventArgs) Handles tv.CellValueChanging
|
||||
tv.CommitEditing()
|
||||
CalculaTotalAPagar()
|
||||
End Sub
|
||||
|
||||
Private Sub btPagar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Try
|
||||
If deFechaPago.EditValue Is Nothing Then Throw New Exception("La fecha de pago es obligatoria")
|
||||
Dim FechaPago As Date = deFechaPago.EditValue
|
||||
If cbCaja.EditValue Is Nothing Then Throw New Exception("La caja de pago es obligatoria")
|
||||
Dim lf As List(Of facturas) = Me.gcFacturas.ItemsSource
|
||||
lf = lf.Where(Function(x) x.Marca_TMP).ToList
|
||||
Dim idCaja As Integer = cbCaja.EditValue
|
||||
Dim cj = bd.cajas.First(Function(x) x.idCaja = idCaja)
|
||||
If lf.Count = 0 Then Throw New Exception("Seleccione al menos una factura para pagar")
|
||||
|
||||
Dim lr As New List(Of movimientoscaja)
|
||||
For Each f In lf
|
||||
Dim nm As New movimientoscaja
|
||||
With nm
|
||||
.idFacturaNavigation = f
|
||||
.Importe = f.ImportePendiente
|
||||
.Tipo = TipoMovimientoEnum.RECIBO_CLIENTE
|
||||
.idCaja = idCaja
|
||||
.Fecha = FechaPago
|
||||
.FechaCreacion = Now
|
||||
.idUsuario = idUsuario
|
||||
.Observaciones = If(teObservaciones.EditValue IsNot Nothing, teObservaciones.EditValue.ToString, "")
|
||||
.EstableceNumeroRecibo()
|
||||
End With
|
||||
f.ImportePagado = Math.Round(f.movimientoscaja.Sum(Function(x) x.Importe), 2, MidpointRounding.AwayFromZero)
|
||||
f.FechaPago = New DateOnly(FechaPago.Year, FechaPago.Month, FechaPago.Day)
|
||||
f.movimientoscaja.Add(nm)
|
||||
bd.SaveChanges()
|
||||
lr.Add(nm)
|
||||
Next
|
||||
teObservaciones.EditValue = ""
|
||||
Dim cp As String = "RECIBO"
|
||||
Dim pl = bd.plantillas.First(Function(x) x.Codigo = cp)
|
||||
DXMessageBox.Show("Se han pagado " & lf.Count.ToString & " facturas. Seleccione ahora el fichero dónde se guardará el pdf de los recibos correspondientes.", "Atención")
|
||||
Dim b() As Byte = Informes.GuardaInformeEnPdf(bd, pl.idPlantilla, lr)
|
||||
|
||||
Dim sfd As New SaveFileDialog
|
||||
sfd.FileName = "Pago Facturas " & FechaPago.ToString("yyyy-MM-dd") & ".pdf"
|
||||
sfd.Filter = "Fichero PDF|*.pdf"
|
||||
sfd.DefaultExt = ".pdf"
|
||||
If sfd.ShowDialog Then
|
||||
IO.File.WriteAllBytes(sfd.FileName, b)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
' Informes.ImprimirPlantilla(bd, pl.idFicheroNavigation.Fichero, lr, False, 1)
|
||||
RefrescaAplicaciones()
|
||||
btMostrar_Click(Nothing, Nothing)
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Atención")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub cbRazonSocial_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles cbRazonSocial.PreviewKeyDown
|
||||
If e.Key = Key.F6 Then BiBuscarCliente_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
410
GestionGrupoSanchoToro/Comun.vb
Normal file
410
GestionGrupoSanchoToro/Comun.vb
Normal file
@@ -0,0 +1,410 @@
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Docking
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Printing
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports tsUtilidades
|
||||
Imports System.Data.Entity
|
||||
|
||||
Imports DevExpress.Xpf.Editors
|
||||
|
||||
'TODO No permitir 2 facturas rápidas al mismo tiempo
|
||||
'TODO Traspaso a otra caja
|
||||
'TODO Seleccion cajas en conciliación bancaria
|
||||
|
||||
Public Class Comun
|
||||
|
||||
Friend Shared OtrosParametros As String = ""
|
||||
Public Shared Property dwi As DXWindow
|
||||
Public Shared Property dg As DocumentGroup
|
||||
Public Shared Sub EscalaVentana(ByRef Ventana As Window, ByRef tr As Transform)
|
||||
If UsuarioActual.Escala.HasValue AndAlso UsuarioActual.Escala Then
|
||||
Ventana.Height = Math.Min(Comun.dwi.Height, Ventana.Height * UsuarioActual.Escala.Value)
|
||||
Ventana.Width = Math.Min(Comun.dwi.Width, Ventana.Width * UsuarioActual.Escala.Value)
|
||||
Dim scaler = TryCast(tr, ScaleTransform)
|
||||
If scaler Is Nothing Then
|
||||
scaler = New ScaleTransform(1.0, 1.0)
|
||||
tr = scaler
|
||||
End If
|
||||
scaler.ScaleX = UsuarioActual.Escala.Value
|
||||
scaler.ScaleY = UsuarioActual.Escala.Value
|
||||
scaler.BeginAnimation(ScaleTransform.ScaleXProperty, Nothing)
|
||||
scaler.BeginAnimation(ScaleTransform.ScaleYProperty, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
Public Shared Function ObtienePermisos(bd As tscGrupoSanchoToro, Codigo As String, idUsuario As Integer) As tsUtilidades.Permisos
|
||||
Dim per As New tsUtilidades.Permisos
|
||||
If bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).idGrupoNavigation.Descripcion = "SUPERADMINISTRADORES" Then
|
||||
per.Consultar = True
|
||||
per.Eliminar = True
|
||||
per.Nuevos = True
|
||||
per.Otros = True
|
||||
per.Modificar = True
|
||||
per.Impresion = True
|
||||
per.Exportar = True
|
||||
Else
|
||||
Dim au = (From a In bd.autorizacionesusuarios Select a Where a.idPermisoNavigation.CodigoPermiso = Codigo AndAlso a.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
If au.Count = 0 Then
|
||||
Dim idGrupo As Integer = (From u In bd.usuarios Select u Where u.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).First.idGrupo.Value
|
||||
Dim ag = (From g In bd.autorizacionesgrupos Select g Where g.idPermisoNavigation.CodigoPermiso = Codigo AndAlso g.idGrupo = idGrupo)
|
||||
If ag.Count = 0 Then
|
||||
per.Consultar = False
|
||||
per.Eliminar = False
|
||||
per.Nuevos = False
|
||||
per.Otros = False
|
||||
per.Modificar = False
|
||||
per.Impresion = False
|
||||
per.Exportar = False
|
||||
Else
|
||||
per.Consultar = ag.First.PermitirConsultas
|
||||
per.Eliminar = ag.First.PermitirEliminaciones
|
||||
per.Nuevos = ag.First.PermitirNuevos
|
||||
per.Otros = ag.First.OtrosPermisos
|
||||
per.Modificar = ag.First.PermitirModificaciones
|
||||
per.Impresion = ag.First.PermitirImpresiones
|
||||
per.Exportar = ag.First.PermitirImpresiones
|
||||
End If
|
||||
Else
|
||||
per.Consultar = au.First.PermitirConsultas
|
||||
per.Eliminar = au.First.PermitirEliminaciones
|
||||
per.Nuevos = au.First.PermitirNuevos
|
||||
per.Otros = au.First.OtrosPermisos
|
||||
per.Modificar = au.First.PermitirModificaciones
|
||||
per.Impresion = au.First.PermitirImpresiones
|
||||
per.Exportar = au.First.PermitirExportar
|
||||
End If
|
||||
End If
|
||||
'If Not bdga.DataBase.ToLower.Contains("GrupoSanchoToro") AndAlso Not bdga.DataBase.ToLower.Contains("desarrollo") AndAlso Not bdga.DataBase.ToLower.Contains("viernes") Then
|
||||
' per.Modificar = False
|
||||
' per.Nuevos = False
|
||||
'End If
|
||||
|
||||
Return per
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function ObtienePermisos(bd As tscGrupoSanchoToro, idPermiso As Nullable(Of Integer), idUsuario As Integer) As tsUtilidades.Permisos
|
||||
Dim per As New tsUtilidades.Permisos
|
||||
If bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).Usuario = "MANMOG" Then
|
||||
per.Consultar = True
|
||||
per.Eliminar = True
|
||||
per.Nuevos = True
|
||||
per.Otros = True
|
||||
per.Modificar = True
|
||||
per.Impresion = True
|
||||
per.Exportar = True
|
||||
Else
|
||||
If idPermiso Is Nothing Then
|
||||
per.Consultar = False
|
||||
per.Eliminar = False
|
||||
per.Nuevos = False
|
||||
per.Otros = False
|
||||
per.Modificar = False
|
||||
per.Impresion = False
|
||||
per.Exportar = False
|
||||
Else
|
||||
Dim au = (From a In bd.autorizacionesusuarios Select a Where a.idPermisoNavigation.idPermiso = idPermiso AndAlso a.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
If au.Count = 0 Then
|
||||
Dim idGrupo As Integer = (From u In bd.usuarios Select u Where u.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).First.idGrupo.Value
|
||||
Dim ag = (From g In bd.autorizacionesgrupos Select g Where g.idPermisoNavigation.idPermiso = idPermiso AndAlso g.idGrupo = idGrupo)
|
||||
If ag.Count = 0 Then
|
||||
per.Consultar = False
|
||||
per.Eliminar = False
|
||||
per.Nuevos = False
|
||||
per.Otros = False
|
||||
per.Modificar = False
|
||||
per.Impresion = False
|
||||
per.Exportar = False
|
||||
Else
|
||||
per.Consultar = ag.First.PermitirConsultas
|
||||
per.Eliminar = ag.First.PermitirEliminaciones
|
||||
per.Nuevos = ag.First.PermitirNuevos
|
||||
per.Otros = ag.First.OtrosPermisos
|
||||
per.Modificar = ag.First.PermitirModificaciones
|
||||
per.Impresion = ag.First.PermitirImpresiones
|
||||
per.Exportar = ag.First.PermitirImpresiones 'ag.First.PermitirExportar
|
||||
End If
|
||||
Else
|
||||
per.Consultar = au.First.PermitirConsultas
|
||||
per.Eliminar = au.First.PermitirEliminaciones
|
||||
per.Nuevos = au.First.PermitirNuevos
|
||||
per.Otros = au.First.OtrosPermisos
|
||||
per.Modificar = au.First.PermitirModificaciones
|
||||
per.Impresion = au.First.PermitirImpresiones
|
||||
per.Exportar = au.First.PermitirImpresiones
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return per
|
||||
End Function
|
||||
Friend Shared Function ObtienePlantillas(bd As tscGrupoSanchoToro, Grupo As String, Optional IncluirTipoListado As Boolean = True) As List(Of tsWPFCore.Plantilla)
|
||||
Dim plas As IQueryable(Of plantillas)
|
||||
If Not IncluirTipoListado Then
|
||||
plas = (From p In bd.plantillas Where p.idEmpresa = EmpresaActual.idEmpresa AndAlso p.idGrupoNavigation.Codigo = Grupo AndAlso p.TipoListado = False Select p)
|
||||
Else
|
||||
plas = (From p In bd.plantillas Where p.idEmpresa = EmpresaActual.idEmpresa AndAlso p.idGrupoNavigation.Codigo = Grupo Select p)
|
||||
End If
|
||||
Dim plantillas As New List(Of tsWPFCore.Plantilla)
|
||||
For Each p In plas
|
||||
Dim pl As New tsWPFCore.Plantilla
|
||||
pl.idPlantilla = p.idPlantilla
|
||||
pl.Descripcion = p.Descripcion
|
||||
plantillas.Add(pl)
|
||||
Next
|
||||
Return plantillas
|
||||
End Function
|
||||
Friend Shared Function ObtienePlantillas(bd As tscGrupoSanchoToro, Grupos() As String, Optional IncluirTipoListado As Boolean = True) As List(Of tsWPFCore.Plantilla)
|
||||
Dim plas As List(Of plantillas)
|
||||
If Not IncluirTipoListado Then
|
||||
plas = (From p In bd.plantillas Where p.TipoListado = False AndAlso p.Oculta = False Order By p.Orden Select p).ToList
|
||||
Else
|
||||
plas = (From p In bd.plantillas Where p.Oculta = False Order By p.Orden Select p).ToList
|
||||
End If
|
||||
Dim plantillas As New List(Of tsWPFCore.Plantilla)
|
||||
For Each p In plas
|
||||
If Grupos.Contains(p.idGrupoNavigation.Codigo) Then
|
||||
If Not p.idPermiso.HasValue OrElse ObtienePermisos(bd, p.idPermisoNavigation.CodigoPermiso, idUsuario).Impresion Then
|
||||
Dim pl As New tsWPFCore.Plantilla
|
||||
pl.idPlantilla = p.idPlantilla
|
||||
pl.Descripcion = p.Descripcion
|
||||
plantillas.Add(pl)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return plantillas
|
||||
End Function
|
||||
Friend Shared Function ObtienePlantillasPorCodigos(bd As tscGrupoSanchoToro, Codigos() As String, Optional IncluirTipoListado As Boolean = True) As List(Of tsWPFCore.Plantilla)
|
||||
Dim plas As List(Of plantillas)
|
||||
If Not IncluirTipoListado Then
|
||||
plas = (From p In bd.plantillas Where p.idEmpresa = EmpresaActual.idEmpresa AndAlso p.TipoListado = False AndAlso p.Oculta = False Order By p.Orden Select p).ToList
|
||||
Else
|
||||
plas = (From p In bd.plantillas Where p.idEmpresa = EmpresaActual.idEmpresa AndAlso p.Oculta = False Order By p.Orden Select p).ToList
|
||||
End If
|
||||
Dim plantillas As New List(Of tsWPFCore.Plantilla)
|
||||
plas = plas.Where(Function(x) Codigos.Contains(x.Codigo) AndAlso (x.idPermisoNavigation Is Nothing OrElse ObtienePermisos(bd, x.idPermisoNavigation.CodigoPermiso, idUsuario).Impresion)).ToList
|
||||
For Each p In plas
|
||||
Dim pl As New tsWPFCore.Plantilla
|
||||
pl.idPlantilla = p.idPlantilla
|
||||
pl.Descripcion = p.Descripcion
|
||||
plantillas.Add(pl)
|
||||
Next
|
||||
Return plantillas
|
||||
End Function
|
||||
'Friend Shared Sub MuestraImpresos(bd As tscGrupoSanchoToro, idPlantilla As Integer, Datasource As Object, GrupoDocumentos As DocumentGroup, dc As DockController)
|
||||
' Try
|
||||
|
||||
' If idPlantilla = 0 Then Throw New Exception("Seleccione primero la plantilla a imprimir")
|
||||
' Dim xr As New XtraReport
|
||||
|
||||
' Dim qr As ObjectSet(Of plantillas) = bd.plantillas
|
||||
' ' qr.MergeOption = MergeOption.OverwriteChanges
|
||||
|
||||
' Dim pl = qr.Where(Function(x) x.idPlantilla = idPlantilla).First
|
||||
|
||||
' 'Dim pl As plantillas = (From p In bd.plantillas Where p.idPlantilla = idPlantilla).First
|
||||
' Dim s As String = System.Text.Encoding.UTF8.GetString(pl.idFicheroNavigation.Fichero)
|
||||
' Using sw As New StreamWriter(New MemoryStream())
|
||||
' sw.Write(s)
|
||||
' sw.Flush()
|
||||
' xr = XtraReport.FromStream(sw.BaseStream, True)
|
||||
' End Using
|
||||
' Try
|
||||
' Dim pr As DevExpress.XtraReports.Parameters.Parameter = (From p As DevExpress.XtraReports.Parameters.Parameter In xr.Parameters Where p.Name = "Fecha").First
|
||||
' pr.Value = Now
|
||||
' pr.Visible = False
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
|
||||
' Select Case Datasource.GetType
|
||||
' 'Case GetType(personas), GetType(List(Of personas))
|
||||
' ' If Datasource.GetType = GetType(personas) Then
|
||||
' ' Dim lp As New List(Of personas)
|
||||
' ' Dim per As personas = Datasource
|
||||
' ' lp.Add(per)
|
||||
' ' Datasource = lp
|
||||
' ' End If
|
||||
' ' If pl.enumeraciones.Codigo = "GRUPLA.TARJETAVERTICAL" Then
|
||||
' ' Dim ltvd As New List(Of TarjetaVerticalDiputado)
|
||||
' ' Dim iNumPer As Integer
|
||||
' ' Dim tvd As TarjetaVerticalDiputado = Nothing
|
||||
|
||||
' ' For Each p In DirectCast(Datasource, List(Of personas))
|
||||
' ' iNumPer += 1
|
||||
' ' If iNumPer Mod 2 = 1 Then
|
||||
' ' tvd = New TarjetaVerticalDiputado
|
||||
' ' With tvd
|
||||
' ' .Dni1 = p.NIF
|
||||
' ' If p.idFicheroFoto IsNot Nothing AndAlso p.idFicheroNavigation.Fichero IsNot Nothing AndAlso p.idFicheroNavigation.Fichero.Length > 0 Then
|
||||
' ' Dim original = System.Drawing.Image.FromStream(New IO.MemoryStream(p.idFicheroNavigation.Fichero))
|
||||
' ' original.RotateFlip(System.Drawing.RotateFlipType.Rotate90FlipNone)
|
||||
' ' Dim memStream As IO.MemoryStream = New IO.MemoryStream()
|
||||
' ' original.Save(memStream, ImageFormat.Png)
|
||||
' ' .Foto1 = memStream.ToArray
|
||||
' ' End If
|
||||
' ' .Nombre1 = p.Nombre & " " & p.Apellidos
|
||||
' ' .PuestoEnTarjeta1 = p.PuestoTrabajoEnTarjeta
|
||||
' ' .Tratamiento1 = p.Tratamiento
|
||||
' ' End With
|
||||
' ' ltvd.Add(tvd)
|
||||
' ' Else
|
||||
' ' With tvd
|
||||
' ' .Dni2 = p.NIF
|
||||
' ' If p.idFicheroFoto IsNot Nothing AndAlso p.idFicheroNavigation.Fichero.Length > 0 Then
|
||||
' ' Dim original = System.Drawing.Image.FromStream(New IO.MemoryStream(p.idFicheroNavigation.Fichero))
|
||||
' ' original.RotateFlip(System.Drawing.RotateFlipType.Rotate90FlipNone)
|
||||
' ' Dim memStream As IO.MemoryStream = New IO.MemoryStream()
|
||||
' ' original.Save(memStream, ImageFormat.Png)
|
||||
' ' .Foto2 = memStream.ToArray
|
||||
' ' End If
|
||||
' ' .Nombre2 = p.Nombre & " " & p.Apellidos
|
||||
' ' .PuestoEnTarjeta2 = p.PuestoTrabajoEnTarjeta
|
||||
' ' .Tratamiento2 = p.Tratamiento
|
||||
' ' End With
|
||||
' ' End If
|
||||
' ' Next
|
||||
' ' Datasource = ltvd
|
||||
' ' End If
|
||||
' End Select
|
||||
|
||||
|
||||
' xr.DataSource = Datasource
|
||||
' Dim modelo As New XtraReportPreviewModel(xr)
|
||||
|
||||
' Dim vi As New tsWPFCore.ucVisualizadorInformes
|
||||
' vi.Visualizador.Model = modelo
|
||||
' xr.CreateDocument(True)
|
||||
|
||||
' 'If pl.Codigo = "TARDIPVER" Then
|
||||
|
||||
' ' Dim original = System.Drawing.Image.FromStream(New IO.MemoryStream(Per.idFicheroNavigation.Fichero))
|
||||
' ' original.RotateFlip(System.Drawing.RotateFlipType.Rotate270FlipNone)
|
||||
' ' Dim memStream As IO.MemoryStream = New IO.MemoryStream()
|
||||
' ' original.Save(memStream, ImageFormat.Png)
|
||||
' ' Per.idFicheroNavigation.Fichero = memStream.ToArray
|
||||
' 'End If
|
||||
' Dim docpanel As New DevExpress.Xpf.Docking.DocumentPanel
|
||||
' docpanel.Caption = pl.Descripcion
|
||||
' docpanel.Content = vi
|
||||
' docpanel.ClosingBehavior = DevExpress.Xpf.Docking.ClosingBehavior.ImmediatelyRemove
|
||||
' GrupoDocumentos.Items.Add(docpanel)
|
||||
' dc.Activate(docpanel)
|
||||
|
||||
' Catch ex As Exception
|
||||
' DXMessageBox.Show(ex.Message, "Atención", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End Try
|
||||
'End Sub
|
||||
Shared Sub GeneraRegistroCorreoExcepcion(bd As tscGrupoSanchoToro, ex As Exception, Rutina As String, Optional FicheroImagen As Byte() = Nothing)
|
||||
Try
|
||||
If bd Is Nothing Then bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Dim sMensaje As String = "Usuario: " & bdGrupoSanchoToro.db.Utilidades.Usuario & vbCrLf
|
||||
Dim sStackTrace As String = "Tipo excepción: " & ex.ToString & vbCrLf
|
||||
Dim exError As Exception = ex
|
||||
Do
|
||||
sStackTrace &= exError.StackTrace & vbCrLf
|
||||
exError = exError.InnerException
|
||||
Loop Until IsNothing(exError)
|
||||
If sStackTrace <> "" Then sMensaje &= vbCrLf & "StackTrace: " & sStackTrace
|
||||
Dim cuentaorigen As cuentascorreo = (From c In bd.cuentascorreo Select c Where c.Codigo = "M3SOFT").First
|
||||
If FicheroImagen Is Nothing Then
|
||||
correos.GeneraRegistroCorreon(bd, "Mensaje Automático. Error en " & Rutina, sMensaje, cuentaorigen, "manmog@gmail.com", "", "", , ,, "ERRORES")
|
||||
Else
|
||||
correos.GeneraRegistroCorreon(bd, "Mensaje Automático. Error en " & Rutina, sMensaje, cuentaorigen, "manmog@gmail.com", "", "", FicheroImagen, "captura.jpg",, "ERRORES")
|
||||
End If
|
||||
Catch ex2 As Exception
|
||||
DXMessageBox.Show(ex2.Message & vbCrLf & ex2.StackTrace, "Error Generando Correo Excepcion")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Friend Shared Function ObtieneListaAlmacenes(bd As tscGrupoSanchoToro) As List(Of almacenes)
|
||||
Dim alms = bd.almacenes.Where(Function(x) x.FechaBaja.HasValue = False).ToList
|
||||
Return alms
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Namespace Convertidores
|
||||
|
||||
Public Class DoubleToDecimalConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
|
||||
If value Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return Decimal.Parse(value)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
If value Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return Double.Parse(value)
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
Public Class ExistenLineasConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
|
||||
Dim lineas As IEnumerable(Of Object) = value
|
||||
Return (lineas.Count > 0)
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Return value
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class ImagenConverter
|
||||
Implements IValueConverter
|
||||
|
||||
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
|
||||
Try
|
||||
If value Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Dim ms As New IO.MemoryStream(DirectCast(value, Byte()))
|
||||
Dim img As New BitmapImage
|
||||
img.BeginInit()
|
||||
img.StreamSource = ms
|
||||
img.CacheOption = BitmapCacheOption.OnLoad
|
||||
img.EndInit()
|
||||
img.Freeze()
|
||||
ms.Close()
|
||||
ms.Dispose()
|
||||
Return img
|
||||
GC.Collect()
|
||||
GC.WaitForPendingFinalizers()
|
||||
GC.Collect()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
' Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
|
||||
Try
|
||||
If value Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Dim bm As BitmapImage = value
|
||||
Dim ms As IO.MemoryStream = bm.StreamSource
|
||||
Return ms.ToArray
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
138
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacen.xaml
Normal file
138
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacen.xaml
Normal file
@@ -0,0 +1,138 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucAlmacen"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos Almacén" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="450">
|
||||
<tsWPF:tsLayoutItem Label="Descripción:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Descripcion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="1" x:Name="teNIF" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Encargados:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Encargados, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="350">
|
||||
<tsWPF:tsLayoutItem Label="Tipo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipo" ValueMember="Valor" DisplayMember="Descripcion" EditValue="{Binding Tipo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Email:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Email, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Baja:" Width="200" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaBaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<!--<tsWPF:tsLayoutItem Label="Permisos:" Width="400" HorizontalAlignment="Left" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False"/>
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbPermiso" ValueMember="idPermiso" DisplayMember="Codigo" EditValue="{Binding idPermiso, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>-->
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Dirección" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<tsWPF:tsLayoutItem Label="Direccion:" Width="400">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Direccion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="13" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Código Postal:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ButtonEdit x:Name="beCodigoPostal" EditValue="{Binding CodigoPostal, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" DefaultButtonClick="BeCodigoPostal_DefaultButtonClick">
|
||||
<dxe:ButtonInfo GlyphKind="Cancel" x:Name="btCancelarCodigoPostal" Click="BtCancelarCodigoPostal_Click" />
|
||||
</dxe:ButtonEdit>
|
||||
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Población:" x:Name="Poblacion" Width="350">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Poblacion, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="15" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Provincia:" Width="350">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Provincia, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="16" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dx:DXTabControl Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Productos">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
|
||||
<tsWPF:tsGridControl x:Name="gcProductos" NombreTablaBase="stocks" TabIndex="41">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="false" x:Name="tvProductos">
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Producto" IsSmart="True" Width="450" SoloLectura="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="Unidades" IsSmart="True" Width="100" HorizontalHeaderContentAlignment="Right">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
</dxg:GridControl.Columns>
|
||||
</tsWPF:tsGridControl>
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
|
||||
</dx:DXTabControl>
|
||||
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
232
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacen.xaml.vb
Normal file
232
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacen.xaml.vb
Normal file
@@ -0,0 +1,232 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.LayoutControl
|
||||
Imports tsWPFCore
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Editors.Validation
|
||||
Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports tsUtilidades.Datos
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports bdGrupoSanchoToro.db.almacenes
|
||||
Imports tsEFCore8.Extensiones
|
||||
|
||||
Public Class ucAlmacen
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idAlmacen As Nullable(Of Integer)
|
||||
Private ra As almacenes
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
|
||||
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo OrElse _idAlmacen Is Nothing OrElse FuerzaNuevo Then
|
||||
ra = New almacenes
|
||||
Me.DataContext = ra
|
||||
_idAlmacen = Nothing
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.almacenes.First(Function(x) x.idAlmacen = _idAlmacen.Value)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
Me.DataContext = ra
|
||||
gcProductos.ItemsSource = ra.stocks
|
||||
Return NuevoEstado
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "almacenes"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "Almacen.Nuevo"
|
||||
Else
|
||||
Return "Almacen." & DirectCast(Me.DataContext, almacenes).idAlmacen.ToString
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Almacén"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idAlmacen As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idAlmacen = idAlmacen
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Me.cbTipo.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(TipoAlmacenEnum))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim cj As almacenes = Me.DataContext
|
||||
Me.docpanel.Caption = "Almacen " & cj.Descripcion
|
||||
Me.docpanel.Tag = "Almacen." & cj.idAlmacen.ToString
|
||||
Else
|
||||
Me.docpanel.Caption = "Almacen Nuevo"
|
||||
Me.docpanel.Tag = "Almacen.Nuevo"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucAlmacenes)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub ucAlmacen_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "producto"
|
||||
Dim st As stocks = gcProductos.CurrentItem
|
||||
FuncionesDinamicas.AbrirAP(New ucProducto(st.idProducto), OtrosParametros)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub ucAlmacen_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
|
||||
_idAlmacen = ra.idAlmacen
|
||||
End Sub
|
||||
Private Sub ap_ValidarControl(sender As Object, e As ValidationEventArgs, ByRef ev As ErrorValidacion, ByRef ValorOriginalCambiado As Object) Handles Me.ValidarControl
|
||||
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
Try
|
||||
If Not pts Is Nothing Then
|
||||
ErroresValidacion.EliminaError("validando-" & pts.NombreCampo)
|
||||
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "email"
|
||||
If e.Value IsNot Nothing AndAlso e.Value.ToString <> "" Then
|
||||
If Not e.Value.ToString.Trim.ToLower.EsEmailValido Then Throw New Exception("El email es incorrecto")
|
||||
End If
|
||||
Case "codigopostal"
|
||||
If Not e.Value Is Nothing AndAlso e.Value.ToString <> "" AndAlso e.Value.ToString <> ra.CodigoPostal Then
|
||||
|
||||
Dim sCpo As String = e.Value.ToString
|
||||
If sCpo.Length <> 5 Then Throw New Exception("El código postal no es correcto")
|
||||
Dim sCodigoprovincia As String = sCpo.Substring(0, 2)
|
||||
If Not bd.provincias.Any(Function(x) x.CodigoProvincia = sCodigoprovincia) Then Throw New Exception("El código postal no es correcto")
|
||||
Select Case bd.codigospostales.Where(Function(x) x.CodigoPostal = sCpo).Count
|
||||
Case 0
|
||||
Dim vncp As New dxwAgregarNuevoCodigoPostal(sCpo, bd)
|
||||
If vncp.ShowDialog Then
|
||||
Dim pob = bd.codigospostales.First(Function(x) x.CodigoPostal = sCpo)
|
||||
ra.CodigoMunicipio = pob.CodigoMunicipio
|
||||
|
||||
Else
|
||||
ValorOriginalCambiado = ra.CodigoPostal
|
||||
Throw New Exception("El código postal no es correcto")
|
||||
End If
|
||||
Case 1
|
||||
Dim pob = bd.codigospostales.First(Function(x) x.CodigoPostal = sCpo)
|
||||
ra.CodigoMunicipio = pob.CodigoMunicipio
|
||||
|
||||
Case Else
|
||||
Dim wMunicipios As New dxwCodigosPostales(bd, sCpo)
|
||||
If wMunicipios.ShowDialog Then
|
||||
ra.CodigoMunicipio = wMunicipios.CodigoMunicipio
|
||||
Else
|
||||
Throw New Exception("El código postal no es correcto")
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Dim sCodigoError As String = "validando-"
|
||||
If pts IsNot Nothing Then
|
||||
sCodigoError &= pts.NombreCampo
|
||||
End If
|
||||
ev = New ErrorValidacion(sCodigoError, sender, ex.Message, ex, DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical)
|
||||
e.IsValid = False
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BeCodigoPostal_DefaultButtonClick(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
Dim dxw As New dxwCodigosPostales(bd, "")
|
||||
If dxw.ShowDialog Then
|
||||
ra.CodigoMunicipio = dxw.CodigoMunicipio
|
||||
ra.CodigoPostal = dxw.CodigoPostal
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtCancelarCodigoPostal_Click(sender As Object, e As RoutedEventArgs)
|
||||
ra.CodigoMunicipio = ""
|
||||
End Sub
|
||||
|
||||
Private Sub ucAlmacen_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
If Not pts Is Nothing Then
|
||||
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "codigopostal"
|
||||
ra.RefrescaCamposSoloLectura()
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub beCodigoPostal_LostFocus(sender As Object, e As RoutedEventArgs) Handles beCodigoPostal.LostFocus
|
||||
If Me.ErroresValidacion.Errores.Any(Function(x) x.id = "validando-CodigoPostal") Then
|
||||
Dim cp = beCodigoPostal.EditText.ToString
|
||||
If bd.codigospostales.Any(Function(x) x.CodigoPostal = cp) Then
|
||||
ErroresValidacion.EliminaError("validando-CodigoPostal")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ucAlmacen_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
Dim hte As New Hashtable
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
Dim almexi = bd.almacenes.FirstOrDefault(Function(x) x.idAlmacen <> ra.idAlmacen AndAlso x.Descripcion = ra.Descripcion AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
If almexi IsNot Nothing Then
|
||||
hte.Add("ALMACENAR-ALMACEN_DUPLIADO", "Almacén Duplicado")
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
46
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacenes.xaml
Normal file
46
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacenes.xaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
x:Class="ucAlmacenes"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="850">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="grid">
|
||||
|
||||
<dxlc:LayoutControl Orientation="Vertical" Margin="-11" >
|
||||
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="4" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC PermitirEliminar="False" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Descripcion" Header="Almacén" Width="400" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="DescripcionTipo" Header="Tipo" IsSmart="True" Width="150"/>
|
||||
<tsWPF:tsGridColumn FieldName="FechaBaja" Width="150" IsSmart="True" SoloLectura="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" >
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
84
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacenes.xaml.vb
Normal file
84
GestionGrupoSanchoToro/FicherosMaestros/ucAlmacenes.xaml.vb
Normal file
@@ -0,0 +1,84 @@
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports System.Collections
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Linq.Dynamic
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
|
||||
|
||||
Public Class ucAlmacenes
|
||||
|
||||
Private DatacontextEstablecido As Boolean
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
GridBusqueda = Me.gc
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
gc.ItemsSource = bd.almacenes.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa).ToList
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Almacenes"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "Almacenes"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "Almacenes"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Almacén"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
|
||||
Dim al = DirectCast(Me.gc.CurrentItem, almacenes)
|
||||
Dim id = al.idAlmacen
|
||||
FuncionesDinamicas.AbrirAP(New ucAlmacen(id), OtrosParametros)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ucAlmacenes_BotonNuevoPulsado() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucAlmacen(Nothing), OtrosParametros)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
202
GestionGrupoSanchoToro/FicherosMaestros/ucCaja.xaml
Normal file
202
GestionGrupoSanchoToro/FicherosMaestros/ucCaja.xaml
Normal file
@@ -0,0 +1,202 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucCaja"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos Caja" x:Name="lgDetalle" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="450">
|
||||
<tsWPF:tsLayoutItem Label="Descripción:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Descripcion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="1" x:Name="teNIF" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="IBAN:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding IBAN, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="tbTelefonoTomador" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="350">
|
||||
<tsWPF:tsLayoutItem Label="Tipo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipo" ValueMember="Valor" DisplayMember="Descripcion" EditValue="{Binding Tipo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Sufijo Bancario:" Width="200" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding SufijoBancario, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Baja:" Width="200" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaBaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<!--<tsWPF:tsLayoutItem Label="Permisos:" Width="400" HorizontalAlignment="Left" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False"/>
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbPermiso" ValueMember="idPermiso" DisplayMember="Codigo" EditValue="{Binding idPermiso, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>-->
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Datos Último Cierre" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Cierre:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaCierre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Width="200" Label="Saldo Al Cierre:" FontWeight="Bold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="27" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding SaldoAlCierre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Importe Pendiente Cerrar:" Width="300">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="28" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding SaldoPendienteCierre, Mode=OneWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Saldo Actual:" Width="300">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="28" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding SaldoActual, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dx:DXTabControl Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Movimientos">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Filtros" x:Name="lgFiltros" View="GroupBox" IsLocked="True" HorizontalAlignment="Stretch" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Mostrar Movimientos Cerrados:" HorizontalAlignment="Left" HorizontalContentAlignment="Left" TabIndex="1">
|
||||
<dxe:CheckEdit x:Name="cbIncluirCerrados" EditValueChanged="CbIncluirCerrados_EditValueChanged" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicial:" Width="170" HorizontalAlignment="Left" Margin="60,0,0,0">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit x:Name="teFechaInicial" TabIndex="1" MaskUseAsDisplayFormat="True" AllowNullInput="true" NullText="" EditValueChanged="TeFechaInicial_EditValueChanged" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Final:" Width="170" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit x:Name="teFechaFinal" TabIndex="2" MaskUseAsDisplayFormat="True" AllowNullInput="true" NullText="" EditValueChanged="TeFechaFinal_EditValueChanged" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsGridControl x:Name="gcMovimientos" TabIndex="4" NombreTablaBase="movimientoscaja">
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC Descripcion="Movimientos Caja" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="idMovimiento" Width="110" IsSmart="True" Header="Nº Movimiento" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="Fecha" Width="150" IsSmart="True" ReadOnly="True" />
|
||||
<tsWPF:tsGridColumn FieldName="DescripcionTipoMovimiento" Header="Tipo" Width="190" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Clase" Header="Clase" Width="80" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="ReferenciaDocumento" Width="100" IsSmart="True" Header="Referencia" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaDocumento" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="RazonSocial" Width="300" IsSmart="True" Header="Razón Social" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn Width="100" TabStop="False" FieldName="Importe" HorizontalHeaderContentAlignment="Right">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskUseAsDisplayFormat="True" MaskType="Numeric" Mask="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Header="Observaciones" Width="400" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaCierre" Width="150" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="usuarios.Nombre" Header="Usuario" Width="200" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaSupervision" Header="Fecha Supervisión" Width="150" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView ShowTotalSummary="True" x:Name="tv" ShowGroupFooters="True" ShowSearchPanelMode="Always">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="Tipo=1" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Magenta" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=2" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=3" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Brown" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=4 AndAlso Importe < 0" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=9" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Blue" FontWeight="Bold" />
|
||||
</dxg:FormatCondition>
|
||||
|
||||
<dxg:FormatCondition Expression="Not IsNull([FechaCierre])" FieldName="{x:Null}">
|
||||
<dxg:Format FontStyle="Italic" />
|
||||
</dxg:FormatCondition>
|
||||
|
||||
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInColumn="RazonSocial" DisplayFormat="Nº Movimientos: {0:n}" />
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInColumn="Importe" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInGroupColumnFooter="RazonSocial" DisplayFormat="Nº Movimientos: {0:n}" />
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInGroupColumnFooter="Importe" DisplayFormat=" {0:c2}" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
|
||||
</dx:DXTabControl>
|
||||
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
202
GestionGrupoSanchoToro/FicherosMaestros/ucCaja.xaml.bak
Normal file
202
GestionGrupoSanchoToro/FicherosMaestros/ucCaja.xaml.bak
Normal file
@@ -0,0 +1,202 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v22.2" x:Class="ucCaja"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos Caja" x:Name="lgDetalle" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="450">
|
||||
<tsWPF:tsLayoutItem Label="Descripción:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Descripcion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="1" x:Name="teNIF" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="IBAN:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding IBAN, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="tbTelefonoTomador" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="350">
|
||||
<tsWPF:tsLayoutItem Label="Tipo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipo" ValueMember="Valor" DisplayMember="Descripcion" EditValue="{Binding Tipo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Sufijo Bancario:" Width="200" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding SufijoBancario, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Baja:" Width="200" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaBaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<!--<tsWPF:tsLayoutItem Label="Permisos:" Width="400" HorizontalAlignment="Left" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False"/>
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbPermiso" ValueMember="idPermiso" DisplayMember="Codigo" EditValue="{Binding idPermiso, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>-->
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Datos Último Cierre" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Cierre:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaCierre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Width="200" Label="Saldo Al Cierre:" FontWeight="Bold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="27" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding SaldoAlCierre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Importe Pendiente Cerrar:" Width="300">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="28" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding SaldoPendienteCierre, Mode=OneWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Saldo Actual:" Width="300">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="28" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding SaldoActual, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dx:DXTabControl Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Movimientos">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Filtros" x:Name="lgFiltros" View="GroupBox" IsLocked="True" HorizontalAlignment="Stretch" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Mostrar Movimientos Cerrados:" HorizontalAlignment="Left" HorizontalContentAlignment="Left" TabIndex="1">
|
||||
<dxe:CheckEdit x:Name="cbIncluirCerrados" EditValueChanged="CbIncluirCerrados_EditValueChanged" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicial:" Width="170" HorizontalAlignment="Left" Margin="60,0,0,0">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit x:Name="teFechaInicial" TabIndex="1" MaskUseAsDisplayFormat="True" AllowNullInput="true" NullText="" EditValueChanged="TeFechaInicial_EditValueChanged" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Final:" Width="170" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit x:Name="teFechaFinal" TabIndex="2" MaskUseAsDisplayFormat="True" AllowNullInput="true" NullText="" EditValueChanged="TeFechaFinal_EditValueChanged" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsGridControl x:Name="gcMovimientos" TabIndex="4" NombreTablaBase="movimientoscaja">
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC Descripcion="Movimientos Caja" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="idMovimiento" Width="110" IsSmart="True" Header="Nº Movimiento" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="Fecha" Width="150" IsSmart="True" ReadOnly="True" />
|
||||
<tsWPF:tsGridColumn FieldName="DescripcionTipoMovimiento" Header="Tipo" Width="190" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Clase" Header="Clase" Width="80" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="ReferenciaDocumento" Width="100" IsSmart="True" Header="Referencia" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaDocumento" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="RazonSocial" Width="300" IsSmart="True" Header="Razón Social" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn Width="100" TabStop="False" FieldName="Importe" HorizontalHeaderContentAlignment="Right">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskUseAsDisplayFormat="True" MaskType="Numeric" Mask="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Header="Observaciones" Width="400" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaCierre" Width="150" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="usuarios.Nombre" Header="Usuario" Width="200" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaSupervision" Header="Fecha Supervisión" Width="150" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView ShowTotalSummary="True" x:Name="tv" ShowGroupFooters="True" ShowSearchPanelMode="Always">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="Tipo=1" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Magenta" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=2" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=3" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Brown" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=4 AndAlso Importe < 0" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=9" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Blue" FontWeight="Bold" />
|
||||
</dxg:FormatCondition>
|
||||
|
||||
<dxg:FormatCondition Expression="Not IsNull([FechaCierre])" FieldName="{x:Null}">
|
||||
<dxg:Format FontStyle="Italic" />
|
||||
</dxg:FormatCondition>
|
||||
|
||||
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInColumn="RazonSocial" DisplayFormat="Nº Movimientos: {0:n}" />
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInColumn="Importe" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInGroupColumnFooter="RazonSocial" DisplayFormat="Nº Movimientos: {0:n}" />
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInGroupColumnFooter="Importe" DisplayFormat=" {0:c2}" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
|
||||
</dx:DXTabControl>
|
||||
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
205
GestionGrupoSanchoToro/FicherosMaestros/ucCaja.xaml.vb
Normal file
205
GestionGrupoSanchoToro/FicherosMaestros/ucCaja.xaml.vb
Normal file
@@ -0,0 +1,205 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
Imports GrupoSanchoToro.GrupoSanchoToro
|
||||
|
||||
Public Class ucCaja
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idCaja As Nullable(Of Integer)
|
||||
Dim ra As cajas
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
|
||||
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo OrElse _idCaja Is Nothing OrElse FuerzaNuevo Then
|
||||
ra = New cajas
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
Me.DataContext = ra
|
||||
_idCaja = Nothing
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.cajas.First(Function(x) x.idCaja = _idCaja.Value)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
Me.DataContext = ra
|
||||
ObtieneMovimientos()
|
||||
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "CERRAR CAJA"})
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
ra = Me.DataContext
|
||||
|
||||
|
||||
Return NuevoEstado
|
||||
|
||||
End Function
|
||||
Private Sub ObtieneMovimientos()
|
||||
If Me.DataContext IsNot Nothing Then
|
||||
Dim ra As cajas = Me.DataContext
|
||||
Dim rs = bd.movimientoscaja.Include(Function(x) x.idMovimientoCierreNavigation).Where(Function(x) x.idCaja = ra.idCaja)
|
||||
Dim fi As Date? = teFechaInicial.EditValue
|
||||
If cbIncluirCerrados.IsChecked = False Then
|
||||
rs = rs.Where(Function(x) x.idMovimientoCierre.HasValue = False)
|
||||
End If
|
||||
If fi.HasValue Then
|
||||
rs = rs.Where(Function(x) x.Fecha >= fi.Value)
|
||||
End If
|
||||
Dim ff As Date? = teFechaFinal.EditValue
|
||||
If ff.HasValue Then
|
||||
ff = ff.Value.AddDays(1)
|
||||
rs = rs.Where(Function(x) x.Fecha < ff.Value)
|
||||
End If
|
||||
gcMovimientos.ItemsSource = rs.Include(Function(x) x.idFacturaNavigation.idClienteNavigation).Include(Function(x) x.idFacturaRecibidaNavigation.idProveedorNavigation).OrderBy(Function(x) x.Fecha).ToList
|
||||
Else
|
||||
gcMovimientos.ItemsSource = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "cajas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "Caja.Nuevo"
|
||||
Else
|
||||
Return "Caja." & DirectCast(Me.DataContext, cajas).idCaja.ToString
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Caja"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idCaja As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idCaja = idCaja
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Me.cbTipo.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.cajas.TipoCajaEnum))
|
||||
'Try
|
||||
' Dim ra As cajas = Me.DataContext
|
||||
'Catch ex As Exception
|
||||
' Throw New Exception(ex.Message, ex)
|
||||
'End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim cj As cajas = Me.DataContext
|
||||
Me.docpanel.Caption = "Caja " & cj.Descripcion
|
||||
Me.docpanel.Tag = "Caja." & cj.idCaja.ToString
|
||||
Else
|
||||
Me.docpanel.Caption = "Caja Nuevo"
|
||||
Me.docpanel.Tag = "Caja.Nuevo"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucCajas)
|
||||
End Sub
|
||||
|
||||
Private Sub TeFechaFinal_EditValueChanged(sender As Object, e As EditValueChangedEventArgs)
|
||||
ObtieneMovimientos()
|
||||
End Sub
|
||||
|
||||
Private Sub CbIncluirCerrados_EditValueChanged(sender As Object, e As EditValueChangedEventArgs)
|
||||
Dim fi As Date? = teFechaInicial.EditValue
|
||||
If fi.HasValue = False Then
|
||||
teFechaInicial.EditValue = Now.AddDays(-30).Date
|
||||
End If
|
||||
Dim ff As Date? = teFechaFinal.EditValue
|
||||
If ff.HasValue = False Then
|
||||
teFechaFinal.EditValue = Now.Date
|
||||
End If
|
||||
ObtieneMovimientos()
|
||||
End Sub
|
||||
|
||||
Private Sub TeFechaInicial_EditValueChanged(sender As Object, e As EditValueChangedEventArgs)
|
||||
ObtieneMovimientos()
|
||||
End Sub
|
||||
|
||||
Private Sub ucCaja_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim ra As movimientoscaja = Me.gcMovimientos.CurrentItem
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "idmovimiento"
|
||||
FuncionesDinamicas.AbrirAP(New ucMovimientoCaja(ra.idMovimiento), OtrosParametros)
|
||||
Case "referenciadocumento"
|
||||
Dim tipom As TipoMovimientoEnum = ra.Tipo
|
||||
Select Case tipom
|
||||
Case TipoMovimientoEnum.RECIBO_CLIENTE
|
||||
' FuncionesDinamicas.AbrirAP(New ucFacturaEmitida(ra.idFactura), OtrosParametros)
|
||||
Case TipoMovimientoEnum.RECIBO_PROVEEDOR
|
||||
FuncionesDinamicas.AbrirAP(New ucFacturaRecibida(ra.idFacturaRecibida), OtrosParametros)
|
||||
End Select
|
||||
Case "razonsocial"
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad(ra.idEntidad), OtrosParametros)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ucCaja_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
Select Case idAccion
|
||||
Case 1 ' CIERRE CAJA
|
||||
|
||||
If DXMessageBox.Show("¿Está seguro de querer cerrar la caja " & ra.Descripcion & "?", "Atención", vbYesNo) = MessageBoxResult.Yes Then
|
||||
DXMessageBox.Show(ListadosYProcesos.CierraCaja(ra.idCaja, True), "Cierre de Caja " & ra.Descripcion)
|
||||
RefrescaUC()
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ucCaja_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
|
||||
_idCaja = ra.idCaja
|
||||
End Sub
|
||||
|
||||
Private Sub ucCaja_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
Dim hte As New Hashtable
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
Dim almexi = bd.cajas.FirstOrDefault(Function(x) x.idCaja <> ra.idCaja AndAlso x.Descripcion = ra.Descripcion AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
If almexi IsNot Nothing Then
|
||||
hte.Add("ALMACENAR-CAJA_DUPLICADA", "Caja Duplicada")
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
76
GestionGrupoSanchoToro/FicherosMaestros/ucCajas.xaml
Normal file
76
GestionGrupoSanchoToro/FicherosMaestros/ucCajas.xaml
Normal file
@@ -0,0 +1,76 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
x:Class="ucCajas"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="850">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="grid">
|
||||
|
||||
<dxlc:LayoutControl Orientation="Vertical" Margin="-11" >
|
||||
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="4" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC PermitirEliminar="False" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Descripcion" Header="Caja" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaCierre" Header="Último Cierre" IsSmart="True" Width="150"/>
|
||||
<tsWPF:tsGridColumn FieldName="SaldoAlCierre" HorizontalHeaderContentAlignment="Right" Width="100">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right"/>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="SaldoPendienteCierre" HorizontalHeaderContentAlignment="Right" Width="150">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right"/>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="SaldoActual" HorizontalHeaderContentAlignment="Right" Width="100">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right"/>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="IBAN" IsSmart="True" SoloLectura="True" Width="250"/>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="FechaBaja" Width="150" IsSmart="True" ReadOnly="True" />
|
||||
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView ShowTotalSummary="True" x:Name="tv" >
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
<dxg:GridSummaryItem FieldName="ImporteEntrada" SummaryType="Sum" ShowInColumn="ImporteEntrada" />
|
||||
<dxg:GridSummaryItem FieldName="ImporteSalida" SummaryType="Sum" ShowInColumn="ImporteSalida" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
<dxg:GridSummaryItem FieldName="ImporteEntrada" SummaryType="Sum" ShowInColumn="ImporteEntrada" />
|
||||
<dxg:GridSummaryItem FieldName="ImporteSalida" SummaryType="Sum" ShowInColumn="ImporteSalida" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
534
GestionGrupoSanchoToro/FicherosMaestros/ucCajas.xaml.vb
Normal file
534
GestionGrupoSanchoToro/FicherosMaestros/ucCajas.xaml.vb
Normal file
@@ -0,0 +1,534 @@
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports System.Collections
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Linq.Dynamic
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
|
||||
|
||||
Public Class ucCajas
|
||||
|
||||
Private DatacontextEstablecido As Boolean
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
GridBusqueda = Me.gc
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
gc.ItemsSource = bd.cajas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa).OrderBy(Function(x) x.Descripcion).ToList
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Cajas"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "Cajas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "cajas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Caja"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
|
||||
Dim cj = DirectCast(Me.gc.CurrentItem, cajas)
|
||||
Dim id = cj.idCaja
|
||||
FuncionesDinamicas.AbrirAP(New ucCaja(id), OtrosParametros)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ucCajas_BotonNuevoPulsado() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucCaja(Nothing), OtrosParametros)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
'Public Class ucConciliacionBancaria
|
||||
'
|
||||
|
||||
' Dim bd As tscGrupoSanchoToro
|
||||
' Private WithEvents ApLineas As tsWPFCore.ApLineas
|
||||
' ' Private ListadoCajas As List(Of Integer)
|
||||
' Private DatosCargados As Boolean
|
||||
' Private TotalPagado As Double
|
||||
' Private TotalDevuelto As Double
|
||||
' Private TotalPagadoAgrupado As Double
|
||||
' Private TotalDevueltoAgrupado As Double
|
||||
' Private ApuntesAGuardar As List(Of Integer)
|
||||
' Private idCajs() As Integer
|
||||
' Private cajs As List(Of cajas)
|
||||
|
||||
|
||||
' Private Sub ApLineas_Cargado() Handles ApLineas.Cargado
|
||||
' Me.tv.AllowEditing = True
|
||||
' ' Me.gcSupervisado.AllowEditing = DevExpress.Utils.DefaultBoolean.True
|
||||
' Me.ApLineas.ContenedorL.btEliminar.IsVisible = False
|
||||
' Me.ApLineas.ContenedorL.btNuevo.IsVisible = False
|
||||
' Me.ApLineas.ContenedorL.btInvertir.IsVisible = False
|
||||
' Me.ApLineas.ContenedorL.btSeleccionar.IsVisible = False
|
||||
' Dim biguardar As DevExpress.Xpf.Bars.BarButtonItem
|
||||
' biguardar = New DevExpress.Xpf.Bars.BarButtonItem
|
||||
' biguardar.Name = "btGuardarConciliacion"
|
||||
' biguardar.Glyph = New BitmapImage(New Uri("pack://application:,,,/DevExpress.Images.v16.2;component/GrayScaleImages/Save/Save_16x16.png"))
|
||||
' biguardar.Hint = "Guardar"
|
||||
' biguardar.IsEnabled = True
|
||||
' Me.ApLineas.ContenedorL.BarraBotones.Items.Add(biguardar)
|
||||
' Dim ilGuardar As New DevExpress.Xpf.Bars.BarButtonItemLink()
|
||||
' ilGuardar.Name = "ilGuardar"
|
||||
' ilGuardar.BarItemName = biguardar.Name
|
||||
' Me.ApLineas.ContenedorL.BarraBotones.Bars(0).ItemLinks.Insert(0, ilGuardar)
|
||||
' AddHandler biguardar.ItemClick, AddressOf Guardar_ItemClick
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
' Private Sub ApLineas_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles ApLineas.Enlazar
|
||||
' 'Select Case Celda.Column.FieldName.ToLower
|
||||
' ' Case "numerorecibo"
|
||||
' Dim rec As Apuntes = Celda.RowData.Row
|
||||
' Dim ucf As New ucFactura
|
||||
' Dim dwi As dxwInicio = Window.GetWindow(Me)
|
||||
' If rec.NumeroRecibo IsNot Nothing Then
|
||||
' Comun.AbrirUcCL(ucf, dwi.grupodoc, Nothing, Me.ApLineas.dcfg, Me.ApLineas.dcn, 0, Me.ApLineas.dsc, Me.ApLineas.OtrosParametros, bd.recibos.First(Function(x) x.idrecibo = rec.NumeroRecibo).idFactura)
|
||||
' End If
|
||||
' ' End Select
|
||||
' End Sub
|
||||
|
||||
|
||||
' Public Sub EstableceDataContext(ByRef DataContext As Object, Optional BackGround As Boolean = False) Implements tsWPFCore.IApLineas.EstableceDataContext
|
||||
' Try
|
||||
' If Not DatosCargados Then
|
||||
' cajs = (From c In bd.cajas Where c.FechaBaja Is Nothing AndAlso c.enumeraciones.Codigo <> "TIPCAJ.METALICO" Order By c.Descripcion).ToList
|
||||
' For i = cajs.Count - 1 To 0 Step -1
|
||||
' If Comun.ObtienePermisos(bd, cajs(i).idPermiso, ApLineas.dsc.idUsuario).Otros = False Then
|
||||
' cajs.Remove(cajs(i))
|
||||
' End If
|
||||
' Next
|
||||
' If cajs.Count > 0 Then
|
||||
' If Comun.idCajaPredeterminada Is Nothing Then
|
||||
' If cajs.Count = 1 Then Comun.idCajaPredeterminada = cajs.First.idCaja
|
||||
' Else
|
||||
' If cajs.Where(Function(c) c.idCaja = Comun.idCajaPredeterminada).Count = 0 Then
|
||||
' Comun.idCajaPredeterminada = cajs.First.idCaja
|
||||
' End If
|
||||
' End If
|
||||
' Dim cj As cajas = (From c In bd.cajas Select c Where c.idCaja = Comun.idCajaPredeterminada).First
|
||||
' End If
|
||||
' idCajs = cajs.Select(Function(x) x.idCaja).ToArray
|
||||
' ' Me.cbCaja.ItemsSource = cajs
|
||||
' ' ListadoCajas = (From c In cajs Select c.idCaja).ToList
|
||||
' 'If Comun.idCajaPredeterminada IsNot Nothing Then
|
||||
' ' Me.cbCaja.EditValue = Comun.idCajaPredeterminada
|
||||
' 'Else
|
||||
' ' Me.cbCaja.EditValue = cajs.First
|
||||
' 'End If
|
||||
' End If
|
||||
' ' Me.teFechaFinal.EditValue = Now
|
||||
' ' Me.teFechaInicial.EditValue = Now
|
||||
|
||||
' DatosCargados = True
|
||||
' ObtieneApuntes()
|
||||
|
||||
' DataContext = Me.gc.DataContext
|
||||
|
||||
' Catch ex As Exception
|
||||
' DXMessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End Try
|
||||
' End Sub
|
||||
|
||||
' Public ReadOnly Property NombreTablaBase As String Implements tsWPFCore.IApLineas.NombreTablaBase
|
||||
' Get
|
||||
' Return ""
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public ReadOnly Property CampoIndice As String Implements IAplicacion.CampoIndice
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Private ReadOnly Property IAplicacion_NombreTablaBase As String Implements IAplicacion.NombreTablaBase
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public Sub Nuevo() Implements tsWPFCore.IApLineas.Nuevo
|
||||
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
' Public Function ObtieneRejilla() As tsWPFCore.tsGridControl Implements tsWPFCore.IApLineas.ObtieneRejilla
|
||||
' Return Me.gc
|
||||
' End Function
|
||||
|
||||
' Public Sub EstableceApLin(ApLin As tsWPFCore.ApLineas) Implements tsWPFCore.IApLineas.EstableceApLin
|
||||
' Me.ApLineas = ApLin
|
||||
' End Sub
|
||||
|
||||
' Public Function ObtieneContexto(dcn As tsUtilidades.Datos.DatosConexionCliente) As System.Data.Objects.ObjectContext Implements tsWPFCore.IApLineas.ObtieneContexto
|
||||
' bd = bdM3Academy.Utilidades.NuevaConexion(dcn.BasesDatos(0))
|
||||
' Return bd
|
||||
' End Function
|
||||
|
||||
' Public Function ObtienePermisos() As tsUtilidades.Permisos Implements tsWPFCore.IApLineas.ObtienePermisos
|
||||
' Return Comun.ObtienePermisos(Me.bd, "AP.CONCILIACIONBANCARIA", Me.ApLineas.dsc.idUsuario)
|
||||
' End Function
|
||||
|
||||
' Public Function ObtieneCampoIndice() As String Implements tsWPFCore.IApLineas.ObtieneCampoIndice
|
||||
' Return ""
|
||||
' End Function
|
||||
|
||||
|
||||
' 'Private Sub ApLineas_ImprimirPlantilla(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs, idPlantilla As Integer) Handles ApLineas.ImprimirPlantilla
|
||||
' ' Try
|
||||
' ' Dim ds As Object = ObtieneDataSource()
|
||||
' ' Informes.MuestraImpresos(bd, idPlantilla, ds, Me.ApLineas.GrupoDocumentos, tsWPFCore.ApCabLin.dm.DockController)
|
||||
' ' Catch EX As Exception
|
||||
' ' DXMessageBox.Show(EX.Message, "Atención", MessageBoxButton.OK)
|
||||
' ' End Try
|
||||
' 'End Sub
|
||||
|
||||
' Private Sub ObtieneApuntes()
|
||||
' Try
|
||||
' If DatosCargados Then
|
||||
' ApuntesAGuardar = New List(Of Integer)
|
||||
' Dim iNumeroApuntes As Integer
|
||||
' Dim ierecs As IEnumerable(Of recibos)
|
||||
' Dim recs As List(Of recibos)
|
||||
|
||||
' Dim lm As New List(Of Apuntes)
|
||||
|
||||
' Dim m As Apuntes
|
||||
' ' Dim idCaja As Integer? = DirectCast(Me.cbCaja.EditValue, Integer)
|
||||
' Dim dIngresosp, dGastosp As Double
|
||||
' If idCajs.Count > 0 Then
|
||||
' ierecs = (From r In bd.recibos Where idCajs.Contains(r.idCaja))
|
||||
' If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
' Dim dFi As Date = Me.teFechaInicial.EditValue
|
||||
' Dim fi As New DateTime(dFi.Year, dFi.Month, dFi.Day, 0, 0, 0)
|
||||
' ierecs = (From r In ierecs Where r.FechaPago >= dFi)
|
||||
' End If
|
||||
' If Me.teFechaFinal.EditValue IsNot Nothing Then
|
||||
' Dim dFf As Date = Me.teFechaFinal.EditValue
|
||||
' Dim ff As New DateTime(dFf.Year, dFf.Month, dFf.Day, 23, 59, 59)
|
||||
' ierecs = (From r In ierecs Where r.FechaPago <= dFf)
|
||||
' End If
|
||||
' If Not Me.cbIncluirSupervisados.IsChecked Then
|
||||
' ierecs = (From r In ierecs Where r.Supervisado = False)
|
||||
' End If
|
||||
' recs = ierecs.ToList
|
||||
' For Each r In recs
|
||||
' iNumeroApuntes += 1
|
||||
' m = New Apuntes
|
||||
' m.Caja = cajs.First(Function(x) x.idCaja = r.idCaja).Descripcion
|
||||
' If r.facturas.Mes IsNot Nothing Then
|
||||
' m.Descripcion = "Recibo de " & r.facturas.RazonSocial & " Mensualidad: " & tsUtilidades.Utilidades.MesCastellano(r.facturas.Mes Mod 100) & " " & (r.facturas.Mes \ 100).ToString
|
||||
' Else
|
||||
' m.Descripcion = "Recibo de " & r.facturas.RazonSocial
|
||||
' End If
|
||||
' m.Fecha = r.FechaPago.Date
|
||||
' m.ImporteEntrada = r.Importe
|
||||
' m.ImporteSalida = 0
|
||||
' m.NumeroRecibo = r.idrecibo
|
||||
' m.Tipo = TipoMovimiento.RECIBO
|
||||
' m.Usuario = If(r.usuarios Is Nothing, "", r.usuarios.Nombre)
|
||||
' m.idApunte = iNumeroApuntes
|
||||
' ' m.Supervisado = r.Supervisado
|
||||
' m.FechaSupervision = r.FechaSupervision
|
||||
' m.idMovimientoORecibo = r.idrecibo
|
||||
' lm.Add(m)
|
||||
' Next
|
||||
' dIngresosp = recs.Sum(Function(x) x.Importe)
|
||||
|
||||
|
||||
' ierecs = (From r In bd.recibos Where idCajs.Contains(r.idCaja) AndAlso r.FechaDevolucion IsNot Nothing)
|
||||
' If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
' Dim dFi As Date = Me.teFechaInicial.EditValue
|
||||
' Dim fi As New DateTime(dFi.Year, dFi.Month, dFi.Day, 0, 0, 0)
|
||||
' ierecs = (From r In ierecs Where r.FechaDevolucion >= dFi)
|
||||
' End If
|
||||
' If Me.teFechaFinal.EditValue IsNot Nothing Then
|
||||
' Dim dFf As Date = Me.teFechaFinal.EditValue
|
||||
' Dim ff As New DateTime(dFf.Year, dFf.Month, dFf.Day, 23, 59, 59)
|
||||
' ierecs = (From r In ierecs Where r.FechaDevolucion <= dFf)
|
||||
' End If
|
||||
' If Not Me.cbIncluirSupervisados.IsChecked Then
|
||||
' ierecs = (From r In ierecs Where r.DevolucionSupervisada = False)
|
||||
' End If
|
||||
' recs = ierecs.ToList
|
||||
' For Each r In recs
|
||||
' iNumeroApuntes += 1
|
||||
' m = New Apuntes
|
||||
' m.Caja = cajs.First(Function(x) x.idCaja = r.idCaja).Descripcion
|
||||
' If r.facturas.Mes IsNot Nothing Then
|
||||
' m.Descripcion = "Devolución Recibo de " & r.facturas.RazonSocial & " Mensualidad: " & tsUtilidades.Utilidades.MesCastellano(r.facturas.Mes Mod 100) & " " & (r.facturas.Mes \ 100).ToString
|
||||
' Else
|
||||
' m.Descripcion = "Devolución Recibo de " & r.facturas.RazonSocial
|
||||
' End If
|
||||
' m.Fecha = r.FechaDevolucion.Value.Date
|
||||
' m.ImporteEntrada = 0
|
||||
' m.ImporteSalida = r.Importe
|
||||
' m.NumeroRecibo = r.idrecibo
|
||||
' m.Tipo = TipoMovimiento.DEVOLUCION_RECIBO
|
||||
' m.Usuario = If(r.usuarios1 Is Nothing, "", r.usuarios1.Nombre)
|
||||
' m.idApunte = iNumeroApuntes
|
||||
' ' m.Supervisado = r.DevolucionSupervisada
|
||||
' m.FechaSupervision = r.FechaSupervisionDevolucion
|
||||
' m.idMovimientoORecibo = r.idrecibo
|
||||
' lm.Add(m)
|
||||
' Next
|
||||
' dGastosp = recs.Sum(Function(x) x.Importe)
|
||||
|
||||
' Dim iemovs As IEnumerable(Of movimientoscaja)
|
||||
' Dim movs As List(Of movimientoscaja)
|
||||
' iemovs = (From mv In bd.movimientoscaja Where idCajs.Contains(mv.idCaja) AndAlso mv.Tipo <> TipoMovimiento.APERTURA AndAlso mv.Tipo <> TipoMovimiento.CIERRE)
|
||||
|
||||
' ' ierecs = (From r In bd.recibos Where r.idCaja = idCaja AndAlso r.FechaDevolucion IsNot Nothing)
|
||||
' If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
' Dim dFi As Date = Me.teFechaInicial.EditValue
|
||||
' Dim fi As New DateTime(dFi.Year, dFi.Month, dFi.Day, 0, 0, 0)
|
||||
' iemovs = (From mv In iemovs Where mv.Fecha >= dFi)
|
||||
' End If
|
||||
' If Me.teFechaFinal.EditValue IsNot Nothing Then
|
||||
' Dim dFf As Date = Me.teFechaFinal.EditValue
|
||||
' Dim ff As New DateTime(dFf.Year, dFf.Month, dFf.Day, 23, 59, 59)
|
||||
' iemovs = (From mv In iemovs Where mv.Fecha <= dFf)
|
||||
' End If
|
||||
' If Not Me.cbIncluirSupervisados.IsChecked Then
|
||||
' iemovs = (From mv In iemovs Where mv.Supervisado = False)
|
||||
' End If
|
||||
' movs = iemovs.ToList
|
||||
' For Each mc In movs
|
||||
' iNumeroApuntes += 1
|
||||
' m = New Apuntes
|
||||
' m.Caja = cajs.First(Function(x) x.idCaja = mc.idCaja).Descripcion
|
||||
' m.Descripcion = mc.Descripcion
|
||||
' m.Fecha = mc.Fecha.Value.Date
|
||||
' m.ImporteSalida = mc.ImporteSalida
|
||||
' m.ImporteEntrada = mc.ImporteEntrada
|
||||
' m.Tipo = mc.Tipo
|
||||
' 'Select Case mc.Tipo
|
||||
' ' Case "INGRESO"
|
||||
' ' m.Tipo = TipoMovimiento.INGRESO
|
||||
' ' Case "GASTO"
|
||||
' ' m.Tipo = TipoMovimiento.GASTO
|
||||
' ' Case "APERTURA"
|
||||
' ' m.Tipo = TipoMovimiento.APERTURA
|
||||
' ' Case "CIERRE"
|
||||
' ' m.Tipo = TipoMovimiento.CIERRE
|
||||
' ' Case "DEVOLUCION RECIBO"
|
||||
' ' m.Tipo = TipoMovimiento.DEVOLUCION_RECIBO
|
||||
' ' Case "TRASPASO"
|
||||
' ' m.Tipo = TipoMovimiento.TRASPASO
|
||||
' 'End Select
|
||||
' m.Usuario = mc.usuarios.Nombre
|
||||
' m.idApunte = iNumeroApuntes
|
||||
' ' m.Supervisado = mc.Supervisado
|
||||
' m.FechaSupervision = mc.FechaSupervision
|
||||
' m.idMovimientoORecibo = mc.idMovimiento
|
||||
' lm.Add(m)
|
||||
' Next
|
||||
' dIngresosp += movs.Sum(Function(x) x.ImporteEntrada)
|
||||
' dGastosp += movs.Sum(Function(x) x.ImporteSalida)
|
||||
' If idCajs.Count > 0 Then
|
||||
' recs = (From r In bd.recibos Where idCajs.Contains(r.idCaja) AndAlso r.idMovimientoCierre Is Nothing).ToList
|
||||
' Dim imprecs As Double? = recs.Sum(Function(r) r.Importe)
|
||||
' Dim recdevs = (From r In bd.recibos Where idCajs.Contains(r.idCaja) AndAlso r.idMovimientoCierreDevolucion Is Nothing AndAlso r.FechaDevolucion IsNot Nothing).ToList
|
||||
' Dim imprecdevs As Double? = recdevs.Sum(Function(r) r.Importe)
|
||||
' Dim mvs = (From mv In bd.movimientoscaja Where idCajs.Contains(mv.idCaja) AndAlso mv.idMovimientoCierre Is Nothing AndAlso mv.Tipo <> TipoMovimiento.CIERRE)
|
||||
' Dim dImporteMovEnt As Double? = mvs.Sum(Function(mv) mv.ImporteEntrada)
|
||||
' Dim dImporteMovSal As Double? = mvs.Sum(Function(mv) mv.ImporteSalida)
|
||||
' Dim dIngresos As Double = If(dImporteMovEnt, 0) + If(imprecs, 0)
|
||||
' Dim dGastos As Double = If(dImporteMovSal, 0) + If(imprecdevs, 0)
|
||||
' 'Me.teSaldoActual.EditValue = dIngresos - dGastos
|
||||
' 'Me.teIngresos.EditValue = dIngresosp
|
||||
' 'Me.teGastos.EditValue = dGastosp
|
||||
' Else
|
||||
' 'Me.teSaldoActual.EditValue = 0
|
||||
' 'Me.teIngresos.EditValue = 0
|
||||
' 'Me.teGastos.EditValue = 0
|
||||
' End If
|
||||
' lm = lm.OrderBy(Function(x) x.Fecha).ThenBy(Function(x) x.idApunte).ToList
|
||||
' Else
|
||||
' Throw New Exception("Seleccione primero la caja")
|
||||
' End If
|
||||
' Me.gc.ItemsSource = lm
|
||||
|
||||
|
||||
|
||||
' For i = 0 To Me.gc.VisibleRowCount - 1
|
||||
' Dim rw = gc.GetRowHandleByVisibleIndex(i)
|
||||
' MarcaSeleccionados(rw)
|
||||
' Next
|
||||
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' Throw New Exception(ex.Message, ex)
|
||||
' End Try
|
||||
' End Sub
|
||||
' Private Sub MarcaSeleccionados(rw As Integer)
|
||||
' If Not gc.IsGroupRowHandle(rw) Then
|
||||
' Dim ap As Apuntes = gc.GetRow(rw)
|
||||
' If ap.FechaSupervision.HasValue Then
|
||||
' gc.SelectItem(rw)
|
||||
' End If
|
||||
' Else
|
||||
' For i = 0 To gc.GetChildRowCount(rw) - 1
|
||||
' MarcaSeleccionados(gc.GetChildRowHandle(rw, i))
|
||||
' Next
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Sub teFechaInicial_EditValueChanged(sender As Object, e As DevExpress.Xpf.Editors.EditValueChangedEventArgs) Handles teFechaInicial.EditValueChanged
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
' Private Sub teFechaFinal_EditValueChanged(sender As Object, e As DevExpress.Xpf.Editors.EditValueChangedEventArgs) Handles teFechaFinal.EditValueChanged
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
|
||||
|
||||
' Private Sub cbIncluirSupervisados_Checked(sender As Object, e As RoutedEventArgs)
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
' Private Sub cbIncluirSupervisados_Unchecked(sender As Object, e As RoutedEventArgs)
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
' Private Sub Guardar_ItemClick(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs)
|
||||
' tv.CommitEditing()
|
||||
|
||||
' ' Dim aps As List(Of Apuntes) = Me.gc.ItemsSource
|
||||
' Dim ahora As DateTime = Comun.AhoraMysql(bd)
|
||||
' gc.FilterCriteria = Nothing
|
||||
|
||||
' For i = 0 To Me.gc.VisibleRowCount - 1
|
||||
' Dim rw = gc.GetRowHandleByVisibleIndex(i)
|
||||
' If Not gc.IsGroupRowHandle(rw) Then
|
||||
' EstableceConciliacion(rw, ahora)
|
||||
' Else
|
||||
' For j = 0 To gc.GetChildRowCount(rw) - 1
|
||||
' EstableceConciliacion(gc.GetChildRowHandle(rw, j), ahora)
|
||||
' Next
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
' bd.GuardarCambios()
|
||||
' EstableceDataContext(Me.DataContext)
|
||||
' End Sub
|
||||
|
||||
' Private Sub EstableceConciliacion(rw As Integer, ahora As DateTime)
|
||||
' Dim ap As Apuntes
|
||||
' Dim r As recibos
|
||||
' Dim m As movimientoscaja
|
||||
|
||||
' If Not gc.IsGroupRowHandle(rw) Then
|
||||
' ap = gc.GetRow(rw)
|
||||
' Select Case ap.Tipo
|
||||
' Case TipoMovimiento.RECIBO
|
||||
' r = bd.recibos.First(Function(x) x.idrecibo = ap.idMovimientoORecibo)
|
||||
' If Me.tv.IsRowSelected(rw) Then
|
||||
' If Not r.Supervisado Then
|
||||
' r.Supervisado = True
|
||||
' r.FechaSupervision = ahora
|
||||
' End If
|
||||
' Else
|
||||
' If r.Supervisado Then
|
||||
' r.Supervisado = False
|
||||
' r.FechaSupervision = Nothing
|
||||
' End If
|
||||
' End If
|
||||
' Case TipoMovimiento.DEVOLUCION_RECIBO
|
||||
' r = bd.recibos.First(Function(x) x.idrecibo = ap.idMovimientoORecibo)
|
||||
' If Me.tv.IsRowSelected(rw) Then
|
||||
' If Not r.DevolucionSupervisada Then
|
||||
' r.DevolucionSupervisada = True
|
||||
' r.FechaSupervisionDevolucion = ahora
|
||||
' End If
|
||||
' Else
|
||||
' If r.DevolucionSupervisada Then
|
||||
' r.DevolucionSupervisada = False
|
||||
' r.FechaSupervisionDevolucion = Nothing
|
||||
' End If
|
||||
' End If
|
||||
' Case Else
|
||||
' m = bd.movimientoscaja.First(Function(x) x.idMovimiento = ap.idMovimientoORecibo)
|
||||
' If Me.tv.IsRowSelected(rw) Then
|
||||
' If Not m.Supervisado Then
|
||||
' m.Supervisado = True
|
||||
' m.FechaSupervision = ahora
|
||||
' End If
|
||||
' Else
|
||||
' If m.Supervisado Then
|
||||
' m.Supervisado = False
|
||||
' m.FechaSupervision = Nothing
|
||||
' End If
|
||||
' End If
|
||||
' End Select
|
||||
|
||||
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
199
GestionGrupoSanchoToro/FicherosMaestros/ucProducto.xaml
Normal file
199
GestionGrupoSanchoToro/FicherosMaestros/ucProducto.xaml
Normal file
@@ -0,0 +1,199 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucProducto"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
</Style>
|
||||
<Style x:Key="RejillaAnidadaNietaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="LightGreen" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos Producto" x:Name="lgDetalle" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="1250" HorizontalAlignment="Left">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<tsWPF:tsLayoutItem Label="Código:" Width="240">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="2" EditValue="{Binding Codigo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Descripción:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" Unico="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Descripcion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" x:Name="teNIF" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Tipo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipo" ValueMember="Valor" DisplayMember="Descripcion" EditValue="{Binding Tipo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Baja:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaBaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Observaciones:">
|
||||
<dxe:TextEdit EditValue="{Binding Observaciones, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="10" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<dxlc:LayoutGroup Header="Tarifas" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch" ItemLabelsAlignment="Local">
|
||||
<dxlc:LayoutGroup Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Precio:">
|
||||
<dxe:TextEdit TabIndex="11" Mask="c4" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding PrecioVenta, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Precio Costo:">
|
||||
<dxe:TextEdit TabIndex="13" Mask="c4" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding UltimoPrecioCompra, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
|
||||
<dx:DXTabControl Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Stocks">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Descglose por almacenes" View="GroupBox">
|
||||
<tsWPF:tsGridControl x:Name="gcStocksAlmacenes" NombreTablaBase="desgloseproductos" TabIndex="41">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="false" x:Name="tvStocksAlmacenes" IsDetailButtonVisibleBinding="{Binding Row.ContieneHijos}">
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Almacen" Header="Almacén" IsSmart="True" Width="450" SoloLectura="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="TipoAlmacen" Header="Tipo Almacén" IsSmart="True" Width="200" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Unidades" IsSmart="True" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
</dxg:GridControl.Columns>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
|
||||
<!--<dx:DXTabItem Header="Albaranes en los que aparece">
|
||||
<tsWPF:tsGridControl x:Name="gcAlbaranes" TabIndex="43">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowSearchPanelMode="Always" ShowTotalSummary="True" x:Name="tvProductosAoV" ShowGroupFooters="True" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="NumeroAlbaran" Header="Nº Albarán" IsSmart="True" Width="120" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranes.Fecha" Header="Fecha" IsSmart="True" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="AlmacenOrigen" Header="Almacén Origen" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="AlmacenDestino" Header="Almacén Destino" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="Cantidad" Header="Cantidad" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Entidad" Header="Cliente/Proveedor" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranes.DescripcionEvento" Header="Evento" Width="300" />
|
||||
<dxg:GridColumn FieldName="EsVenta" IsSmart="True" Width="60">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Facturas en las que aparece">
|
||||
<tsWPF:tsGridControl x:Name="gcFacturas" TabIndex="43">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowSearchPanelMode="Always" ShowTotalSummary="True" x:Name="tvFacturas" ShowGroupFooters="True" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="NumeroFactura" Header="Nº Factura" IsSmart="True" Width="120" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="idFacturaNavigation.Fecha" Header="Fecha" IsSmart="True" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="AlmacenOrigen" Header="Almacén Origen" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="AlmacenDestino" Header="Almacén Destino" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="Cantidad" Header="Cantidad" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Entidad" Header="Cliente/Proveedor" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranes.DescripcionEvento" Header="Evento" Width="300" />
|
||||
<dxg:GridColumn FieldName="EsVenta" IsSmart="True" Width="60">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Registro de cambios">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="45">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaHora" Header="Fecha Hora Cambio">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Usuario" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>-->
|
||||
</dx:DXTabControl>
|
||||
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
309
GestionGrupoSanchoToro/FicherosMaestros/ucProducto.xaml.vb
Normal file
309
GestionGrupoSanchoToro/FicherosMaestros/ucProducto.xaml.vb
Normal file
@@ -0,0 +1,309 @@
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.Collections
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports bdGrupoSanchoToro.db.productos
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
Public Class ucProducto
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idproducto As Nullable(Of Integer)
|
||||
Friend idLog As Integer?
|
||||
Dim ra As productos
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
If idLog.HasValue Then
|
||||
Try
|
||||
Dim log = bd.logs.First(Function(x) x.idLog = idLog)
|
||||
ra = tsUtilidades.Utilidades.DeserializarSinErrores(log.Log, GetType(productos))
|
||||
If ra.idUsuarioCreador.HasValue Then ra.idUsuarioCreadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioCreador.Value)
|
||||
If ra.idUsuarioModificador.HasValue Then ra.idUsuarioModificadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioModificador.Value)
|
||||
If bd.logs.Any(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ARTICULOS") Then
|
||||
Dim entspol = bd.logs.First(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ARTICULOS")
|
||||
Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(entspol.Log, GetType(List(Of articulos)))
|
||||
For Each d In ld
|
||||
ra.articulos.Add(d)
|
||||
Next
|
||||
End If
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
Catch EX As Exception
|
||||
Throw New Exception("No ha sido posible mostrar el registro del cambio (id " & idLog.Value.ToString & ").", EX)
|
||||
End Try
|
||||
Else
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo OrElse _idproducto Is Nothing OrElse FuerzaNuevo Then
|
||||
ra = New productos
|
||||
ra.TotalUnidades = 0
|
||||
ra.UnidadesVendidas = 0
|
||||
ra.UnidadesAlquiladas = 0
|
||||
ra.UnidadesAveriadas = 0
|
||||
ra.UnidadesDesechadas = 0
|
||||
ra.FacturarComoVentaPorDefecto = False
|
||||
Me.DataContext = ra
|
||||
_idproducto = Nothing
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.productos.First(Function(x) x.idProducto = _idproducto.Value)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
End If
|
||||
' Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idProducto AndAlso x.Aplicacion = "PRODUCTOS").ToList
|
||||
|
||||
'Me.gcServicios.ItemsSource = ra.DesgloseServicios
|
||||
If ra.Tipo = TipoProductoEnum.PRODUCTO Then
|
||||
Me.gcStocksAlmacenes.ItemsSource = ObtieneISAlmacenes()
|
||||
Else
|
||||
Me.gcStocksAlmacenes.ItemsSource = Nothing
|
||||
End If
|
||||
Me.DataContext = ra
|
||||
|
||||
' gcArticulos.ItemsSource = ra.articulos
|
||||
|
||||
If Me.ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing Then
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "AÑADE DESGLOSE DE PRODUCTOS (F10)"})
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
End If
|
||||
|
||||
Return NuevoEstado
|
||||
|
||||
End Function
|
||||
Private Sub ucAlbaranEntrega_TeclaFuncionPulsada(sender As Object, e As KeyEventArgs) Handles Me.TeclaFuncionPulsada
|
||||
Select Case e.Key
|
||||
Case Key.F12
|
||||
'ValidaControlObjetoActual()
|
||||
'ucAlbaranEntrega_EjecutarAccion(Nothing, Nothing, 2)
|
||||
Case Key.F11
|
||||
'ValidaControlObjetoActual()
|
||||
'ucAlbaranEntrega_EjecutarAccion(Nothing, Nothing, 3)
|
||||
|
||||
Case Key.System
|
||||
Select Case e.SystemKey
|
||||
Case Key.F10
|
||||
ValidaControlObjetoActual()
|
||||
ucProducto_EjecutarAccion(Nothing, Nothing, 1)
|
||||
e.Handled = True
|
||||
End Select
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
Private Function ObtieneISAlmacenes() As List(Of stocks)
|
||||
Dim stact = bd.stocks.Where(Function(x) x.idProducto = ra.idProducto).ToList
|
||||
Dim alms = bd.almacenes.Where(Function(x) x.FechaBaja.HasValue = False).ToList
|
||||
For Each al In alms
|
||||
If stact.Any(Function(x) x.idAlmacen = al.idAlmacen) = False Then
|
||||
Dim ns As New stocks
|
||||
With ns
|
||||
ns.idProductoNavigation = ra
|
||||
ns.idAlmacenNavigation = al
|
||||
ns.Unidades = 0
|
||||
End With
|
||||
bd.stocks.Add(ns)
|
||||
stact.Add(ns)
|
||||
End If
|
||||
Next
|
||||
Return stact.OrderBy(Function(x) x.idAlmacenNavigation.Descripcion).ToList
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "productos"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If idLog.HasValue Then
|
||||
Return "Producto. R.C.:" & idLog.ToString
|
||||
Else
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "Producto.Nuevo"
|
||||
Else
|
||||
Return "Producto." & DirectCast(Me.DataContext, productos).idProducto.ToString
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Producto"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idProducto As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idproducto = idProducto
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Try
|
||||
|
||||
Dim idprs = ra.articulos.Where(Function(x) x.idProveedor.HasValue).Select(Function(x) x.idProveedor.Value).ToArray
|
||||
Me.cbTipo.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.productos.TipoProductoEnum)).ToList
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
If idLog.HasValue Then
|
||||
Dim pr As productos = Me.DataContext
|
||||
Me.docpanel.Caption = "R.C. Producto " & pr.idProducto
|
||||
Else
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Me.docpanel.Caption = "Producto " & ra.Descripcion
|
||||
Me.docpanel.Tag = "producto." & ra.idProducto.ToString
|
||||
Else
|
||||
Me.docpanel.Caption = "Producto Nuevo"
|
||||
Me.docpanel.Tag = "producto.Nuevo"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucProductos)
|
||||
'Dim tmp = bd.productos.Where(Function(x) x.idProducto = 7).First.ListaAscendientes
|
||||
'Dim tmp2 = bd.productos.Where(Function(x) x.idProducto = 7).First.NivelMaximoAscendientes
|
||||
'Dim tmp3 = bd.productos.Where(Function(x) x.idProducto = 1).First.NivelMaximoDescendientes
|
||||
'Debug.Write(tmp.Count)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ucProducto_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
'Case "idlog"
|
||||
' Dim log As logs = gcLogs.CurrentItem
|
||||
' Dim id As Integer = log.idLog
|
||||
' Dim uc As New ucProducto
|
||||
' uc.idLog = log.idLog
|
||||
' FuncionesDinamicas.AbrirAP(uc, OtrosParametros)
|
||||
Case "almacen"
|
||||
Dim st As stocks = Celda.Row
|
||||
FuncionesDinamicas.AbrirAP(New ucAlmacen(st.idAlmacen), OtrosParametros)
|
||||
'Case "numeroalbaran"
|
||||
' Dim al As detallesalbaranes = Celda.Row
|
||||
' FuncionesDinamicas.AbrirAP(New ucAlbaran(al.idAlbaran), OtrosParametros)
|
||||
Case "entidad"
|
||||
Dim da As detallesalbaranes = Celda.Row
|
||||
If da.idAlbaranNavigation.idEntidad.HasValue Then FuncionesDinamicas.AbrirAP(New ucEntidad(da.idAlbaranNavigation.idEntidad.Value), OtrosParametros)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ucProducto_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado
|
||||
'Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
'If Not pts Is Nothing Then
|
||||
' Select Case pts.NombreCampo.ToLower
|
||||
' Case "stockinicial01", "stockinicial02", "stockinicial03", "stockinicial04", "stockinicial05"
|
||||
' ra.ActualizaStockActual()
|
||||
' ra.ActualizaStockTotal()
|
||||
' End Select
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private RecalcularStocks As Boolean
|
||||
'Private Sub ucProducto_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
' '
|
||||
' ' Esto se hace para evitar error duplicate entry en el intercambio de numero de series
|
||||
' '
|
||||
' Try
|
||||
' Dim bdtmp = tscGrupoSanchoToro.NuevoContexto()
|
||||
' Dim arts = bdtmp.articulos.Where(Function(x) x.idProducto = ra.idProducto).ToList
|
||||
' For Each art In arts
|
||||
' If ra.articulos.Any(Function(x) x.idArticulo <> art.idArticulo AndAlso art.CodigoArticulo = x.CodigoArticulo) Then
|
||||
' art.CodigoArticulo = Nothing
|
||||
' End If
|
||||
' Next
|
||||
' 'If Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
' ' Dim raant = bdtmp.productos.First(Function(x) x.idProducto = ra.idProducto)
|
||||
' ' If (ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse ra.Tipo <= TipoProductoEnum.OTROS) AndAlso
|
||||
' ' Not (raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse raant.Tipo <= TipoProductoEnum.OTROS) Then
|
||||
' ' RecalcularStocks = True
|
||||
' ' Else
|
||||
' ' If Not (ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse ra.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse ra.Tipo <= TipoProductoEnum.OTROS) AndAlso
|
||||
' ' (raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_TRIBUNA OrElse raant.Tipo = TipoProductoEnum.ELEMENTO_FINAL_CARPA OrElse raant.Tipo <= TipoProductoEnum.OTROS) Then
|
||||
' ' For i = ra.stocks.Count - 1 To 0
|
||||
' ' bd.stocks.Remove(ra.stocks(i))
|
||||
' ' Next
|
||||
' ' ra.TotalUnidades = 0
|
||||
' ' ra.UnidadesInicialesOFabricadas = 0
|
||||
' ' ra.UnidadesCompradas = 0
|
||||
' ' ra.UnidadesVendidas = 0
|
||||
' ' ra.UnidadesAlquiladas = 0
|
||||
' ' ra.UnidadesAveriadas = 0
|
||||
' ' ra.UnidadesDesechadas = 0
|
||||
' ' ra.UnidadesSubAlquiladas = 0
|
||||
' ' End If
|
||||
' ' End If
|
||||
' 'End If
|
||||
|
||||
' bdtmp.GuardarCambios()
|
||||
' Catch ex As Exception
|
||||
' Throw New Exception(ex.Message, ex)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
Private Sub ucProducto_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado
|
||||
If idLog.HasValue Then
|
||||
EstableceSoloLectura()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ucProducto_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
'Select Case idAccion
|
||||
' Case 1 ' AÑADIR PRODUCTOS AL DESGLOSE
|
||||
|
||||
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ucProducto_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
Dim hte As New Hashtable
|
||||
ra.idEmpresa = EmpresaActual.idEmpresa
|
||||
Dim almexi = bd.productos.FirstOrDefault(Function(x) x.idProducto <> ra.idProducto AndAlso x.Descripcion = ra.Descripcion AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
If almexi IsNot Nothing Then
|
||||
hte.Add("ALMACENAR-PRODUCTO_DUPLIADO", "Producto Duplicado")
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
120
GestionGrupoSanchoToro/FicherosMaestros/ucProductos.xaml
Normal file
120
GestionGrupoSanchoToro/FicherosMaestros/ucProductos.xaml
Normal file
@@ -0,0 +1,120 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:bdGrupoSanchoToro="clr-namespace:bdGrupoSanchoToro;assembly=bdGrupoSanchoToro" x:Class="ucProductos"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Búsqueda Rápida" Orientation="Vertical" x:Name="BusquedaRapida">
|
||||
<dxlc:LayoutGroup Width="600" HorizontalAlignment="Left" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsLayoutItem Label="Incluir Bajas:" HorizontalContentAlignment="Left" TabIndex="1" >
|
||||
<dxe:CheckEdit x:Name="cbIncluirBajas" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Búsqueda:" FontWeight="Bold" >
|
||||
<dxe:TextEdit x:Name="teBusqueda" TabIndex="1" FontWeight="Normal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="BtBuscar_Click" IsDefault="True" TabIndex="1" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutItem Label="Campos de búsqueda:">
|
||||
<Border BorderThickness="1" BorderBrush="Black" >
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="tbCamposBusqueda" Text="Descripción, id,Codigo"/>
|
||||
<TextBlock Margin="20,0,0,0" Text="(En Blanco Muestra Todos)" FontWeight="Bold" ></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</dxlc:LayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gc" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable"/>
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="Descripción" Width="400" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}"/>
|
||||
<dxg:GridColumn FieldName="Codigo" Header="Código" Width="100" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="DescripcionTipo" Header="Tipo" Width="250" IsSmart="True" />
|
||||
<!--<dxg:GridColumn FieldName="TotalUnidades" Width="100" IsSmart="True">
|
||||
<dxg:GridColumn.CellStyle>
|
||||
<Style TargetType="dxg:LightweightCellEditor">
|
||||
<Setter Property="TextElement.FontWeight" Value="Bold"/>
|
||||
</Style>
|
||||
</dxg:GridColumn.CellStyle>
|
||||
<dxg:GridColumn.HeaderStyle>
|
||||
<Style TargetType="dxg:GridColumnHeader">
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
</Style>
|
||||
</dxg:GridColumn.HeaderStyle>
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>-->
|
||||
<!--<dxg:GridColumn FieldName="UnidadesDisponibles" Width="150" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
<dxg:GridColumn.CellStyle>
|
||||
<Style TargetType="dxg:LightweightCellEditor">
|
||||
<Setter Property="TextElement.FontWeight" Value="Bold"/>
|
||||
</Style>
|
||||
</dxg:GridColumn.CellStyle>
|
||||
<dxg:GridColumn.HeaderStyle>
|
||||
<Style TargetType="dxg:GridColumnHeader">
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
</Style>
|
||||
</dxg:GridColumn.HeaderStyle>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="UnidadesCompradas" Width="130" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="UnidadesSubAlquiladas" Header="Unidades Subalquiladas" Width="150" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="UnidadesAlquiladas" Width="130" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="UnidadesVendidas" Width="130" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="UnidadesAveriadas" Width="130" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<dxg:GridColumn FieldName="UnidadesDesechadas" Width="130" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>-->
|
||||
<dxg:GridColumn FieldName="Observaciones" Width="300" IsSmart="True"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView ShowSearchPanelMode="Always" ShowGroupPanel="True" />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
|
||||
192
GestionGrupoSanchoToro/FicherosMaestros/ucProductos.xaml.vb
Normal file
192
GestionGrupoSanchoToro/FicherosMaestros/ucProductos.xaml.vb
Normal file
@@ -0,0 +1,192 @@
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports System.Collections
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Linq.Dynamic
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
Imports System.Linq.Dynamic.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports Microsoft.Win32
|
||||
Imports DevExpress.Spreadsheet
|
||||
Imports bdGrupoSanchoToro.db.productos
|
||||
Imports System.Drawing
|
||||
|
||||
Public Class ucProductos
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
'Public Sub New(ListadoFiltrado As List(Of productos), TextoBusqueda As String, TituloCamposBusqueda As String, CamposBusquedaAlfabeticos() As String, CamposBusquedaNumericos() As String)
|
||||
|
||||
' InitializeComponent()
|
||||
' Me.teBusqueda.Text = TextoBusqueda
|
||||
' ' Me.tbCamposBusqueda.Text = TituloCamposBusqueda
|
||||
' _CamposBusquedaAlfabeticos = CamposBusquedaAlfabeticos
|
||||
' _CamposBusquedaNumericos = CamposBusquedaNumericos
|
||||
' _TextoBusqueda = TextoBusqueda
|
||||
|
||||
'End Sub
|
||||
Private _CamposBusquedaNumericos() As String = {"idProducto"}
|
||||
Private _CamposBusquedaAlfabeticos() As String = {"Descripcion", "Codigo"}
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
'Public Overrides ReadOnly Property CampoIndice As String
|
||||
' Get
|
||||
' Return ""
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.GridSeleccion = Me.gc
|
||||
Me.HabilitarRefresco = True
|
||||
'ContenedorAplicacion.btGuardar.IsVisible = False
|
||||
'ContenedorAplicacion.siEstado.IsVisible = False
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
If Refrescar OrElse Background Then ObtieneproductosAsync(bd, Background)
|
||||
'If Me.ContenedorAplicacion.cbAcciones.ItemsSource Is Nothing Then
|
||||
' Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
' Acciones.Add(New Accion With {
|
||||
' .idAccion = 1,
|
||||
' .Descripcion = "CORREGIR STOCK"})
|
||||
' Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
' Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
'End If
|
||||
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Productos"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "Productos"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "productos"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Productos"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
Private Sub Nuevo() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucProducto, OtrosParametros)
|
||||
End Sub
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
|
||||
Dim pr As productos = gc.CurrentItem
|
||||
'If pr.Tipo = TipoProductoEnum.TRIBUNA Then
|
||||
' FuncionesDinamicas.AbrirAP(New ucProductoTribuna(pr.idProducto), OtrosParametros)
|
||||
'Else
|
||||
FuncionesDinamicas.AbrirAP(New ucProducto(pr.idProducto), OtrosParametros)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar
|
||||
|
||||
End Sub
|
||||
Public Function Obtieneproductos(TextoBusqueda As String, IncluirBajas As Boolean) As List(Of productos)
|
||||
|
||||
Dim iqPr = bd.productos.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
If IncluirBajas Then iqPr = iqPr.Where(Function(x) x.FechaBaja Is Nothing).OrderBy(Function(x) x.Descripcion)
|
||||
Dim rs As List(Of productos)
|
||||
Do
|
||||
Dim iNumExc As Integer = 0
|
||||
Try
|
||||
If TextoBusqueda.Trim <> "" Then
|
||||
If TextoBusqueda <> "" Then
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Me._CamposBusquedaNumericos, Me._CamposBusquedaAlfabeticos, Nothing)
|
||||
iqPr = iqPr.Where(ExpresionBusqueda)
|
||||
End If
|
||||
End If
|
||||
rs = iqPr.OrderBy(Function(x) x.Descripcion).ToList
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
iNumExc += 1
|
||||
If iNumExc > 3 Then
|
||||
rs = Nothing
|
||||
Exit Do
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
Return rs
|
||||
End Function
|
||||
|
||||
Public Async Sub ObtieneproductosAsync(bd As tscGrupoSanchoToro, Background As Boolean)
|
||||
Try
|
||||
Dim rs As New List(Of productos)
|
||||
Dim Busqueda = tsEFCore8.Extensiones.ObjetoNothingAVacio(Me.teBusqueda.EditValue)
|
||||
Dim IncluirBajas = Me.cbIncluirBajas.IsChecked
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
rs = Obtieneproductos(Busqueda, IncluirBajas)
|
||||
End Sub)
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando productos ...")
|
||||
rs = Obtieneproductos(Busqueda, IncluirBajas)
|
||||
End If
|
||||
|
||||
gc.ItemsSource = rs
|
||||
DataContext = rs
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
Me.ContenedorAplicacion.IsEnabled = True
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BtBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtieneproductosAsync(bd, False)
|
||||
End Sub
|
||||
|
||||
Private Sub ucProductos_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
teBusqueda.SelectAll()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
116
GestionGrupoSanchoToro/FuncionesDinamicas.vb
Normal file
116
GestionGrupoSanchoToro/FuncionesDinamicas.vb
Normal file
@@ -0,0 +1,116 @@
|
||||
Imports tsWPFCore
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db
|
||||
|
||||
Public Class FuncionesDinamicas
|
||||
|
||||
Public Shared Function AbrirAplicacion(Tipo As String, Parametros As String, OtrosParametros As String) As Object
|
||||
Dim t As Type = tsUtilidades.Utilidades.FindType(Tipo)
|
||||
Dim uc As tsUserControl = t.GetConstructor(New System.Type() {}).Invoke(New Object() {})
|
||||
uc.AbreAplicacionEnPestaña(Comun.dg,, AddressOf Diseño, AddressOf ErrorNoControladoAp, OtrosParametros)
|
||||
Return uc
|
||||
End Function
|
||||
|
||||
|
||||
Private Shared Sub DelegadoEliminarPlantilla(idDiseño As Integer)
|
||||
Dim bd = tscGrupoSanchoToro.NuevoContexto
|
||||
bd.Remove(bd.ficherosconfiguracion.First(Function(x) x.idFicheroConfiguracion = idDiseño))
|
||||
bd.GuardarCambios()
|
||||
End Sub
|
||||
|
||||
|
||||
Friend Shared Sub ErrorNoControladoAp(Aplicacion As tsUserControl, ex As Exception)
|
||||
Comun.GeneraRegistroCorreoExcepcion(Nothing, ex, Aplicacion.GetType.ToString)
|
||||
End Sub
|
||||
Friend Shared Sub ErrorNoControladoAp(Aplicacion As String, ex As Exception)
|
||||
Comun.GeneraRegistroCorreoExcepcion(Nothing, ex, Aplicacion)
|
||||
End Sub
|
||||
|
||||
Friend Shared Sub AbrirAP(uc As tsUserControl, OtrosParametros As String)
|
||||
uc.AbreAplicacionEnPestaña(Comun.dg,, AddressOf Diseño, AddressOf ErrorNoControladoAp, OtrosParametros)
|
||||
End Sub
|
||||
|
||||
Private Shared Function Diseño(bd As Object, Operacion As OperacionDiseñoEnum, CodigoAplicacion As String, ByRef DescripcionDiseño As String, ByRef TodosUsuarios As Boolean, DiseñoActual() As Byte) As Byte()
|
||||
Try
|
||||
Dim tu = TodosUsuarios
|
||||
' Dim CodigoAplicacion As String = apl.uc.GetType.ToString
|
||||
Select Case Operacion
|
||||
Case tsWPFCore.OperacionDiseñoEnum.ABRIR
|
||||
Dim bdp = DirectCast(bd, tscGrupoSanchoToro)
|
||||
If bdp.ficherosconfiguracion.Any(Function(x) x.Codigo = CodigoAplicacion AndAlso x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario AndAlso (x.Descripcion Is Nothing OrElse x.Descripcion = "")) Then
|
||||
Dim f = bdp.ficherosconfiguracion.Where(Function(x) x.Codigo = CodigoAplicacion AndAlso x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).First
|
||||
Return f.Configuracion
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
Case tsWPFCore.OperacionDiseñoEnum.ABRIR_DISEÑO_GUARDADO
|
||||
Dim bdp = DirectCast(bd, tscGrupoSanchoToro)
|
||||
|
||||
Dim ld As List(Of tsWPFCore.DiseñoGuardado) = (From fc In bdp.ficherosconfiguracion Select fc.idFicheroConfiguracion, fc.idUsuario, fc.Descripcion, fc.Codigo Where Codigo = CodigoAplicacion AndAlso ((idUsuario.HasValue AndAlso idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario) OrElse idUsuario.HasValue = False) Select New DiseñoGuardado With {.Descripcion = Descripcion, .TodosLosUsuarios = (idUsuario.HasValue = False), .idDiseño = idFicheroConfiguracion}).ToList
|
||||
|
||||
Dim dxwd As New dxwDiseñoColumnas(CodigoAplicacion, DescripcionDiseño, TodosUsuarios, True, ld, AddressOf DelegadoEliminarPlantilla)
|
||||
If dxwd.ShowDialog Then
|
||||
Dim f = bdp.ficherosconfiguracion.First(Function(x) x.idFicheroConfiguracion = dxwd._IdDiseño)
|
||||
TodosUsuarios = dxwd._TodosLosUsuarios
|
||||
DescripcionDiseño = dxwd._Descripcion
|
||||
Return f.Configuracion
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
Case tsWPFCore.OperacionDiseñoEnum.GUARDAR
|
||||
Dim bdp = tscGrupoSanchoToro.NuevoContexto
|
||||
Dim fichero As ficherosconfiguracion
|
||||
If bdp.ficherosconfiguracion.Any(Function(x) x.Codigo = CodigoAplicacion AndAlso x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario AndAlso (x.Descripcion Is Nothing OrElse x.Descripcion = "")) Then
|
||||
fichero = bdp.ficherosconfiguracion.Where(Function(x) x.Codigo = CodigoAplicacion AndAlso x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario AndAlso (x.Descripcion Is Nothing OrElse x.Descripcion = "")).First
|
||||
Else
|
||||
fichero = New ficherosconfiguracion
|
||||
fichero.Codigo = CodigoAplicacion
|
||||
fichero.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
fichero.Descripcion = Nothing
|
||||
bdp.ficherosconfiguracion.Add(fichero)
|
||||
End If
|
||||
fichero.Configuracion = DiseñoActual
|
||||
bdp.GuardarCambios()
|
||||
Diseño = Nothing
|
||||
|
||||
|
||||
Case tsWPFCore.OperacionDiseñoEnum.GUARDAR_COMO
|
||||
Dim bdp = DirectCast(bd, tscGrupoSanchoToro)
|
||||
Dim ld As List(Of tsWPFCore.DiseñoGuardado) = (From fc In bdp.ficherosconfiguracion Select fc.idFicheroConfiguracion, fc.idUsuario, fc.Descripcion, fc.Codigo Where Codigo = CodigoAplicacion AndAlso ((idUsuario.HasValue AndAlso idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario) OrElse idUsuario.HasValue = False) Select New DiseñoGuardado With {.Descripcion = Descripcion, .TodosLosUsuarios = (idUsuario.HasValue = False), .idDiseño = idFicheroConfiguracion}).ToList
|
||||
|
||||
Dim dxwd As New dxwDiseñoColumnas(CodigoAplicacion, DescripcionDiseño, TodosUsuarios, False, ld, AddressOf DelegadoEliminarPlantilla)
|
||||
|
||||
If dxwd.ShowDialog Then
|
||||
Dim f As ficherosconfiguracion
|
||||
TodosUsuarios = dxwd._TodosLosUsuarios
|
||||
DescripcionDiseño = dxwd._Descripcion
|
||||
If dxwd._IdDiseño.HasValue Then
|
||||
f = bdp.ficherosconfiguracion.First(Function(x) x.idFicheroConfiguracion = dxwd._IdDiseño)
|
||||
Else
|
||||
f = New ficherosconfiguracion
|
||||
bdp.ficherosconfiguracion.Add(f)
|
||||
f.Codigo = CodigoAplicacion
|
||||
f.Descripcion = dxwd._Descripcion
|
||||
End If
|
||||
f.idUsuario = Nothing
|
||||
If dxwd._TodosLosUsuarios = False Then f.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
f.Configuracion = DiseñoActual
|
||||
bdp.GuardarCambios()
|
||||
End If
|
||||
Return Nothing
|
||||
Case Else ' tsWPFCore.OperacionDiseñoEnum.RESTAURAR
|
||||
Dim bdp = tscGrupoSanchoToro.NuevoContexto
|
||||
If bdp.ficherosconfiguracion.Any(Function(x) x.Codigo = CodigoAplicacion AndAlso x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario) Then
|
||||
bdp.Remove(bdp.ficherosconfiguracion.Where(Function(x) x.Codigo = CodigoAplicacion AndAlso x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).First)
|
||||
bdp.GuardarCambios()
|
||||
End If
|
||||
Return Nothing
|
||||
End Select
|
||||
Catch EX As Exception
|
||||
Throw
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
116
GestionGrupoSanchoToro/GestionGrupoSanchoToro.vbproj
Normal file
116
GestionGrupoSanchoToro/GestionGrupoSanchoToro.vbproj
Normal file
@@ -0,0 +1,116 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows7.0</TargetFramework>
|
||||
<RootNamespace>GrupoSanchoToro</RootNamespace>
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImportedNamespaces>bdGrupoSanchoToro=False,Microsoft.EntityFrameworkCore=False,System.Linq.Dynamic.Core=False,System.Windows=False,System.Windows.Controls=False,System.Windows.Data=False,System.Windows.Documents=False,System.Windows.Input=False,System.Windows.Media=False,System.Windows.Media.Imaging=False,System.Windows.Navigation=False,System.Windows.Shapes=False,tsUtilidades.Extensiones=False,Microsoft.VisualBasic=True,System=True,System.Collections=True,System.Collections.Generic=True,System.Diagnostics=True,System.Linq=True,System.Xml.Linq=True,System.Threading.Tasks=True,GrupoSanchoToro=True</ImportedNamespaces>
|
||||
<ApplicationIcon>Resources\stsur.ico</ApplicationIcon>
|
||||
<PackageIcon>Resources\LogoTcsColor.png</PackageIcon>
|
||||
<AssemblyVersion>1.0.0.31</AssemblyVersion>
|
||||
<UseWindowsForms>False</UseWindowsForms>
|
||||
<!--<StartupObject>GrupoSanchoToro.dxwInicio</StartupObject>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\stsur.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\LogoTcsColor.png" />
|
||||
<Resource Include="Resources\stsur.ico" />
|
||||
<Resource Include="Resources\stsur_simple_icon_32x32.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Import Include="bdGrupoSanchoToro" />
|
||||
<Import Include="Microsoft.EntityFrameworkCore" />
|
||||
<Import Include="System.Linq.Dynamic.Core" />
|
||||
<Import Include="System.Windows" />
|
||||
<Import Include="System.Windows.Controls" />
|
||||
<Import Include="System.Windows.Data" />
|
||||
<Import Include="System.Windows.Documents" />
|
||||
<Import Include="System.Windows.Input" />
|
||||
<Import Include="System.Windows.Media" />
|
||||
<Import Include="System.Windows.Media.Imaging" />
|
||||
<Import Include="System.Windows.Navigation" />
|
||||
<Import Include="System.Windows.Shapes" />
|
||||
<Import Include="tsUtilidades.Extensiones" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\.editorconfig" Link=".editorconfig" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autoupdater.NET.Official" Version="1.9.2" />
|
||||
<PackageReference Include="DevExpress.Document.Processor" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Document.Processor.es" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Printing.Core" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Printing.Core.es" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Reporting.Core" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Reporting.Core.es" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Utils.UI" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Utils.UI.es" Version="23.2.3" />
|
||||
<PackageReference Include="devexpress.wpf.accordion" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Wpf.Accordion.es" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Wpf.Printing" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Wpf.Printing.es" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Wpf.Reporting" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Wpf.Reporting.es" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Wpf.Spreadsheet" Version="23.2.3" />
|
||||
<PackageReference Include="DevExpress.Wpf.Spreadsheet.es" Version="23.2.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.DynamicLinq" Version="8.4.9" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.6.0.2" />
|
||||
<PackageReference Include="System.ServiceModel.Federation" Version="8.1.0" />
|
||||
<PackageReference Include="TSpdf.commons" Version="1.0.1" />
|
||||
<PackageReference Include="TSpdfUtils" Version="1.0.15" />
|
||||
<PackageReference Include="tsWPFCore" Version="1.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\bdGrupoSanchoToro\bdGrupoSanchoToro.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Documentos\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="VeriFactu">
|
||||
<HintPath>..\..\..\..\tecnosis.tfs\Comun\VeriFactu-main\bin\Debug\netstandard2.1\VeriFactu.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="My Project\Resources.Designer.vb">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="My Project\Settings.Designer.vb">
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="My Project\Resources.resx">
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="My Project\Settings.settings">
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
136
GestionGrupoSanchoToro/Informes/Informes.vb
Normal file
136
GestionGrupoSanchoToro/Informes/Informes.vb
Normal file
@@ -0,0 +1,136 @@
|
||||
|
||||
Imports System.IO
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
Imports System.Drawing.Printing
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.Xpf.Printing
|
||||
Public Class Informes
|
||||
Private Shared NumeroCopias As Integer
|
||||
|
||||
|
||||
Friend Shared Sub ImprimirPlantilla(bd As tscGrupoSanchoToro, Plantilla As Byte(), Datasource As Object, ImpresoraPredeterminada As Boolean, Copias As Integer)
|
||||
Try
|
||||
|
||||
Dim xr As New XtraReport
|
||||
xr.LoadLayoutFromXml(New MemoryStream(Plantilla), True)
|
||||
ImprimeInforme(xr, ImpresoraPredeterminada, Copias, bd.AhoraMySql, Datasource)
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Atención", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Friend Shared Sub ImprimirPlantilla(bd As tscGrupoSanchoToro, idPlantilla As Integer, Datasource As Object, ImpresoraPredeterminada As Boolean, Copias As Integer)
|
||||
' Try
|
||||
|
||||
' If idPlantilla = 0 Then Throw New Exception("Seleccione primero la plantilla a imprimir")
|
||||
' Dim xr As New XtraReport
|
||||
|
||||
|
||||
' Dim pl = bd.plantillas.AsNoTracking.SingleOrDefault(Function(x) x.idPlantilla = idPlantilla)
|
||||
' 'Dim pl = bd.plantillas.Where(Function(x) x.idPlantilla = idPlantilla).First
|
||||
|
||||
' 'Dim pl As plantillas = (From p In bd.plantillas Where p.idPlantilla = idPlantilla).First
|
||||
' Dim s As String = System.Text.Encoding.UTF8.GetString(pl.idFicheroNavigation.Fichero)
|
||||
' Using sw As New StreamWriter(New MemoryStream())
|
||||
' sw.Write(s)
|
||||
' sw.Flush()
|
||||
' xr = XtraReport.FromStream(sw.BaseStream, True)
|
||||
' End Using
|
||||
' Try
|
||||
' Dim pr As DevExpress.XtraReports.Parameters.Parameter = (From p As DevExpress.XtraReports.Parameters.Parameter In xr.Parameters Where p.Name = "Fecha").First
|
||||
' pr.Value = bd.AhoraMySql
|
||||
' pr.Visible = False
|
||||
' Catch ex As Exception
|
||||
|
||||
' End Try
|
||||
' ' xr.DataSource = Datasource
|
||||
' ImprimeInforme(xr, ImpresoraPredeterminada, Copias, bd.AhoraMySql, Datasource)
|
||||
' Catch ex As Exception
|
||||
' DXMessageBox.Show(ex.Message, "Atención", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End Try
|
||||
'End Sub
|
||||
Friend Shared Function GuardaInformeEnPdf(bd As tscGrupoSanchoToro, idPlantilla As Integer, Datasource As Object) As Byte()
|
||||
Try
|
||||
|
||||
If idPlantilla = 0 Then Throw New Exception("Seleccione primero la plantilla a imprimir")
|
||||
Dim xr As New XtraReport
|
||||
|
||||
|
||||
Dim pl = bd.plantillas.AsNoTracking.Where(Function(x) x.idPlantilla = idPlantilla).First
|
||||
|
||||
|
||||
|
||||
Dim s As String = System.Text.Encoding.UTF8.GetString(pl.idFicheroNavigation.Fichero)
|
||||
Using sw As New StreamWriter(New MemoryStream())
|
||||
sw.Write(s)
|
||||
sw.Flush()
|
||||
xr = XtraReport.FromStream(sw.BaseStream, True)
|
||||
End Using
|
||||
Try
|
||||
Dim pr As DevExpress.XtraReports.Parameters.Parameter = (From p As DevExpress.XtraReports.Parameters.Parameter In xr.Parameters Where p.Name = "Fecha").First
|
||||
pr.Value = bd.AhoraMySql
|
||||
pr.Visible = False
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
xr.DataSource = Datasource
|
||||
|
||||
Return GuardaInformeEnPdf(xr)
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
'DXMessageBox.Show(ex.Message, "Atención", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Friend Shared Sub ImprimeInforme(xr As XtraReport, ImpresoraPredeterminada As Boolean, Copias As Integer, Fecha As Date, Datos As Object)
|
||||
Try
|
||||
For Each pr In xr.Parameters
|
||||
pr.Visible = False
|
||||
If pr.Name = "Fecha" Then
|
||||
pr.Value = Fecha
|
||||
End If
|
||||
Next
|
||||
xr.DataSource = Datos
|
||||
xr.CreateDocument(True)
|
||||
If ImpresoraPredeterminada Then
|
||||
If Copias < 2 Then
|
||||
NumeroCopias = 1
|
||||
xr.Print()
|
||||
Else
|
||||
NumeroCopias = Copias
|
||||
AddHandler xr.PrintingSystem.StartPrint, AddressOf xr_StartPring
|
||||
xr.Print()
|
||||
End If
|
||||
Else
|
||||
PrintHelper.Print(xr)
|
||||
'xr.PrintDialog()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Shared Sub xr_StartPring(sender As Object, e As PrintDocumentEventArgs)
|
||||
e.PrintDocument.PrinterSettings.Copies = NumeroCopias
|
||||
End Sub
|
||||
|
||||
Friend Shared Function GuardaInformeEnPdf(xr As XtraReport) As Byte()
|
||||
For Each pr In xr.Parameters
|
||||
pr.Visible = False
|
||||
Next
|
||||
xr.CreateDocument(True)
|
||||
Dim st As New MemoryStream
|
||||
xr.ExportToPdf(st)
|
||||
Return st.ToArray
|
||||
End Function
|
||||
|
||||
End Class
|
||||
67
GestionGrupoSanchoToro/Informes/ucPlantillas.xaml
Normal file
67
GestionGrupoSanchoToro/Informes/ucPlantillas.xaml
Normal file
@@ -0,0 +1,67 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
x:Class="ucPlantillas"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1024" d:DesignWidth="1280">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<tsWPF:tsGridControl x:Name="gc" NombreTablaBase="plantillas" >
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC CamposObligatorios="Descripcion" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Codigo" Header="Código" IsSmart="True" Width="150" x:Name="gcCodigo" />
|
||||
<tsWPF:tsGridColumn FieldName="Descripcion" Header="Descripción" IsSmart="True" Width="300" />
|
||||
<tsWPF:tsGridColumn FieldName="Oculta" Header="Oculta" Width="80">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings AllowNullInput="False" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<dxg:GridColumn FieldName="idGrupo" Header="Grupo" Width="200">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings ValueMember="idEnumeracion" AutoComplete="True" DisplayMember="Descripcion" x:Name="cbGrupo" >
|
||||
</dxe:ComboBoxEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="idPermiso" Header="Permiso" Width="200" x:Name="gcPermiso" Visible="False" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings ValueMember="idPermiso" AutoComplete="True" DisplayMember="Descripcion" x:Name="cbPermiso" >
|
||||
</dxe:ComboBoxEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" Header="Observaciones" IsSmart="True" Width="150" />
|
||||
<tsWPF:tsGridColumn FieldName="Editar" Width="140" IsSmart="True" x:Name="gcEditar" >
|
||||
<tsWPF:tsGridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button x:Name="btEditar" Click="btEditar_Click" >
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" >
|
||||
<!--<Image Source="Resources/Data-Template-icon-16x16.png" Stretch="UniformToFill" />-->
|
||||
<TextBlock Margin="10,0,0,0" >Editar Plantilla</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</tsWPF:tsGridColumn.CellTemplate>
|
||||
</tsWPF:tsGridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View >
|
||||
<tsWPF:tsTableView x:Name="tvPlantillas" NewItemRowPosition="Bottom" InitNewRow="tvPlantillas_InitNewRow" ShowSearchPanelMode="Always" AllowEditing="True" />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
401
GestionGrupoSanchoToro/Informes/ucPlantillas.xaml.vb
Normal file
401
GestionGrupoSanchoToro/Informes/ucPlantillas.xaml.vb
Normal file
@@ -0,0 +1,401 @@
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core.ServerMode
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.XtraReports.UserDesigner
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.RichEdit
|
||||
Imports DevExpress.Office.Services
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Docking
|
||||
|
||||
|
||||
Imports DevExpress.Xpf.Reports.UserDesigner
|
||||
Imports DevExpress.Xpf.Reports.UserDesigner.Native
|
||||
Imports System
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports System.Text
|
||||
Imports System.Windows
|
||||
Imports System.Collections
|
||||
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro.dbcontext
|
||||
|
||||
|
||||
Public Class ucPlantillas
|
||||
|
||||
|
||||
Private bd As bdGrupoSanchoToro.tscGrupoSanchoToro
|
||||
Private PlantillaActual As plantillas
|
||||
Private WithEvents bplas As BindingList(Of plantillas)
|
||||
' Private mdiController As XRDesignMdiController
|
||||
|
||||
'Public Overrides ReadOnly Property CampoIndice As String
|
||||
' Get
|
||||
' Return ""
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "Plantillas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Plantillas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "plantillas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Sub tvPlantillas_InitNewRow(sender As Object, e As DevExpress.Xpf.Grid.InitNewRowEventArgs)
|
||||
' e.Source = New plantillas
|
||||
GC.SetCellValue(e.RowHandle, "Oculto", False)
|
||||
gc.SetCellValue(e.RowHandle, "TipoListado", False)
|
||||
gc.SetCellValue(e.RowHandle, "idEmpresa", EmpresaActual.idEmpresa)
|
||||
'e.Handled = True
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btEditar_Click(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
Dim pl As plantillas
|
||||
|
||||
If GC.View.FocusedRowHandle = DataControlBase.NewItemRowHandle Then
|
||||
pl = GC.GetRow(DataControlBase.NewItemRowHandle)
|
||||
GC.View.CommitEditing(True)
|
||||
Else
|
||||
GC.View.CommitEditing(True)
|
||||
pl = Me.gc.GetFocusedRow
|
||||
End If
|
||||
|
||||
If pl.idGrupo <> 0 Then
|
||||
EditarPlantilla(pl)
|
||||
Else
|
||||
DXMessageBox.Show("La columna Grupo de plantilla es obligatoria", "Atención", MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub EditarPlantilla(pl As bdGrupoSanchoToro.db.plantillas)
|
||||
Try
|
||||
If pl.idPlantilla > 0 Then
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
pl = bd.plantillas.First(Function(X) X.idPlantilla = pl.idPlantilla)
|
||||
End If
|
||||
PlantillaActual = pl
|
||||
Select Case PlantillaActual.idGrupoNavigation.Codigo
|
||||
'Case "GRUPLA.CERTIFICADOS"
|
||||
' Dim tsEditor As tsWPFCore.dxwEditor
|
||||
|
||||
' If pl.idFichero.HasValue AndAlso pl.idFicheroNavigation.Fichero IsNot Nothing Then
|
||||
' ' tsEditor = New tsWPFCore.dxwEditor(New IO.MemoryStream(pl.idFicheroNavigation.Fichero), DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf Guardar, AddressOf CargarDatosMailMergeCertificados)
|
||||
' Else
|
||||
' ' tsEditor = New tsWPFCore.dxwEditor(Nothing, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf Guardar, AddressOf CargarDatosMailMergeCertificados)
|
||||
' End If
|
||||
' tsEditor.ShowDialog()
|
||||
Case "GRUPLA.DOCX"
|
||||
Dim tsEditor As tsWPFCore.dxwEditor
|
||||
|
||||
If pl.idFichero.HasValue AndAlso pl.idFicheroNavigation.Fichero IsNot Nothing Then
|
||||
tsEditor = New tsWPFCore.dxwEditor(New IO.MemoryStream(pl.idFicheroNavigation.Fichero), DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf GuardarPlantilla)
|
||||
Else
|
||||
tsEditor = New tsWPFCore.dxwEditor(Nothing, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, DevExpress.XtraRichEdit.DocumentFormat.OpenXml, AddressOf GuardarPlantilla)
|
||||
End If
|
||||
tsEditor.ShowDialog()
|
||||
|
||||
Case "GRUPLA.ODT"
|
||||
Dim tsEditor As tsWPFCore.dxwEditor
|
||||
|
||||
If pl.idFichero.HasValue AndAlso pl.idFicheroNavigation.Fichero IsNot Nothing Then
|
||||
tsEditor = New tsWPFCore.dxwEditor(New IO.MemoryStream(pl.idFicheroNavigation.Fichero), DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, AddressOf GuardarPlantilla)
|
||||
Else
|
||||
tsEditor = New tsWPFCore.dxwEditor(Nothing, DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, DevExpress.XtraRichEdit.DocumentFormat.OpenDocument, AddressOf GuardarPlantilla)
|
||||
End If
|
||||
tsEditor.ShowDialog()
|
||||
Case Else
|
||||
' Dim fr = New InformesCOAS.xrFactura
|
||||
Dim xr As New XtraReport
|
||||
Try
|
||||
If pl.idFichero.HasValue = False OrElse pl.idFicheroNavigation.Fichero Is Nothing Then
|
||||
xr = New XtraReport
|
||||
Else
|
||||
xr.LoadLayoutFromXml(New MemoryStream(pl.idFicheroNavigation.Fichero))
|
||||
End If
|
||||
Me.Guardar(Nothing, Nothing, True, False)
|
||||
Dim vi As New tsWPFCore.ucDiseñadorInformes(xr, pl.idPlantilla, AddressOf GuardarWPF)
|
||||
|
||||
Dim GrupoDocumentos = Me.GrupoDocumentos
|
||||
Dim dc = tsWPFCore.Comun.dm.DockController
|
||||
|
||||
Dim docpanel As DevExpress.Xpf.Docking.DocumentPanel
|
||||
Dim d = (From p In GrupoDocumentos.Items Where p.Tag = "Plantilla." & pl.idPlantilla.ToString)
|
||||
If d.Count > 0 Then
|
||||
docpanel = d.First
|
||||
Else
|
||||
docpanel = New DevExpress.Xpf.Docking.DocumentPanel
|
||||
docpanel.Caption = pl.Descripcion
|
||||
docpanel.Content = vi
|
||||
docpanel.ClosingBehavior = DevExpress.Xpf.Docking.ClosingBehavior.ImmediatelyRemove
|
||||
docpanel.Tag = "Plantilla." & pl.idPlantilla.ToString
|
||||
GrupoDocumentos.Items.Add(docpanel)
|
||||
End If
|
||||
dc.Activate(docpanel)
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error ucPlantillas.EditarPlantilla")
|
||||
'Comun.GeneraRegistroCorreoExcepcion(bd, ex, "ucPlantillas.EditarPlantilla")
|
||||
Finally
|
||||
'xr.Dispose()
|
||||
'xr = Nothing
|
||||
'System.GC.Collect()
|
||||
'System.GC.WaitForFullGCComplete()
|
||||
End Try
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub GuardarPlantilla(ms As MemoryStream)
|
||||
Me.Guardar(Nothing, Nothing, True, False)
|
||||
|
||||
If PlantillaActual.idFichero.HasValue = False Then
|
||||
Dim idTipoPlantilla = bd.enumeraciones.Where(Function(x) x.Codigo = "TIPFIC.PLANTILLA").First.idEnumeracion
|
||||
PlantillaActual.idFicheroNavigation = New ficheros With {.idTipo = idTipoPlantilla}
|
||||
End If
|
||||
Dim sextension As String
|
||||
Select Case PlantillaActual.idGrupoNavigation.Codigo
|
||||
Case "GRUPLA.ODT"
|
||||
sextension = ".odt"
|
||||
Case "GRUPLA.XHTML"
|
||||
sextension = ".xhtml"
|
||||
'Case "GRUPLA.NOMINASWORD"
|
||||
' sextension = ".odt"
|
||||
Case "GRUPLA.DOCX"
|
||||
sextension = ".docx"
|
||||
Case Else
|
||||
sextension = ".xml"
|
||||
End Select
|
||||
PlantillaActual.idFicheroNavigation.Fichero = ms.ToArray
|
||||
PlantillaActual.idFicheroNavigation.Fecha = Now
|
||||
PlantillaActual.idFicheroNavigation.Descripcion = PlantillaActual.Descripcion
|
||||
PlantillaActual.idFicheroNavigation.NombreFichero = PlantillaActual.idPlantilla.ToString & sextension
|
||||
bd.GuardarCambios()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CopiarPlantilla(sender As Object, e As RoutedEventArgs)
|
||||
Try
|
||||
Dim ra As bdGrupoSanchoToro.db.plantillas = Me.gc.CurrentItem
|
||||
Dim np As New plantillas
|
||||
Dim i As Integer = 1
|
||||
Do
|
||||
np.Descripcion = "Copia " & i.ToString & " " & ra.Descripcion
|
||||
i += 1
|
||||
Loop Until Not bd.plantillas.ToList.Any(Function(x) x.Descripcion = np.Descripcion)
|
||||
If ra.Codigo IsNot Nothing Then
|
||||
i = 1
|
||||
Do
|
||||
np.Codigo = ra.Codigo & "-" & i.ToString
|
||||
i += 1
|
||||
Loop Until Not bd.plantillas.ToList.Any(Function(x) x.Codigo = np.Codigo)
|
||||
End If
|
||||
np.idGrupo = ra.idGrupo
|
||||
np.Observaciones = ra.Observaciones
|
||||
np.Oculta = ra.Oculta
|
||||
np.TipoListado = ra.TipoListado
|
||||
bd.plantillas.Add(np)
|
||||
bd.GuardarCambios()
|
||||
Dim idTipoPlantilla = bd.enumeraciones.Where(Function(x) x.Codigo = "TIPFIC.PLANTILLA").First.idEnumeracion
|
||||
np.idFicheroNavigation = New ficheros With {.idTipo = idTipoPlantilla}
|
||||
Dim sextension As String
|
||||
Select Case ra.idGrupoNavigation.Codigo
|
||||
Case "GRUPLA.XHTML"
|
||||
sextension = ".xhtml"
|
||||
Case "GRUPLA.ODT"
|
||||
sextension = ".odt"
|
||||
Case "GRUPLA.DOCX"
|
||||
sextension = ".docx"
|
||||
Case Else
|
||||
sextension = ".xml"
|
||||
End Select
|
||||
np.idFicheroNavigation.Fichero = ra.idFicheroNavigation.Fichero
|
||||
np.idFicheroNavigation.Fecha = Now
|
||||
np.idFicheroNavigation.Descripcion = np.Descripcion
|
||||
np.idFicheroNavigation.NombreFichero = np.idPlantilla.ToString & sextension
|
||||
bd.GuardarCambios()
|
||||
|
||||
EstableceDCPrincipal()
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub bplas_ListChanged(sender As Object, e As ListChangedEventArgs) Handles bplas.ListChanged
|
||||
If e.ListChangedType = ListChangedType.ItemAdded Then
|
||||
bd.plantillas.Add(DirectCast(bplas.Item(e.NewIndex), plantillas))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub gc_DespuesEliminar(gc As tsWPFCore.tsGridControl) Handles gc.DespuesEliminar
|
||||
bplas.Remove(gc.CurrentItem)
|
||||
Me.bd.GuardarCambios()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub tvPlantillas_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvPlantillas.ValidateRow
|
||||
Try
|
||||
ErroresValidacion.EliminaError("DatosDuplicados")
|
||||
Dim pl As plantillas
|
||||
If tvPlantillas.FocusedRowHandle = DataControlBase.NewItemRowHandle Then
|
||||
pl = gc.GetRow(DataControlBase.NewItemRowHandle)
|
||||
Else
|
||||
pl = gc.CurrentItem
|
||||
End If
|
||||
If pl.idPlantilla = 0 Then
|
||||
If bplas.Where(Function(x) x.Descripcion = pl.Descripcion).Count > 1 OrElse bd.plantillas.Any(Function(x) x.Descripcion = pl.Descripcion) Then
|
||||
e.IsValid = False
|
||||
|
||||
' Debug.WriteLine("bplas:" & bplas.Any(Function(x) x.Descripcion = pl.Descripcion).ToString)
|
||||
' Debug.WriteLine("bd:" & bd.plantillas.Any(Function(x) x.Descripcion = pl.Descripcion).ToString)
|
||||
End If
|
||||
If pl.Codigo IsNot Nothing AndAlso pl.Codigo <> "" Then
|
||||
If bplas.Where(Function(x) x.Codigo = pl.Codigo).Count > 1 OrElse bd.plantillas.Any(Function(x) x.Codigo = pl.Codigo) Then
|
||||
e.IsValid = False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If bd.plantillas.Any(Function(x) x.idPlantilla <> pl.idPlantilla AndAlso (x.Descripcion = pl.Descripcion)) Then
|
||||
e.IsValid = False
|
||||
|
||||
End If
|
||||
If pl.Codigo IsNot Nothing AndAlso pl.Codigo <> "" Then
|
||||
If bplas.Where(Function(x) x.Codigo = pl.Codigo).Count > 1 OrElse bd.plantillas.Any(Function(x) x.idPlantilla <> pl.idPlantilla AndAlso x.Codigo = pl.Codigo) Then
|
||||
e.IsValid = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Not e.IsValid Then
|
||||
e.SetError("Nombre de Plantilla o Codigo ya utilizado")
|
||||
DXMessageBox.Show("Nombre de Plantilla o Codigo ya utilizado", "Error")
|
||||
End If
|
||||
bd.GuardarCambios()
|
||||
Catch EX As Exception
|
||||
e.SetError(EX.Message)
|
||||
e.IsValid = False
|
||||
DXMessageBox.Show(EX.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Sub GuardarWPF(b() As Byte, idPlantilla As Integer)
|
||||
Dim bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Dim plantilla = bd.plantillas.First(Function(X) X.idPlantilla = idPlantilla)
|
||||
|
||||
|
||||
bd.GuardarCambios()
|
||||
If plantilla.idFichero.HasValue = False Then
|
||||
Dim idTipoPlantilla = bd.enumeraciones.Where(Function(x) x.Codigo = "TIPFIC.PLANTILLA").First.idEnumeracion
|
||||
plantilla.idFicheroNavigation = New ficheros With {.idTipo = idTipoPlantilla}
|
||||
End If
|
||||
Dim sextension As String
|
||||
Select Case plantilla.idGrupoNavigation.Codigo
|
||||
Case "GRUPLA.XHTML"
|
||||
sextension = ".xhtml"
|
||||
Case "GRUPLA.DOCX"
|
||||
sextension = ".docx"
|
||||
Case Else
|
||||
sextension = ".xml"
|
||||
End Select
|
||||
plantilla.idFicheroNavigation.Fichero = b
|
||||
plantilla.idFicheroNavigation.Fecha = Now
|
||||
plantilla.idFicheroNavigation.Descripcion = plantilla.Descripcion
|
||||
plantilla.idFicheroNavigation.NombreFichero = plantilla.idPlantilla.ToString & sextension
|
||||
bd.GuardarCambios()
|
||||
End Sub
|
||||
|
||||
Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Try
|
||||
Dim gptmp = (From e In bd.enumeraciones Select e Where e.idGrupoEnumeracionNavigation.Grupo = "GRUPLA").ToList
|
||||
Dim gp As New List(Of bdGrupoSanchoToro.db.enumeraciones)
|
||||
For Each g In gptmp
|
||||
If Comun.ObtienePermisos(bd, g.Codigo, idUsuario).Impresion Then
|
||||
gp.Add(g)
|
||||
End If
|
||||
Next
|
||||
Me.cbGrupo.ItemsSource = gp
|
||||
Me.cbPermiso.ItemsSource = bd.permisos.ToList
|
||||
Dim plas = bd.plantillas.ToList.Where(Function(p) gp.Any(Function(x) x.Codigo = p.idGrupoNavigation.Codigo)).ToList
|
||||
Me.gc.DataContext = bd
|
||||
bplas = New BindingList(Of plantillas)(plas)
|
||||
|
||||
Me.gc.ItemsSource = bplas
|
||||
Return tsUtilidades.EstadosAplicacion.SinDatos
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Plantillas"
|
||||
Me.docpanel.Tag = "Plantillas"
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.ContenedorAplicacion.btNuevo.IsVisible = False
|
||||
Me.ContenedorAplicacion.siEstado.IsVisible = False
|
||||
If bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario).idGrupoNavigation.Descripcion.ToLower = "administradores" Then
|
||||
Me.gcPermiso.Visible = True
|
||||
Me.gcCodigo.Visible = True
|
||||
Me.gcEditar.VisibleIndex = Me.gc.Columns.Count
|
||||
End If
|
||||
Dim mi As New MenuItem()
|
||||
mi.Header = "Copiar Plantilla"
|
||||
AddHandler mi.Click, AddressOf CopiarPlantilla
|
||||
Me.gc.ContextMenu.Items.Add(mi)
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.SUPERADMINISTRADORES", idUsuario)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
627
GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb
generated
Normal file
627
GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb
generated
Normal file
@@ -0,0 +1,627 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Public Class xrCierreCaja
|
||||
Inherits DevExpress.XtraReports.UI.XtraReport
|
||||
|
||||
'XtraReport overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Designer
|
||||
'It can be modified using the Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim ShapeRectangle1 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle()
|
||||
Dim ShapeRectangle2 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle()
|
||||
Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand()
|
||||
Me.XrPanel1 = New DevExpress.XtraReports.UI.XRPanel()
|
||||
Me.XrLabel22 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand()
|
||||
Me.Detail = New DevExpress.XtraReports.UI.DetailBand()
|
||||
Me.XrLabel19 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel20 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel17 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel18 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel3 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel5 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel1 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel2 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel4 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel6 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel14 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel13 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrShape2 = New DevExpress.XtraReports.UI.XRShape()
|
||||
Me.DetailReport = New DevExpress.XtraReports.UI.DetailReportBand()
|
||||
Me.Detail1 = New DevExpress.XtraReports.UI.DetailBand()
|
||||
Me.XrTable1 = New DevExpress.XtraReports.UI.XRTable()
|
||||
Me.XrTableRow1 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell1 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell2 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell6 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell7 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell9 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.GroupHeader1 = New DevExpress.XtraReports.UI.GroupHeaderBand()
|
||||
Me.XrTable2 = New DevExpress.XtraReports.UI.XRTable()
|
||||
Me.XrTableRow2 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell3 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell4 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell11 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell12 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell14 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand()
|
||||
Me.XrLabel16 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel15 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel12 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel11 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel10 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel9 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel8 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel7 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrShape1 = New DevExpress.XtraReports.UI.XRShape()
|
||||
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
|
||||
Me.Fecha = New DevExpress.XtraReports.Parameters.Parameter()
|
||||
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
'
|
||||
'TopMargin
|
||||
'
|
||||
Me.TopMargin.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrPanel1})
|
||||
Me.TopMargin.Dpi = 254.0!
|
||||
Me.TopMargin.HeightF = 138.7708!
|
||||
Me.TopMargin.Name = "TopMargin"
|
||||
'
|
||||
'XrPanel1
|
||||
'
|
||||
Me.XrPanel1.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrPanel1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel22})
|
||||
Me.XrPanel1.Dpi = 254.0!
|
||||
Me.XrPanel1.LocationFloat = New DevExpress.Utils.PointFloat(67.24997!, 25.00001!)
|
||||
Me.XrPanel1.Name = "XrPanel1"
|
||||
Me.XrPanel1.SizeF = New System.Drawing.SizeF(963.0831!, 113.7708!)
|
||||
Me.XrPanel1.StylePriority.UseBorders = False
|
||||
'
|
||||
'XrLabel22
|
||||
'
|
||||
Me.XrLabel22.Dpi = 254.0!
|
||||
Me.XrLabel22.Font = New DevExpress.Drawing.DXFont("Arial", 12.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel22.LocationFloat = New DevExpress.Utils.PointFloat(25.40002!, 25.40002!)
|
||||
Me.XrLabel22.Name = "XrLabel22"
|
||||
Me.XrLabel22.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel22.SizeF = New System.Drawing.SizeF(444.5!, 58.42001!)
|
||||
Me.XrLabel22.StylePriority.UseFont = False
|
||||
Me.XrLabel22.StylePriority.UseTextAlignment = False
|
||||
Me.XrLabel22.Text = "CIERRE DE CAJA"
|
||||
Me.XrLabel22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter
|
||||
'
|
||||
'BottomMargin
|
||||
'
|
||||
Me.BottomMargin.Dpi = 254.0!
|
||||
Me.BottomMargin.HeightF = 50.0!
|
||||
Me.BottomMargin.Name = "BottomMargin"
|
||||
'
|
||||
'Detail
|
||||
'
|
||||
Me.Detail.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel19, Me.XrLabel20, Me.XrLabel17, Me.XrLabel18, Me.XrLabel3, Me.XrLabel5, Me.XrLabel1, Me.XrLabel2, Me.XrLabel4, Me.XrLabel6, Me.XrLabel14, Me.XrLabel13, Me.XrShape2})
|
||||
Me.Detail.Dpi = 254.0!
|
||||
Me.Detail.HeightF = 238.6076!
|
||||
Me.Detail.HierarchyPrintOptions.Indent = 50.8!
|
||||
Me.Detail.Name = "Detail"
|
||||
'
|
||||
'XrLabel19
|
||||
'
|
||||
Me.XrLabel19.Dpi = 254.0!
|
||||
Me.XrLabel19.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteCerrado]")})
|
||||
Me.XrLabel19.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel19.LocationFloat = New DevExpress.Utils.PointFloat(1704.458!, 131.6514!)
|
||||
Me.XrLabel19.Name = "XrLabel19"
|
||||
Me.XrLabel19.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel19.SizeF = New System.Drawing.SizeF(276.6497!, 58.42004!)
|
||||
Me.XrLabel19.StylePriority.UseFont = False
|
||||
Me.XrLabel19.StylePriority.UseTextAlignment = False
|
||||
Me.XrLabel19.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft
|
||||
Me.XrLabel19.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel20
|
||||
'
|
||||
Me.XrLabel20.Dpi = 254.0!
|
||||
Me.XrLabel20.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel20.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 131.6514!)
|
||||
Me.XrLabel20.Name = "XrLabel20"
|
||||
Me.XrLabel20.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel20.SizeF = New System.Drawing.SizeF(329.4233!, 58.42001!)
|
||||
Me.XrLabel20.StylePriority.UseFont = False
|
||||
Me.XrLabel20.Text = "Importe M. Cerrados:"
|
||||
'
|
||||
'XrLabel17
|
||||
'
|
||||
Me.XrLabel17.Dpi = 254.0!
|
||||
Me.XrLabel17.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idCajaNavigation].[Descripcion]")})
|
||||
Me.XrLabel17.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel17.LocationFloat = New DevExpress.Utils.PointFloat(824.3406!, 52.91675!)
|
||||
Me.XrLabel17.Name = "XrLabel17"
|
||||
Me.XrLabel17.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel17.SizeF = New System.Drawing.SizeF(518.9336!, 58.42002!)
|
||||
Me.XrLabel17.StylePriority.UseFont = False
|
||||
Me.XrLabel17.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
'
|
||||
'XrLabel18
|
||||
'
|
||||
Me.XrLabel18.Dpi = 254.0!
|
||||
Me.XrLabel18.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel18.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 52.91683!)
|
||||
Me.XrLabel18.Name = "XrLabel18"
|
||||
Me.XrLabel18.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel18.SizeF = New System.Drawing.SizeF(266.3013!, 58.41997!)
|
||||
Me.XrLabel18.StylePriority.UseFont = False
|
||||
Me.XrLabel18.Text = "Caja Cierre:"
|
||||
'
|
||||
'XrLabel3
|
||||
'
|
||||
Me.XrLabel3.Dpi = 254.0!
|
||||
Me.XrLabel3.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idMovimiento]")})
|
||||
Me.XrLabel3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel3.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 52.91675!)
|
||||
Me.XrLabel3.Name = "XrLabel3"
|
||||
Me.XrLabel3.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel3.SizeF = New System.Drawing.SizeF(287.2332!, 58.42002!)
|
||||
Me.XrLabel3.StylePriority.UseFont = False
|
||||
Me.XrLabel3.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
'
|
||||
'XrLabel5
|
||||
'
|
||||
Me.XrLabel5.Dpi = 254.0!
|
||||
Me.XrLabel5.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel5.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 131.6514!)
|
||||
Me.XrLabel5.Name = "XrLabel5"
|
||||
Me.XrLabel5.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel5.SizeF = New System.Drawing.SizeF(266.3012!, 58.41997!)
|
||||
Me.XrLabel5.StylePriority.UseFont = False
|
||||
Me.XrLabel5.Text = "Usuario que cierra:"
|
||||
'
|
||||
'XrLabel1
|
||||
'
|
||||
Me.XrLabel1.Dpi = 254.0!
|
||||
Me.XrLabel1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")})
|
||||
Me.XrLabel1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 131.6514!)
|
||||
Me.XrLabel1.Name = "XrLabel1"
|
||||
Me.XrLabel1.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel1.SizeF = New System.Drawing.SizeF(287.2332!, 58.42004!)
|
||||
Me.XrLabel1.StylePriority.UseFont = False
|
||||
Me.XrLabel1.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel1.TextFormatString = "{0:dd/MM/yyyy}"
|
||||
'
|
||||
'XrLabel2
|
||||
'
|
||||
Me.XrLabel2.Dpi = 254.0!
|
||||
Me.XrLabel2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel2.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 131.6515!)
|
||||
Me.XrLabel2.Name = "XrLabel2"
|
||||
Me.XrLabel2.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel2.SizeF = New System.Drawing.SizeF(189.9501!, 58.41997!)
|
||||
Me.XrLabel2.StylePriority.UseFont = False
|
||||
Me.XrLabel2.Text = "Fecha Cierre:"
|
||||
'
|
||||
'XrLabel4
|
||||
'
|
||||
Me.XrLabel4.Dpi = 254.0!
|
||||
Me.XrLabel4.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idUsuarioNavigation].[Nombre]")})
|
||||
Me.XrLabel4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel4.LocationFloat = New DevExpress.Utils.PointFloat(824.3407!, 131.6514!)
|
||||
Me.XrLabel4.Name = "XrLabel4"
|
||||
Me.XrLabel4.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel4.SizeF = New System.Drawing.SizeF(518.9335!, 58.42004!)
|
||||
Me.XrLabel4.StylePriority.UseFont = False
|
||||
Me.XrLabel4.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
'
|
||||
'XrLabel6
|
||||
'
|
||||
Me.XrLabel6.Dpi = 254.0!
|
||||
Me.XrLabel6.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel6.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 52.91667!)
|
||||
Me.XrLabel6.Name = "XrLabel6"
|
||||
Me.XrLabel6.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel6.SizeF = New System.Drawing.SizeF(189.9501!, 58.41999!)
|
||||
Me.XrLabel6.StylePriority.UseFont = False
|
||||
Me.XrLabel6.Text = "Nº Cierre"
|
||||
'
|
||||
'XrLabel14
|
||||
'
|
||||
Me.XrLabel14.Dpi = 254.0!
|
||||
Me.XrLabel14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel14.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 52.91675!)
|
||||
Me.XrLabel14.Name = "XrLabel14"
|
||||
Me.XrLabel14.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel14.SizeF = New System.Drawing.SizeF(252.316!, 58.41997!)
|
||||
Me.XrLabel14.StylePriority.UseFont = False
|
||||
Me.XrLabel14.Text = "Fecha Impresión:"
|
||||
'
|
||||
'XrLabel13
|
||||
'
|
||||
Me.XrLabel13.Dpi = 254.0!
|
||||
Me.XrLabel13.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "?Fecha")})
|
||||
Me.XrLabel13.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel13.LocationFloat = New DevExpress.Utils.PointFloat(1619.414!, 52.91659!)
|
||||
Me.XrLabel13.Name = "XrLabel13"
|
||||
Me.XrLabel13.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel13.SizeF = New System.Drawing.SizeF(362.6234!, 58.42004!)
|
||||
Me.XrLabel13.StylePriority.UseFont = False
|
||||
Me.XrLabel13.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel13.TextFormatString = "{0:dd/MM/yyyy}"
|
||||
'
|
||||
'XrShape2
|
||||
'
|
||||
Me.XrShape2.Dpi = 254.0!
|
||||
Me.XrShape2.FillColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.XrShape2.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!)
|
||||
Me.XrShape2.Name = "XrShape2"
|
||||
ShapeRectangle1.Fillet = 20
|
||||
Me.XrShape2.Shape = ShapeRectangle1
|
||||
Me.XrShape2.SizeF = New System.Drawing.SizeF(1986.233!, 199.8627!)
|
||||
'
|
||||
'DetailReport
|
||||
'
|
||||
Me.DetailReport.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.Detail1, Me.GroupHeader1, Me.GroupFooter1})
|
||||
Me.DetailReport.DataMember = "MovimientosDelCierre"
|
||||
Me.DetailReport.DataSource = Me.ObjectDataSource1
|
||||
Me.DetailReport.Dpi = 254.0!
|
||||
Me.DetailReport.Level = 0
|
||||
Me.DetailReport.Name = "DetailReport"
|
||||
'
|
||||
'Detail1
|
||||
'
|
||||
Me.Detail1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable1})
|
||||
Me.Detail1.Dpi = 254.0!
|
||||
Me.Detail1.HeightF = 47.28944!
|
||||
Me.Detail1.HierarchyPrintOptions.Indent = 50.8!
|
||||
Me.Detail1.Name = "Detail1"
|
||||
Me.Detail1.SortFields.AddRange(New DevExpress.XtraReports.UI.GroupField() {New DevExpress.XtraReports.UI.GroupField("idMovimiento", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)})
|
||||
'
|
||||
'XrTable1
|
||||
'
|
||||
Me.XrTable1.Dpi = 254.0!
|
||||
Me.XrTable1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrTable1.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!)
|
||||
Me.XrTable1.Name = "XrTable1"
|
||||
Me.XrTable1.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow1})
|
||||
Me.XrTable1.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!)
|
||||
Me.XrTable1.StylePriority.UseFont = False
|
||||
'
|
||||
'XrTableRow1
|
||||
'
|
||||
Me.XrTableRow1.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell1, Me.XrTableCell2, Me.XrTableCell6, Me.XrTableCell7, Me.XrTableCell9})
|
||||
Me.XrTableRow1.Dpi = 254.0!
|
||||
Me.XrTableRow1.Name = "XrTableRow1"
|
||||
Me.XrTableRow1.Weight = 11.5R
|
||||
'
|
||||
'XrTableCell1
|
||||
'
|
||||
Me.XrTableCell1.Dpi = 254.0!
|
||||
Me.XrTableCell1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Descripcion]")})
|
||||
Me.XrTableCell1.Name = "XrTableCell1"
|
||||
Me.XrTableCell1.StylePriority.UseFont = False
|
||||
Me.XrTableCell1.Text = "XrTableCell1"
|
||||
Me.XrTableCell1.Weight = 0.65133730026355985R
|
||||
'
|
||||
'XrTableCell2
|
||||
'
|
||||
Me.XrTableCell2.Dpi = 254.0!
|
||||
Me.XrTableCell2.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")})
|
||||
Me.XrTableCell2.Name = "XrTableCell2"
|
||||
Me.XrTableCell2.Text = "XrTableCell2"
|
||||
Me.XrTableCell2.TextFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||
Me.XrTableCell2.Weight = 0.14856320511943927R
|
||||
'
|
||||
'XrTableCell6
|
||||
'
|
||||
Me.XrTableCell6.Dpi = 254.0!
|
||||
Me.XrTableCell6.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idMovimiento]")})
|
||||
Me.XrTableCell6.Name = "XrTableCell6"
|
||||
Me.XrTableCell6.Text = "XrTableCell6"
|
||||
Me.XrTableCell6.Weight = 0.15225145388319286R
|
||||
'
|
||||
'XrTableCell7
|
||||
'
|
||||
Me.XrTableCell7.Dpi = 254.0!
|
||||
Me.XrTableCell7.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Importe]")})
|
||||
Me.XrTableCell7.Name = "XrTableCell7"
|
||||
Me.XrTableCell7.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell7.Text = "XrTableCell7"
|
||||
Me.XrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight
|
||||
Me.XrTableCell7.TextFormatString = "{0:c2}"
|
||||
Me.XrTableCell7.Weight = 0.12158946848324614R
|
||||
'
|
||||
'XrTableCell9
|
||||
'
|
||||
Me.XrTableCell9.Dpi = 254.0!
|
||||
Me.XrTableCell9.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idUsuarioNavigation].[Nombre]")})
|
||||
Me.XrTableCell9.Name = "XrTableCell9"
|
||||
Me.XrTableCell9.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell9.Text = "XrTableCell9"
|
||||
Me.XrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter
|
||||
Me.XrTableCell9.Weight = 0.14983867201936621R
|
||||
'
|
||||
'GroupHeader1
|
||||
'
|
||||
Me.GroupHeader1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable2})
|
||||
Me.GroupHeader1.Dpi = 254.0!
|
||||
Me.GroupHeader1.HeightF = 56.78311!
|
||||
Me.GroupHeader1.Name = "GroupHeader1"
|
||||
'
|
||||
'XrTable2
|
||||
'
|
||||
Me.XrTable2.BackColor = System.Drawing.Color.Silver
|
||||
Me.XrTable2.Dpi = 254.0!
|
||||
Me.XrTable2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 9.75!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTable2.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTable2.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!)
|
||||
Me.XrTable2.Name = "XrTable2"
|
||||
Me.XrTable2.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow2})
|
||||
Me.XrTable2.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!)
|
||||
Me.XrTable2.StylePriority.UseBackColor = False
|
||||
Me.XrTable2.StylePriority.UseFont = False
|
||||
Me.XrTable2.StylePriority.UseForeColor = False
|
||||
'
|
||||
'XrTableRow2
|
||||
'
|
||||
Me.XrTableRow2.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell3, Me.XrTableCell4, Me.XrTableCell11, Me.XrTableCell12, Me.XrTableCell14})
|
||||
Me.XrTableRow2.Dpi = 254.0!
|
||||
Me.XrTableRow2.Name = "XrTableRow2"
|
||||
Me.XrTableRow2.Weight = 11.5R
|
||||
'
|
||||
'XrTableCell3
|
||||
'
|
||||
Me.XrTableCell3.Dpi = 254.0!
|
||||
Me.XrTableCell3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell3.Name = "XrTableCell3"
|
||||
Me.XrTableCell3.StylePriority.UseFont = False
|
||||
Me.XrTableCell3.Text = "Descripción"
|
||||
Me.XrTableCell3.Weight = 0.651216911310395R
|
||||
'
|
||||
'XrTableCell4
|
||||
'
|
||||
Me.XrTableCell4.Dpi = 254.0!
|
||||
Me.XrTableCell4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell4.Name = "XrTableCell4"
|
||||
Me.XrTableCell4.StylePriority.UseFont = False
|
||||
Me.XrTableCell4.Text = "Fecha"
|
||||
Me.XrTableCell4.Weight = 0.14853577036309198R
|
||||
'
|
||||
'XrTableCell11
|
||||
'
|
||||
Me.XrTableCell11.Dpi = 254.0!
|
||||
Me.XrTableCell11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell11.Name = "XrTableCell11"
|
||||
Me.XrTableCell11.StylePriority.UseFont = False
|
||||
Me.XrTableCell11.Text = "Nº Movimiento"
|
||||
Me.XrTableCell11.Weight = 0.15222340015547486R
|
||||
'
|
||||
'XrTableCell12
|
||||
'
|
||||
Me.XrTableCell12.Dpi = 254.0!
|
||||
Me.XrTableCell12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell12.Name = "XrTableCell12"
|
||||
Me.XrTableCell12.StylePriority.UseFont = False
|
||||
Me.XrTableCell12.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell12.Text = "Importe"
|
||||
Me.XrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight
|
||||
Me.XrTableCell12.Weight = 0.10990615377483919R
|
||||
'
|
||||
'XrTableCell14
|
||||
'
|
||||
Me.XrTableCell14.Dpi = 254.0!
|
||||
Me.XrTableCell14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell14.Name = "XrTableCell14"
|
||||
Me.XrTableCell14.StylePriority.UseFont = False
|
||||
Me.XrTableCell14.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell14.Text = "Usuario"
|
||||
Me.XrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter
|
||||
Me.XrTableCell14.Weight = 0.16147183210373589R
|
||||
'
|
||||
'GroupFooter1
|
||||
'
|
||||
Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel16, Me.XrLabel15, Me.XrLabel12, Me.XrLabel11, Me.XrLabel10, Me.XrLabel9, Me.XrLabel8, Me.XrLabel7, Me.XrShape1})
|
||||
Me.GroupFooter1.Dpi = 254.0!
|
||||
Me.GroupFooter1.HeightF = 238.7961!
|
||||
Me.GroupFooter1.Name = "GroupFooter1"
|
||||
'
|
||||
'XrLabel16
|
||||
'
|
||||
Me.XrLabel16.Dpi = 254.0!
|
||||
Me.XrLabel16.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoAntesCierre]")})
|
||||
Me.XrLabel16.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel16.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 47.36097!)
|
||||
Me.XrLabel16.Name = "XrLabel16"
|
||||
Me.XrLabel16.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel16.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!)
|
||||
Me.XrLabel16.StylePriority.UseFont = False
|
||||
Me.XrLabel16.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel16.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel15
|
||||
'
|
||||
Me.XrLabel15.Dpi = 254.0!
|
||||
Me.XrLabel15.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel15.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 47.36121!)
|
||||
Me.XrLabel15.Name = "XrLabel15"
|
||||
Me.XrLabel15.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel15.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!)
|
||||
Me.XrLabel15.StylePriority.UseFont = False
|
||||
Me.XrLabel15.Text = "Saldo Cierre Anterior:"
|
||||
'
|
||||
'XrLabel12
|
||||
'
|
||||
Me.XrLabel12.Dpi = 254.0!
|
||||
Me.XrLabel12.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoDespuesCierre]")})
|
||||
Me.XrLabel12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel12.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 139.5012!)
|
||||
Me.XrLabel12.Name = "XrLabel12"
|
||||
Me.XrLabel12.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel12.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!)
|
||||
Me.XrLabel12.StylePriority.UseFont = False
|
||||
Me.XrLabel12.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel12.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel11
|
||||
'
|
||||
Me.XrLabel11.Dpi = 254.0!
|
||||
Me.XrLabel11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel11.LocationFloat = New DevExpress.Utils.PointFloat(845.7034!, 47.36105!)
|
||||
Me.XrLabel11.Name = "XrLabel11"
|
||||
Me.XrLabel11.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel11.SizeF = New System.Drawing.SizeF(292.7596!, 58.41998!)
|
||||
Me.XrLabel11.StylePriority.UseFont = False
|
||||
Me.XrLabel11.Text = "Importe Entrada:"
|
||||
'
|
||||
'XrLabel10
|
||||
'
|
||||
Me.XrLabel10.Dpi = 254.0!
|
||||
Me.XrLabel10.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteEntradasMovimientosCerrados]")})
|
||||
Me.XrLabel10.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel10.LocationFloat = New DevExpress.Utils.PointFloat(1154.338!, 47.36113!)
|
||||
Me.XrLabel10.Name = "XrLabel10"
|
||||
Me.XrLabel10.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel10.SizeF = New System.Drawing.SizeF(263.0427!, 58.42005!)
|
||||
Me.XrLabel10.StylePriority.UseFont = False
|
||||
Me.XrLabel10.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel10.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel9
|
||||
'
|
||||
Me.XrLabel9.Dpi = 254.0!
|
||||
Me.XrLabel9.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel9.LocationFloat = New DevExpress.Utils.PointFloat(1445.093!, 47.36113!)
|
||||
Me.XrLabel9.Name = "XrLabel9"
|
||||
Me.XrLabel9.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel9.SizeF = New System.Drawing.SizeF(289.7356!, 58.41998!)
|
||||
Me.XrLabel9.StylePriority.UseFont = False
|
||||
Me.XrLabel9.Text = "Importe Salida:"
|
||||
'
|
||||
'XrLabel8
|
||||
'
|
||||
Me.XrLabel8.Dpi = 254.0!
|
||||
Me.XrLabel8.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteSalidasMovimientosCerrados]")})
|
||||
Me.XrLabel8.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel8.LocationFloat = New DevExpress.Utils.PointFloat(1734.828!, 47.36105!)
|
||||
Me.XrLabel8.Name = "XrLabel8"
|
||||
Me.XrLabel8.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel8.SizeF = New System.Drawing.SizeF(240.1718!, 58.42003!)
|
||||
Me.XrLabel8.StylePriority.UseFont = False
|
||||
Me.XrLabel8.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel8.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel7
|
||||
'
|
||||
Me.XrLabel7.Dpi = 254.0!
|
||||
Me.XrLabel7.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel7.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 139.5012!)
|
||||
Me.XrLabel7.Name = "XrLabel7"
|
||||
Me.XrLabel7.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel7.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!)
|
||||
Me.XrLabel7.StylePriority.UseFont = False
|
||||
Me.XrLabel7.Text = "Saldo Caja Al Cierre:"
|
||||
'
|
||||
'XrShape1
|
||||
'
|
||||
Me.XrShape1.Dpi = 254.0!
|
||||
Me.XrShape1.FillColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.XrShape1.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!)
|
||||
Me.XrShape1.Name = "XrShape1"
|
||||
ShapeRectangle2.Fillet = 20
|
||||
Me.XrShape1.Shape = ShapeRectangle2
|
||||
Me.XrShape1.SizeF = New System.Drawing.SizeF(1986.233!, 213.7961!)
|
||||
'
|
||||
'ObjectDataSource1
|
||||
'
|
||||
Me.ObjectDataSource1.DataSource = GetType(Global.bdGrupoSanchoToro.db.movimientoscaja)
|
||||
Me.ObjectDataSource1.Name = "ObjectDataSource1"
|
||||
'
|
||||
'Fecha
|
||||
'
|
||||
Me.Fecha.Description = "Parameter1"
|
||||
Me.Fecha.Name = "Fecha"
|
||||
Me.Fecha.Type = GetType(Integer)
|
||||
Me.Fecha.ValueInfo = "0"
|
||||
'
|
||||
'xrCierreCaja
|
||||
'
|
||||
Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.Detail, Me.DetailReport})
|
||||
Me.ComponentStorage.AddRange(New System.ComponentModel.IComponent() {Me.ObjectDataSource1})
|
||||
Me.DataSource = Me.ObjectDataSource1
|
||||
Me.Dpi = 254.0!
|
||||
Me.Font = New DevExpress.Drawing.DXFont("Arial", 9.75!)
|
||||
Me.Margins = New DevExpress.Drawing.DXMargins(50.0!, 50.0!, 138.7708!, 50.0!)
|
||||
Me.PageHeight = 2970
|
||||
Me.PageWidth = 2100
|
||||
Me.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4
|
||||
Me.Parameters.AddRange(New DevExpress.XtraReports.Parameters.Parameter() {Me.Fecha})
|
||||
Me.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter
|
||||
Me.SnapGridSize = 25.0!
|
||||
Me.Version = "23.2"
|
||||
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents TopMargin As DevExpress.XtraReports.UI.TopMarginBand
|
||||
Friend WithEvents BottomMargin As DevExpress.XtraReports.UI.BottomMarginBand
|
||||
Friend WithEvents Detail As DevExpress.XtraReports.UI.DetailBand
|
||||
Friend WithEvents XrLabel3 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel5 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel1 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel2 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel4 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel6 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel14 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel13 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrShape2 As DevExpress.XtraReports.UI.XRShape
|
||||
Friend WithEvents ObjectDataSource1 As DevExpress.DataAccess.ObjectBinding.ObjectDataSource
|
||||
Friend WithEvents DetailReport As DevExpress.XtraReports.UI.DetailReportBand
|
||||
Friend WithEvents Detail1 As DevExpress.XtraReports.UI.DetailBand
|
||||
Friend WithEvents XrTable1 As DevExpress.XtraReports.UI.XRTable
|
||||
Friend WithEvents XrTableRow1 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell1 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell2 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell6 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell7 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell9 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents GroupHeader1 As DevExpress.XtraReports.UI.GroupHeaderBand
|
||||
Friend WithEvents XrTable2 As DevExpress.XtraReports.UI.XRTable
|
||||
Friend WithEvents XrTableRow2 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell3 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell4 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell11 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell12 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell14 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents GroupFooter1 As DevExpress.XtraReports.UI.GroupFooterBand
|
||||
Friend WithEvents XrLabel12 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel11 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel10 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel9 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel8 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel7 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrShape1 As DevExpress.XtraReports.UI.XRShape
|
||||
Friend WithEvents XrLabel16 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel15 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel17 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel18 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents Fecha As DevExpress.XtraReports.Parameters.Parameter
|
||||
Friend WithEvents XrPanel1 As DevExpress.XtraReports.UI.XRPanel
|
||||
Friend WithEvents XrLabel22 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel19 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel20 As DevExpress.XtraReports.UI.XRLabel
|
||||
End Class
|
||||
627
GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb.bak
Normal file
627
GestionGrupoSanchoToro/Informes/xrCierreCaja.Designer.vb.bak
Normal file
@@ -0,0 +1,627 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Public Class xrCierreCaja
|
||||
Inherits DevExpress.XtraReports.UI.XtraReport
|
||||
|
||||
'XtraReport overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Designer
|
||||
'It can be modified using the Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim ShapeRectangle1 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle()
|
||||
Dim ShapeRectangle2 As DevExpress.XtraPrinting.Shape.ShapeRectangle = New DevExpress.XtraPrinting.Shape.ShapeRectangle()
|
||||
Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand()
|
||||
Me.XrPanel1 = New DevExpress.XtraReports.UI.XRPanel()
|
||||
Me.XrLabel22 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand()
|
||||
Me.Detail = New DevExpress.XtraReports.UI.DetailBand()
|
||||
Me.XrLabel19 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel20 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel17 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel18 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel3 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel5 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel1 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel2 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel4 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel6 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel14 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel13 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrShape2 = New DevExpress.XtraReports.UI.XRShape()
|
||||
Me.DetailReport = New DevExpress.XtraReports.UI.DetailReportBand()
|
||||
Me.Detail1 = New DevExpress.XtraReports.UI.DetailBand()
|
||||
Me.XrTable1 = New DevExpress.XtraReports.UI.XRTable()
|
||||
Me.XrTableRow1 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell1 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell2 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell6 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell7 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell9 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.GroupHeader1 = New DevExpress.XtraReports.UI.GroupHeaderBand()
|
||||
Me.XrTable2 = New DevExpress.XtraReports.UI.XRTable()
|
||||
Me.XrTableRow2 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell3 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell4 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell11 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell12 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell14 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand()
|
||||
Me.XrLabel16 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel15 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel12 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel11 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel10 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel9 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel8 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrLabel7 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrShape1 = New DevExpress.XtraReports.UI.XRShape()
|
||||
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
|
||||
Me.Fecha = New DevExpress.XtraReports.Parameters.Parameter()
|
||||
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
'
|
||||
'TopMargin
|
||||
'
|
||||
Me.TopMargin.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrPanel1})
|
||||
Me.TopMargin.Dpi = 254.0!
|
||||
Me.TopMargin.HeightF = 138.7708!
|
||||
Me.TopMargin.Name = "TopMargin"
|
||||
'
|
||||
'XrPanel1
|
||||
'
|
||||
Me.XrPanel1.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrPanel1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel22})
|
||||
Me.XrPanel1.Dpi = 254.0!
|
||||
Me.XrPanel1.LocationFloat = New DevExpress.Utils.PointFloat(67.24997!, 25.00001!)
|
||||
Me.XrPanel1.Name = "XrPanel1"
|
||||
Me.XrPanel1.SizeF = New System.Drawing.SizeF(963.0831!, 113.7708!)
|
||||
Me.XrPanel1.StylePriority.UseBorders = False
|
||||
'
|
||||
'XrLabel22
|
||||
'
|
||||
Me.XrLabel22.Dpi = 254.0!
|
||||
Me.XrLabel22.Font = New DevExpress.Drawing.DXFont("Arial", 12.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel22.LocationFloat = New DevExpress.Utils.PointFloat(25.40002!, 25.40002!)
|
||||
Me.XrLabel22.Name = "XrLabel22"
|
||||
Me.XrLabel22.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel22.SizeF = New System.Drawing.SizeF(444.5!, 58.42001!)
|
||||
Me.XrLabel22.StylePriority.UseFont = False
|
||||
Me.XrLabel22.StylePriority.UseTextAlignment = False
|
||||
Me.XrLabel22.Text = "CIERRE DE CAJA"
|
||||
Me.XrLabel22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter
|
||||
'
|
||||
'BottomMargin
|
||||
'
|
||||
Me.BottomMargin.Dpi = 254.0!
|
||||
Me.BottomMargin.HeightF = 50.0!
|
||||
Me.BottomMargin.Name = "BottomMargin"
|
||||
'
|
||||
'Detail
|
||||
'
|
||||
Me.Detail.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel19, Me.XrLabel20, Me.XrLabel17, Me.XrLabel18, Me.XrLabel3, Me.XrLabel5, Me.XrLabel1, Me.XrLabel2, Me.XrLabel4, Me.XrLabel6, Me.XrLabel14, Me.XrLabel13, Me.XrShape2})
|
||||
Me.Detail.Dpi = 254.0!
|
||||
Me.Detail.HeightF = 238.6076!
|
||||
Me.Detail.HierarchyPrintOptions.Indent = 50.8!
|
||||
Me.Detail.Name = "Detail"
|
||||
'
|
||||
'XrLabel19
|
||||
'
|
||||
Me.XrLabel19.Dpi = 254.0!
|
||||
Me.XrLabel19.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteCerrado]")})
|
||||
Me.XrLabel19.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel19.LocationFloat = New DevExpress.Utils.PointFloat(1704.458!, 131.6514!)
|
||||
Me.XrLabel19.Name = "XrLabel19"
|
||||
Me.XrLabel19.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel19.SizeF = New System.Drawing.SizeF(276.6497!, 58.42004!)
|
||||
Me.XrLabel19.StylePriority.UseFont = False
|
||||
Me.XrLabel19.StylePriority.UseTextAlignment = False
|
||||
Me.XrLabel19.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft
|
||||
Me.XrLabel19.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel20
|
||||
'
|
||||
Me.XrLabel20.Dpi = 254.0!
|
||||
Me.XrLabel20.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel20.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 131.6514!)
|
||||
Me.XrLabel20.Name = "XrLabel20"
|
||||
Me.XrLabel20.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel20.SizeF = New System.Drawing.SizeF(329.4233!, 58.42001!)
|
||||
Me.XrLabel20.StylePriority.UseFont = False
|
||||
Me.XrLabel20.Text = "Importe M. Cerrados:"
|
||||
'
|
||||
'XrLabel17
|
||||
'
|
||||
Me.XrLabel17.Dpi = 254.0!
|
||||
Me.XrLabel17.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[cajas].[Descripcion]")})
|
||||
Me.XrLabel17.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel17.LocationFloat = New DevExpress.Utils.PointFloat(824.3406!, 52.91675!)
|
||||
Me.XrLabel17.Name = "XrLabel17"
|
||||
Me.XrLabel17.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel17.SizeF = New System.Drawing.SizeF(518.9336!, 58.42002!)
|
||||
Me.XrLabel17.StylePriority.UseFont = False
|
||||
Me.XrLabel17.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
'
|
||||
'XrLabel18
|
||||
'
|
||||
Me.XrLabel18.Dpi = 254.0!
|
||||
Me.XrLabel18.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel18.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 52.91683!)
|
||||
Me.XrLabel18.Name = "XrLabel18"
|
||||
Me.XrLabel18.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel18.SizeF = New System.Drawing.SizeF(266.3013!, 58.41997!)
|
||||
Me.XrLabel18.StylePriority.UseFont = False
|
||||
Me.XrLabel18.Text = "Caja Cierre:"
|
||||
'
|
||||
'XrLabel3
|
||||
'
|
||||
Me.XrLabel3.Dpi = 254.0!
|
||||
Me.XrLabel3.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[cajas].[Descripcion]")})
|
||||
Me.XrLabel3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel3.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 52.91675!)
|
||||
Me.XrLabel3.Name = "XrLabel3"
|
||||
Me.XrLabel3.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel3.SizeF = New System.Drawing.SizeF(287.2332!, 58.42002!)
|
||||
Me.XrLabel3.StylePriority.UseFont = False
|
||||
Me.XrLabel3.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
'
|
||||
'XrLabel5
|
||||
'
|
||||
Me.XrLabel5.Dpi = 254.0!
|
||||
Me.XrLabel5.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel5.LocationFloat = New DevExpress.Utils.PointFloat(540.0046!, 131.6514!)
|
||||
Me.XrLabel5.Name = "XrLabel5"
|
||||
Me.XrLabel5.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel5.SizeF = New System.Drawing.SizeF(266.3012!, 58.41997!)
|
||||
Me.XrLabel5.StylePriority.UseFont = False
|
||||
Me.XrLabel5.Text = "Usuario que cierra:"
|
||||
'
|
||||
'XrLabel1
|
||||
'
|
||||
Me.XrLabel1.Dpi = 254.0!
|
||||
Me.XrLabel1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")})
|
||||
Me.XrLabel1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(219.5094!, 131.6514!)
|
||||
Me.XrLabel1.Name = "XrLabel1"
|
||||
Me.XrLabel1.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel1.SizeF = New System.Drawing.SizeF(287.2332!, 58.42004!)
|
||||
Me.XrLabel1.StylePriority.UseFont = False
|
||||
Me.XrLabel1.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel1.TextFormatString = "{0:dd/MM/yyyy}"
|
||||
'
|
||||
'XrLabel2
|
||||
'
|
||||
Me.XrLabel2.Dpi = 254.0!
|
||||
Me.XrLabel2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel2.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 131.6515!)
|
||||
Me.XrLabel2.Name = "XrLabel2"
|
||||
Me.XrLabel2.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel2.SizeF = New System.Drawing.SizeF(189.9501!, 58.41997!)
|
||||
Me.XrLabel2.StylePriority.UseFont = False
|
||||
Me.XrLabel2.Text = "Fecha Cierre:"
|
||||
'
|
||||
'XrLabel4
|
||||
'
|
||||
Me.XrLabel4.Dpi = 254.0!
|
||||
Me.XrLabel4.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[usuarios].[Nombre]")})
|
||||
Me.XrLabel4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel4.LocationFloat = New DevExpress.Utils.PointFloat(824.3407!, 131.6514!)
|
||||
Me.XrLabel4.Name = "XrLabel4"
|
||||
Me.XrLabel4.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel4.SizeF = New System.Drawing.SizeF(518.9335!, 58.42004!)
|
||||
Me.XrLabel4.StylePriority.UseFont = False
|
||||
Me.XrLabel4.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
'
|
||||
'XrLabel6
|
||||
'
|
||||
Me.XrLabel6.Dpi = 254.0!
|
||||
Me.XrLabel6.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel6.LocationFloat = New DevExpress.Utils.PointFloat(29.55924!, 52.91667!)
|
||||
Me.XrLabel6.Name = "XrLabel6"
|
||||
Me.XrLabel6.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel6.SizeF = New System.Drawing.SizeF(189.9501!, 58.41999!)
|
||||
Me.XrLabel6.StylePriority.UseFont = False
|
||||
Me.XrLabel6.Text = "Nº Cierre"
|
||||
'
|
||||
'XrLabel14
|
||||
'
|
||||
Me.XrLabel14.Dpi = 254.0!
|
||||
Me.XrLabel14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel14.LocationFloat = New DevExpress.Utils.PointFloat(1356.514!, 52.91675!)
|
||||
Me.XrLabel14.Name = "XrLabel14"
|
||||
Me.XrLabel14.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel14.SizeF = New System.Drawing.SizeF(252.316!, 58.41997!)
|
||||
Me.XrLabel14.StylePriority.UseFont = False
|
||||
Me.XrLabel14.Text = "Fecha Impresión:"
|
||||
'
|
||||
'XrLabel13
|
||||
'
|
||||
Me.XrLabel13.Dpi = 254.0!
|
||||
Me.XrLabel13.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "?Fecha")})
|
||||
Me.XrLabel13.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel13.LocationFloat = New DevExpress.Utils.PointFloat(1619.414!, 52.91659!)
|
||||
Me.XrLabel13.Name = "XrLabel13"
|
||||
Me.XrLabel13.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel13.SizeF = New System.Drawing.SizeF(362.6234!, 58.42004!)
|
||||
Me.XrLabel13.StylePriority.UseFont = False
|
||||
Me.XrLabel13.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel13.TextFormatString = "{0:dd/MM/yyyy}"
|
||||
'
|
||||
'XrShape2
|
||||
'
|
||||
Me.XrShape2.Dpi = 254.0!
|
||||
Me.XrShape2.FillColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.XrShape2.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!)
|
||||
Me.XrShape2.Name = "XrShape2"
|
||||
ShapeRectangle1.Fillet = 20
|
||||
Me.XrShape2.Shape = ShapeRectangle1
|
||||
Me.XrShape2.SizeF = New System.Drawing.SizeF(1986.233!, 199.8627!)
|
||||
'
|
||||
'DetailReport
|
||||
'
|
||||
Me.DetailReport.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.Detail1, Me.GroupHeader1, Me.GroupFooter1})
|
||||
Me.DetailReport.DataMember = "MovimientosDelCierre"
|
||||
Me.DetailReport.DataSource = Me.ObjectDataSource1
|
||||
Me.DetailReport.Dpi = 254.0!
|
||||
Me.DetailReport.Level = 0
|
||||
Me.DetailReport.Name = "DetailReport"
|
||||
'
|
||||
'Detail1
|
||||
'
|
||||
Me.Detail1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable1})
|
||||
Me.Detail1.Dpi = 254.0!
|
||||
Me.Detail1.HeightF = 47.28944!
|
||||
Me.Detail1.HierarchyPrintOptions.Indent = 50.8!
|
||||
Me.Detail1.Name = "Detail1"
|
||||
Me.Detail1.SortFields.AddRange(New DevExpress.XtraReports.UI.GroupField() {New DevExpress.XtraReports.UI.GroupField("idMovimiento", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)})
|
||||
'
|
||||
'XrTable1
|
||||
'
|
||||
Me.XrTable1.Dpi = 254.0!
|
||||
Me.XrTable1.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrTable1.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!)
|
||||
Me.XrTable1.Name = "XrTable1"
|
||||
Me.XrTable1.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow1})
|
||||
Me.XrTable1.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!)
|
||||
Me.XrTable1.StylePriority.UseFont = False
|
||||
'
|
||||
'XrTableRow1
|
||||
'
|
||||
Me.XrTableRow1.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell1, Me.XrTableCell2, Me.XrTableCell6, Me.XrTableCell7, Me.XrTableCell9})
|
||||
Me.XrTableRow1.Dpi = 254.0!
|
||||
Me.XrTableRow1.Name = "XrTableRow1"
|
||||
Me.XrTableRow1.Weight = 11.5R
|
||||
'
|
||||
'XrTableCell1
|
||||
'
|
||||
Me.XrTableCell1.Dpi = 254.0!
|
||||
Me.XrTableCell1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Descripcion]")})
|
||||
Me.XrTableCell1.Name = "XrTableCell1"
|
||||
Me.XrTableCell1.StylePriority.UseFont = False
|
||||
Me.XrTableCell1.Text = "XrTableCell1"
|
||||
Me.XrTableCell1.Weight = 0.65133730026355985R
|
||||
'
|
||||
'XrTableCell2
|
||||
'
|
||||
Me.XrTableCell2.Dpi = 254.0!
|
||||
Me.XrTableCell2.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Fecha]")})
|
||||
Me.XrTableCell2.Name = "XrTableCell2"
|
||||
Me.XrTableCell2.Text = "XrTableCell2"
|
||||
Me.XrTableCell2.TextFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||
Me.XrTableCell2.Weight = 0.14856320511943927R
|
||||
'
|
||||
'XrTableCell6
|
||||
'
|
||||
Me.XrTableCell6.Dpi = 254.0!
|
||||
Me.XrTableCell6.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[idMovimiento]")})
|
||||
Me.XrTableCell6.Name = "XrTableCell6"
|
||||
Me.XrTableCell6.Text = "XrTableCell6"
|
||||
Me.XrTableCell6.Weight = 0.15225145388319286R
|
||||
'
|
||||
'XrTableCell7
|
||||
'
|
||||
Me.XrTableCell7.Dpi = 254.0!
|
||||
Me.XrTableCell7.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Importe]")})
|
||||
Me.XrTableCell7.Name = "XrTableCell7"
|
||||
Me.XrTableCell7.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell7.Text = "XrTableCell7"
|
||||
Me.XrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight
|
||||
Me.XrTableCell7.TextFormatString = "{0:c2}"
|
||||
Me.XrTableCell7.Weight = 0.12158946848324614R
|
||||
'
|
||||
'XrTableCell9
|
||||
'
|
||||
Me.XrTableCell9.Dpi = 254.0!
|
||||
Me.XrTableCell9.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[usuarios].[Usuario]")})
|
||||
Me.XrTableCell9.Name = "XrTableCell9"
|
||||
Me.XrTableCell9.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell9.Text = "XrTableCell9"
|
||||
Me.XrTableCell9.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter
|
||||
Me.XrTableCell9.Weight = 0.14983867201936621R
|
||||
'
|
||||
'GroupHeader1
|
||||
'
|
||||
Me.GroupHeader1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrTable2})
|
||||
Me.GroupHeader1.Dpi = 254.0!
|
||||
Me.GroupHeader1.HeightF = 56.78311!
|
||||
Me.GroupHeader1.Name = "GroupHeader1"
|
||||
'
|
||||
'XrTable2
|
||||
'
|
||||
Me.XrTable2.BackColor = System.Drawing.Color.Silver
|
||||
Me.XrTable2.Dpi = 254.0!
|
||||
Me.XrTable2.Font = New DevExpress.Drawing.DXFont("Segoe UI", 9.75!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTable2.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTable2.LocationFloat = New DevExpress.Utils.PointFloat(13.76761!, 0!)
|
||||
Me.XrTable2.Name = "XrTable2"
|
||||
Me.XrTable2.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow2})
|
||||
Me.XrTable2.SizeF = New System.Drawing.SizeF(1961.232!, 47.28944!)
|
||||
Me.XrTable2.StylePriority.UseBackColor = False
|
||||
Me.XrTable2.StylePriority.UseFont = False
|
||||
Me.XrTable2.StylePriority.UseForeColor = False
|
||||
'
|
||||
'XrTableRow2
|
||||
'
|
||||
Me.XrTableRow2.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell3, Me.XrTableCell4, Me.XrTableCell11, Me.XrTableCell12, Me.XrTableCell14})
|
||||
Me.XrTableRow2.Dpi = 254.0!
|
||||
Me.XrTableRow2.Name = "XrTableRow2"
|
||||
Me.XrTableRow2.Weight = 11.5R
|
||||
'
|
||||
'XrTableCell3
|
||||
'
|
||||
Me.XrTableCell3.Dpi = 254.0!
|
||||
Me.XrTableCell3.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell3.Name = "XrTableCell3"
|
||||
Me.XrTableCell3.StylePriority.UseFont = False
|
||||
Me.XrTableCell3.Text = "Descripción"
|
||||
Me.XrTableCell3.Weight = 0.651216911310395R
|
||||
'
|
||||
'XrTableCell4
|
||||
'
|
||||
Me.XrTableCell4.Dpi = 254.0!
|
||||
Me.XrTableCell4.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell4.Name = "XrTableCell4"
|
||||
Me.XrTableCell4.StylePriority.UseFont = False
|
||||
Me.XrTableCell4.Text = "Fecha"
|
||||
Me.XrTableCell4.Weight = 0.14853577036309199R
|
||||
'
|
||||
'XrTableCell11
|
||||
'
|
||||
Me.XrTableCell11.Dpi = 254.0!
|
||||
Me.XrTableCell11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell11.Name = "XrTableCell11"
|
||||
Me.XrTableCell11.StylePriority.UseFont = False
|
||||
Me.XrTableCell11.Text = "Nº Movimiento"
|
||||
Me.XrTableCell11.Weight = 0.15222340015547486R
|
||||
'
|
||||
'XrTableCell12
|
||||
'
|
||||
Me.XrTableCell12.Dpi = 254.0!
|
||||
Me.XrTableCell12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell12.Name = "XrTableCell12"
|
||||
Me.XrTableCell12.StylePriority.UseFont = False
|
||||
Me.XrTableCell12.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell12.Text = "Importe"
|
||||
Me.XrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight
|
||||
Me.XrTableCell12.Weight = 0.10990615377483919R
|
||||
'
|
||||
'XrTableCell14
|
||||
'
|
||||
Me.XrTableCell14.Dpi = 254.0!
|
||||
Me.XrTableCell14.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrTableCell14.Name = "XrTableCell14"
|
||||
Me.XrTableCell14.StylePriority.UseFont = False
|
||||
Me.XrTableCell14.StylePriority.UseTextAlignment = False
|
||||
Me.XrTableCell14.Text = "Usuario"
|
||||
Me.XrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter
|
||||
Me.XrTableCell14.Weight = 0.16147183210373589R
|
||||
'
|
||||
'GroupFooter1
|
||||
'
|
||||
Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel16, Me.XrLabel15, Me.XrLabel12, Me.XrLabel11, Me.XrLabel10, Me.XrLabel9, Me.XrLabel8, Me.XrLabel7, Me.XrShape1})
|
||||
Me.GroupFooter1.Dpi = 254.0!
|
||||
Me.GroupFooter1.HeightF = 238.7961!
|
||||
Me.GroupFooter1.Name = "GroupFooter1"
|
||||
'
|
||||
'XrLabel16
|
||||
'
|
||||
Me.XrLabel16.Dpi = 254.0!
|
||||
Me.XrLabel16.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoAntesCierre]")})
|
||||
Me.XrLabel16.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel16.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 47.36097!)
|
||||
Me.XrLabel16.Name = "XrLabel16"
|
||||
Me.XrLabel16.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel16.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!)
|
||||
Me.XrLabel16.StylePriority.UseFont = False
|
||||
Me.XrLabel16.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel16.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel15
|
||||
'
|
||||
Me.XrLabel15.Dpi = 254.0!
|
||||
Me.XrLabel15.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel15.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 47.36121!)
|
||||
Me.XrLabel15.Name = "XrLabel15"
|
||||
Me.XrLabel15.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel15.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!)
|
||||
Me.XrLabel15.StylePriority.UseFont = False
|
||||
Me.XrLabel15.Text = "Saldo Cierre Anterior:"
|
||||
'
|
||||
'XrLabel12
|
||||
'
|
||||
Me.XrLabel12.Dpi = 254.0!
|
||||
Me.XrLabel12.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[SaldoDespuesCierre]")})
|
||||
Me.XrLabel12.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel12.LocationFloat = New DevExpress.Utils.PointFloat(430.3529!, 139.5012!)
|
||||
Me.XrLabel12.Name = "XrLabel12"
|
||||
Me.XrLabel12.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel12.SizeF = New System.Drawing.SizeF(274.0038!, 58.42003!)
|
||||
Me.XrLabel12.StylePriority.UseFont = False
|
||||
Me.XrLabel12.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel12.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel11
|
||||
'
|
||||
Me.XrLabel11.Dpi = 254.0!
|
||||
Me.XrLabel11.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel11.LocationFloat = New DevExpress.Utils.PointFloat(845.7034!, 47.36105!)
|
||||
Me.XrLabel11.Name = "XrLabel11"
|
||||
Me.XrLabel11.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel11.SizeF = New System.Drawing.SizeF(292.7596!, 58.41998!)
|
||||
Me.XrLabel11.StylePriority.UseFont = False
|
||||
Me.XrLabel11.Text = "Importe Entrada:"
|
||||
'
|
||||
'XrLabel10
|
||||
'
|
||||
Me.XrLabel10.Dpi = 254.0!
|
||||
Me.XrLabel10.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteEntradasMovimientosCerrados]")})
|
||||
Me.XrLabel10.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel10.LocationFloat = New DevExpress.Utils.PointFloat(1154.338!, 47.36113!)
|
||||
Me.XrLabel10.Name = "XrLabel10"
|
||||
Me.XrLabel10.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel10.SizeF = New System.Drawing.SizeF(263.0427!, 58.42005!)
|
||||
Me.XrLabel10.StylePriority.UseFont = False
|
||||
Me.XrLabel10.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel10.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel9
|
||||
'
|
||||
Me.XrLabel9.Dpi = 254.0!
|
||||
Me.XrLabel9.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel9.LocationFloat = New DevExpress.Utils.PointFloat(1445.093!, 47.36113!)
|
||||
Me.XrLabel9.Name = "XrLabel9"
|
||||
Me.XrLabel9.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel9.SizeF = New System.Drawing.SizeF(289.7356!, 58.41998!)
|
||||
Me.XrLabel9.StylePriority.UseFont = False
|
||||
Me.XrLabel9.Text = "Importe Salida:"
|
||||
'
|
||||
'XrLabel8
|
||||
'
|
||||
Me.XrLabel8.Dpi = 254.0!
|
||||
Me.XrLabel8.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ImporteSalidasMovimientosCerrados]")})
|
||||
Me.XrLabel8.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!)
|
||||
Me.XrLabel8.LocationFloat = New DevExpress.Utils.PointFloat(1734.828!, 47.36105!)
|
||||
Me.XrLabel8.Name = "XrLabel8"
|
||||
Me.XrLabel8.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel8.SizeF = New System.Drawing.SizeF(240.1718!, 58.42003!)
|
||||
Me.XrLabel8.StylePriority.UseFont = False
|
||||
Me.XrLabel8.Text = "[profesores.Nombre] [Profesores.Apellidos]"
|
||||
Me.XrLabel8.TextFormatString = "{0:c2}"
|
||||
'
|
||||
'XrLabel7
|
||||
'
|
||||
Me.XrLabel7.Dpi = 254.0!
|
||||
Me.XrLabel7.Font = New DevExpress.Drawing.DXFont("Segoe UI", 8.0!, DevExpress.Drawing.DXFontStyle.Bold)
|
||||
Me.XrLabel7.LocationFloat = New DevExpress.Utils.PointFloat(55.95015!, 139.5012!)
|
||||
Me.XrLabel7.Name = "XrLabel7"
|
||||
Me.XrLabel7.Padding = New DevExpress.XtraPrinting.PaddingInfo(5, 5, 0, 0, 254.0!)
|
||||
Me.XrLabel7.SizeF = New System.Drawing.SizeF(353.2359!, 58.41998!)
|
||||
Me.XrLabel7.StylePriority.UseFont = False
|
||||
Me.XrLabel7.Text = "Saldo Caja Al Cierre:"
|
||||
'
|
||||
'XrShape1
|
||||
'
|
||||
Me.XrShape1.Dpi = 254.0!
|
||||
Me.XrShape1.FillColor = System.Drawing.Color.WhiteSmoke
|
||||
Me.XrShape1.LocationFloat = New DevExpress.Utils.PointFloat(13.76757!, 25.00001!)
|
||||
Me.XrShape1.Name = "XrShape1"
|
||||
ShapeRectangle2.Fillet = 20
|
||||
Me.XrShape1.Shape = ShapeRectangle2
|
||||
Me.XrShape1.SizeF = New System.Drawing.SizeF(1986.233!, 213.7961!)
|
||||
'
|
||||
'ObjectDataSource1
|
||||
'
|
||||
Me.ObjectDataSource1.DataSource = GetType(bdGrupoSanchoToro.db.movimientoscaja)
|
||||
Me.ObjectDataSource1.Name = "ObjectDataSource1"
|
||||
'
|
||||
'Fecha
|
||||
'
|
||||
Me.Fecha.Description = "Parameter1"
|
||||
Me.Fecha.Name = "Fecha"
|
||||
Me.Fecha.Type = GetType(Integer)
|
||||
Me.Fecha.ValueInfo = "0"
|
||||
'
|
||||
'xrCierreCaja
|
||||
'
|
||||
Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.Detail, Me.DetailReport})
|
||||
Me.ComponentStorage.AddRange(New System.ComponentModel.IComponent() {Me.ObjectDataSource1})
|
||||
Me.DataSource = Me.ObjectDataSource1
|
||||
Me.Dpi = 254.0!
|
||||
Me.Font = New DevExpress.Drawing.DXFont("Arial", 9.75!)
|
||||
Me.Margins = New DevExpress.Drawing.DXMargins(50, 50, 139, 50)
|
||||
Me.PageHeight = 2970
|
||||
Me.PageWidth = 2100
|
||||
Me.PaperKind = System.Drawing.Printing.PaperKind.A4
|
||||
Me.Parameters.AddRange(New DevExpress.XtraReports.Parameters.Parameter() {Me.Fecha})
|
||||
Me.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter
|
||||
Me.SnapGridSize = 25.0!
|
||||
Me.Version = "19.2"
|
||||
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents TopMargin As DevExpress.XtraReports.UI.TopMarginBand
|
||||
Friend WithEvents BottomMargin As DevExpress.XtraReports.UI.BottomMarginBand
|
||||
Friend WithEvents Detail As DevExpress.XtraReports.UI.DetailBand
|
||||
Friend WithEvents XrLabel3 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel5 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel1 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel2 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel4 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel6 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel14 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel13 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrShape2 As DevExpress.XtraReports.UI.XRShape
|
||||
Friend WithEvents ObjectDataSource1 As DevExpress.DataAccess.ObjectBinding.ObjectDataSource
|
||||
Friend WithEvents DetailReport As DevExpress.XtraReports.UI.DetailReportBand
|
||||
Friend WithEvents Detail1 As DevExpress.XtraReports.UI.DetailBand
|
||||
Friend WithEvents XrTable1 As DevExpress.XtraReports.UI.XRTable
|
||||
Friend WithEvents XrTableRow1 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell1 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell2 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell6 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell7 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell9 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents GroupHeader1 As DevExpress.XtraReports.UI.GroupHeaderBand
|
||||
Friend WithEvents XrTable2 As DevExpress.XtraReports.UI.XRTable
|
||||
Friend WithEvents XrTableRow2 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell3 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell4 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell11 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell12 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell14 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents GroupFooter1 As DevExpress.XtraReports.UI.GroupFooterBand
|
||||
Friend WithEvents XrLabel12 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel11 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel10 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel9 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel8 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel7 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrShape1 As DevExpress.XtraReports.UI.XRShape
|
||||
Friend WithEvents XrLabel16 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel15 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel17 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel18 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents Fecha As DevExpress.XtraReports.Parameters.Parameter
|
||||
Friend WithEvents XrPanel1 As DevExpress.XtraReports.UI.XRPanel
|
||||
Friend WithEvents XrLabel22 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel19 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrLabel20 As DevExpress.XtraReports.UI.XRLabel
|
||||
End Class
|
||||
120
GestionGrupoSanchoToro/Informes/xrCierreCaja.resx
Normal file
120
GestionGrupoSanchoToro/Informes/xrCierreCaja.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
3
GestionGrupoSanchoToro/Informes/xrCierreCaja.vb
Normal file
3
GestionGrupoSanchoToro/Informes/xrCierreCaja.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Class xrCierreCaja
|
||||
|
||||
End Class
|
||||
82
GestionGrupoSanchoToro/ListadosYProcesos.vb
Normal file
82
GestionGrupoSanchoToro/ListadosYProcesos.vb
Normal file
@@ -0,0 +1,82 @@
|
||||
Imports System.Data.OleDb
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.productos
|
||||
Imports DevExpress.Spreadsheet
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports VeriFactu.Business
|
||||
Partial Public Class ListadosYProcesos
|
||||
|
||||
|
||||
Public Shared Function CierraCaja(idCaja As Integer, Optional ImprimirCierre As Boolean = False) As String
|
||||
Dim bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Dim Caja = bd.cajas.First(Function(x) x.idCaja = idCaja)
|
||||
Dim mac = Caja.movimientoscaja.Where(Function(x) x.idMovimientoCierre.HasValue = False)
|
||||
'Dim SaldoACerrar = mac.Sum(Function(x) x.Importe)
|
||||
Dim mc = New movimientoscaja
|
||||
With mc
|
||||
.Tipo = TipoMovimientoEnum.CIERRE_CAJA
|
||||
.Importe = 0
|
||||
.Observaciones = "Importe Movimientos Cerrados: " & Caja.SaldoPendienteCierre.ToString("0.##") & " €. Saldo en Caja: " & Caja.SaldoActual.ToString("0.##'") & "€."
|
||||
.Fecha = Now
|
||||
.FechaCreacion = Now
|
||||
.idCaja = Caja.idCaja
|
||||
.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
.DocumentoPago = ""
|
||||
.SaldoAntesCierre = Caja.SaldoAlCierre
|
||||
End With
|
||||
bd.movimientoscaja.Add(mc)
|
||||
Caja.SaldoAlCierre = Caja.SaldoActual
|
||||
Caja.FechaCierre = Now
|
||||
bd.GuardarCambios()
|
||||
For Each m In mac
|
||||
m.idMovimientoCierre = mc.idMovimiento
|
||||
Next
|
||||
bd.GuardarCambios()
|
||||
If ImprimirCierre Then
|
||||
Dim lm As New List(Of movimientoscaja)
|
||||
lm.Add(mc)
|
||||
Dim xr As New xrCierreCaja
|
||||
Informes.ImprimeInforme(xr, False, 1, bd.AhoraMySql, lm)
|
||||
End If
|
||||
Return mc.Observaciones
|
||||
End Function
|
||||
|
||||
Friend Shared Sub Anadelogtxt(ByVal Mensaje As String, ByVal FicheroLog As String)
|
||||
|
||||
Dim sw As IO.StreamWriter = Nothing
|
||||
Try
|
||||
Mensaje = Mensaje.Replace(vbCrLf, "---")
|
||||
If IO.File.Exists(FicheroLog) Then
|
||||
sw = IO.File.AppendText(FicheroLog)
|
||||
Else
|
||||
sw = IO.File.CreateText(FicheroLog)
|
||||
End If
|
||||
Mensaje = Now.ToString & "|" & "Ws: " & System.Diagnostics.Process.GetCurrentProcess.WorkingSet64.ToString.PadLeft(20) &
|
||||
" PMS: " & System.Diagnostics.Process.GetCurrentProcess.PrivateMemorySize64.ToString.PadLeft(20) & "|" & Mensaje
|
||||
|
||||
sw.WriteLine(Mensaje)
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
Finally
|
||||
Try
|
||||
sw.Close()
|
||||
Catch
|
||||
End Try
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
'Public Shared Sub PruebaVeriFactu()
|
||||
' Dim conf As New VeriFactu.Config.Settings()
|
||||
' Debug.WriteLine(conf.CertificatePath)
|
||||
|
||||
' Dim invoice = New Invoice("GITHUB-EJ-002", New DateTime(2024, 11, 4), "B72877814")
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
10
GestionGrupoSanchoToro/My Project/Application.myapp
Normal file
10
GestionGrupoSanchoToro/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>dxwInicio</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
73
GestionGrupoSanchoToro/My Project/Resources.Designer.vb
generated
Normal file
73
GestionGrupoSanchoToro/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Este código fue generado por una herramienta.
|
||||
' Versión de runtime:4.0.30319.42000
|
||||
'
|
||||
' Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||
' se vuelve a generar el código.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'StronglyTypedResourceBuilder generó automáticamente esta clase
|
||||
'a través de una herramienta como ResGen o Visual Studio.
|
||||
'Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
|
||||
'con la opción /str o recompile su proyecto de VS.
|
||||
'''<summary>
|
||||
''' Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("GrupoSanchoToro.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
|
||||
''' búsquedas de recursos mediante esta clase de recurso fuertemente tipado.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Busca un recurso adaptado de tipo System.Byte[].
|
||||
'''</summary>
|
||||
Friend ReadOnly Property STSur() As Byte()
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("STSur", resourceCulture)
|
||||
Return CType(obj,Byte())
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
124
GestionGrupoSanchoToro/My Project/Resources.resx
Normal file
124
GestionGrupoSanchoToro/My Project/Resources.resx
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="STSur" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\STSur.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
73
GestionGrupoSanchoToro/My Project/Settings.Designer.vb
generated
Normal file
73
GestionGrupoSanchoToro/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Este código fue generado por una herramienta.
|
||||
' Versión de runtime:4.0.30319.42000
|
||||
'
|
||||
' Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||
' se vuelve a generar el código.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Funcionalidad para autoguardar My.Settings"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.GrupoSanchoToro.My.MySettings
|
||||
Get
|
||||
Return Global.GrupoSanchoToro.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
6
GestionGrupoSanchoToro/My Project/Settings.settings
Normal file
6
GestionGrupoSanchoToro/My Project/Settings.settings
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
</SettingsFile>
|
||||
1
GestionGrupoSanchoToro/Properties/Licenses.licx
Normal file
1
GestionGrupoSanchoToro/Properties/Licenses.licx
Normal file
@@ -0,0 +1 @@
|
||||
DevExpress.Xpf.RichEdit.RichEditControl, DevExpress.Xpf.RichEdit.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
5
GestionGrupoSanchoToro/Publicacion/Publicar.cmd
Normal file
5
GestionGrupoSanchoToro/Publicacion/Publicar.cmd
Normal file
@@ -0,0 +1,5 @@
|
||||
"C:\Program Files\7-Zip\7z.exe" a -tzip -r "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.zip" "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\bin\Debug\net8.0-windows7.0\*.*"
|
||||
"C:\Program Files (x86)\winscp\WinSCP.com" /ini=null /log=c:\tmp\ftp.log /script=C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\winscpftp.txt
|
||||
del "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.zip"
|
||||
del "C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\null"
|
||||
pause
|
||||
239
GestionGrupoSanchoToro/Publicacion/changelog.htm
Normal file
239
GestionGrupoSanchoToro/Publicacion/changelog.htm
Normal file
@@ -0,0 +1,239 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
<meta name="generator" content="LibreOffice 25.2.7.2 (Windows)"/>
|
||||
<meta name="created" content="00:00:00"/>
|
||||
<meta name="changed" content="2025-12-12T19:41:18.394711000"/>
|
||||
<meta name="Originator" content="Microsoft Word 15"/>
|
||||
<meta name="ProgId" content="Word.Document"/>
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<meta name="created" content="00:00:00">
|
||||
<style type="text/css">
|
||||
@page { size: 21cm 29.7cm; margin-left: 2cm; margin-right: 1cm; margin-top: 1cm; margin-bottom: 1cm }
|
||||
p { color: #000000; background: transparent; line-height: 115%; margin-bottom: 0.25cm; background: transparent }
|
||||
a:link { color: #000080; text-decoration: underline }
|
||||
a:visited { color: #800000; text-decoration: underline }
|
||||
</style>
|
||||
</head>
|
||||
<body lang="es-ES" text="#000000" link="#000080" vlink="#800000" dir="ltr"><p>
|
||||
<u><b>Cambios en las versiones:</b></u></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>1</b><b>2/12</b><b>/2025</b> <b>Modificaciones en la
|
||||
versión 1.0.0.3</b><b>1</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New">o</font><span style="font-variant: normal">
|
||||
</span><span style="font-variant: normal"><b>C</b></span><b>orrección
|
||||
problema multiempresa</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>1</b><b>8/11</b><b>1/2025</b> <b>Modificaciones en la
|
||||
versión 1.0.0.3</b><b>0</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New">o</font><span style="font-variant: normal">
|
||||
</span><span style="font-variant: normal"><b>C</b></span><b>orrección
|
||||
problema multiempresa</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>08/10/2025</b> <b>Modificaciones en la versión 1.0.0.29</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New">o</font><span style="font-variant: normal">
|
||||
</span><span style="font-variant: normal"><b>C</b></span><b>orrección
|
||||
problema multiempresa</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>07/10/2025</b> <b>Modificaciones en la versión 1.0.0.28</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New">o</font><span style="font-variant: normal">
|
||||
</span><span style="font-variant: normal"><b>C</b></span><b>orrección
|
||||
problema duplicados</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>06/10/2025</b> <b>Modificaciones en la versión 1.0.0.27</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New">o</font><span style="font-variant: normal">
|
||||
</span><span style="font-variant: normal"><b>C</b></span><b>orrección
|
||||
aplicación de Clientes/Proveedores</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>03/10/2025</b> <b>Modificaciones en la versión 1.0.0.25</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New">o</font><span style="font-variant: normal">
|
||||
</span>Se incluye la empresa Hermanos Murga</p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>15/07/2025</b> <b>Modificaciones en la versión 1.0.0.24</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se corrige problema al en facturas emitidas.</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>30/05/2025</b> <b>Modificaciones en la versión 1.0.0.23</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se añade campo de Observaciones en Impresión a la
|
||||
pantalla de facturas emitidas.</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se corrige problema al imprimir.</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>04/04/2025</b> <b>Modificaciones en la versión 1.0.0.22</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se corrige error de campo obligatorio producto en facturas
|
||||
de venta.</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>13/03/2025</b> <b>Modificaciones en la versión 1.0.0.21</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se permite eliminar facturas recibidas.</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>12/03/2025</b> <b>Modificaciones en la versión 1.0.0.20</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Corrección aplicación de facturas Emitidas en redondeos</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>12/02/2025</b> <b>Modificaciones en la versión 1.0.0.18</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Corrección aplicación de IRPF en facturas Emitidas</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se adjunta en los correos para la asesoría la factura
|
||||
escaneada (tanto en recibidas como emitidas)</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>07/02/2025</b> <b>Modificaciones en la versión 1.0.0.17</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se Añade campo en series de factura para indicar que el
|
||||
IRPF se calcula después de IVA</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se permite eliminar facturas de clientes si son del tipo
|
||||
“Emitidas por el Cliente”</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>24/01/2025</b> <b>Modificaciones en la versión 1.0.0.16</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>07/01/2025</b> <b>Modificaciones en la versión 1.0.0.15</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>14/11/2024 Modificaciones en la versión 1.0.0.14</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>12/11/2024 Modificaciones en la versión 1.0.0.13</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>11/11/2024 Modificaciones en la versión 1.0.0.12</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>04/12/2024 Modificaciones en la versión 1.0.0.11</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>02/12/2024 Modificaciones en la versión 1.0.0.10</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>29/11/2024 Modificaciones en la versión 1.0.0.9</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>27/11/2024 Modificaciones en la versión 1.0.0.8</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>25/11/2024 Modificaciones en la versión 1.0.0.7</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Corrección en campos obligatorios en facturas recibidas</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Corrección en aplicación de Conciliaciones Bancarias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>21/11/2024 Modificaciones en la versión 1.0.0.6</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>21/11/2024 Modificaciones en la versión 1.0.0.6</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Correcciones varias</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>17/11/2024 Modificaciones en la versión 1.0.0.5</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 115%; margin-left: 2.54cm">
|
||||
<font face="Courier New"><font size="2" style="font-size: 10pt">o</font></font><span style="font-variant: normal">
|
||||
</span><b>Se añade Tipo de IVA Exento.</b></p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>16/11/2024 Modificaciones en la versión 1.0.0.4</b></p>
|
||||
<p style="text-indent: -0.64cm; margin-left: 2.54cm">1.<span style="font-variant: normal">
|
||||
</span>Correcciones en fechas de facturas emitidas y recibidas.</p>
|
||||
<p style="text-indent: -0.64cm; line-height: 105%; margin-left: 1.27cm">
|
||||
<font face="Symbol"><font size="2" style="font-size: 10pt">·</font></font><span style="font-variant: normal">
|
||||
</span><b>11/11/2024 Modificaciones en la versión 1.0.0.3</b></p>
|
||||
<p style="text-indent: -0.64cm; margin-left: 2.54cm">1.<span style="font-variant: normal">
|
||||
</span>Correcciones en productos.</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<a:clrMap xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/>
|
||||
@@ -0,0 +1,6 @@
|
||||
<xml xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
<o:MainFile HRef="../changelog.htm"/>
|
||||
<o:File HRef="themedata.thmx"/>
|
||||
<o:File HRef="colorschememapping.xml"/>
|
||||
<o:File HRef="filelist.xml"/>
|
||||
</xml>
|
||||
Binary file not shown.
6
GestionGrupoSanchoToro/Publicacion/m3Factu.xml
Normal file
6
GestionGrupoSanchoToro/Publicacion/m3Factu.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<item>
|
||||
<version>1.0.0.31</version>
|
||||
<url>https://www.english-skills.net/GrupoSanchoToro/GrupoSanchoToro.zip</url>
|
||||
<changelog>https://www.english-skills.net/GrupoSanchoToro/changelog.htm</changelog>
|
||||
<mandatory>true</mandatory>
|
||||
</item>
|
||||
5
GestionGrupoSanchoToro/Publicacion/winscpftp.txt
Normal file
5
GestionGrupoSanchoToro/Publicacion/winscpftp.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
open ftp://manuel:tsl4net.Ts87@192.168.200.1:993/ -explicittls -certificate=*
|
||||
put C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.zip /inetpub/wwwroot/GrupoSanchoToro/
|
||||
put C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\GrupoSanchoToro.xml /inetpub/wwwroot/GrupoSanchoToro/
|
||||
put C:\m3soft\vs.net\GrupoSanchoToro\GrupoSanchoToro\Publicacion\changelog.htm /inetpub/wwwroot/GrupoSanchoToro/
|
||||
exit
|
||||
BIN
GestionGrupoSanchoToro/Resources/LogoTcsColor.png
Normal file
BIN
GestionGrupoSanchoToro/Resources/LogoTcsColor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
BIN
GestionGrupoSanchoToro/Resources/STSur.jpg
Normal file
BIN
GestionGrupoSanchoToro/Resources/STSur.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
BIN
GestionGrupoSanchoToro/Resources/stsur.ico
Normal file
BIN
GestionGrupoSanchoToro/Resources/stsur.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
GestionGrupoSanchoToro/Resources/stsur_simple_icon_32x32.png
Normal file
BIN
GestionGrupoSanchoToro/Resources/stsur_simple_icon_32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,37 @@
|
||||
<dx:DXWindow
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
x:Class="dxwAgregarNuevoCodigoPostal"
|
||||
Title="Atención el código postal indicado no se encuentra en nuestra B.D. Por favor introduzca los siguientes datos." Height="230" Width="680" ShowInTaskbar="True" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" ShowIcon="False" ResizeMode="NoResize" >
|
||||
<Grid x:Name="grid">
|
||||
<dxlc:LayoutControl Header="Header" Orientation="Vertical" UseLayoutRounding="True" View="GroupBox" >
|
||||
<dxlc:LayoutGroup x:Name="lgTotalesClase" IsCollapsible="True" IsLocked="True" Height="Auto" HorizontalAlignment="Stretch" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical" >
|
||||
<tsWPF:tsLayoutItem Label="Nuevo Código Postal:" FontWeight="Bold" HorizontalAlignment="Left" Width="300">
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teCodigoPostal" IsEnabled="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Municipio:" FontWeight="Bold" HorizontalAlignment="Left" Width="500" >
|
||||
<dxe:ComboBoxEdit TabIndex="1" x:Name="cbMunicipio" IsEnabled="True" ValueMember="CodigoMunicipio" DisplayMember="Nombre" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Provincia:" FontWeight="Bold" HorizontalAlignment="Left" Width="500" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teProvincia" IsEnabled="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Descripción Adicional (Opcional):" HorizontalAlignment="Left" Width="500">
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teDescripcionAdicional" IsEnabled="True" MaxLength="80" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Height="35" Margin="0,30" >
|
||||
<Button x:Name="btAceptar" Click="btAceptar_Click" Width="100" HorizontalAlignment="Left" >Aceptar</Button>
|
||||
|
||||
<Button x:Name="btCancelar" Click="btCancelar_Click" Margin="30,0,0,0" Width="100">Cancelar </Button>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core.ServerMode
|
||||
Imports DevExpress.Mvvm
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports tsWPFCore
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports DevExpress.Xpf.Core
|
||||
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
|
||||
Public Class dxwAgregarNuevoCodigoPostal
|
||||
|
||||
' Private _alumno As alumnos
|
||||
Friend _CodigoPostal As String
|
||||
Private _bd As tscGrupoSanchoToro
|
||||
|
||||
Private Sub dxwAgregarNuevoCodigoPostal_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Me.teCodigoPostal.EditValue = _CodigoPostal
|
||||
Dim sCodigoProvincia As String = _CodigoPostal.Substring(0, 2)
|
||||
Me.teProvincia.EditValue = _bd.provincias.First(Function(x) x.CodigoProvincia = sCodigoProvincia).Nombre
|
||||
Me.cbMunicipio.ItemsSource = _bd.municipios.Where(Function(x) x.CodigoProvincia = sCodigoProvincia).OrderBy(Function(x) x.Nombre).ToList
|
||||
Me.cbMunicipio.Focus()
|
||||
End Sub
|
||||
|
||||
Public Sub New(CodigoPostal As String, bd As tscGrupoSanchoToro)
|
||||
_CodigoPostal = CodigoPostal
|
||||
_bd = bd
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Me.DialogResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Try
|
||||
If cbMunicipio.EditValue Is Nothing Then
|
||||
DXMessageBox.Show("El municipio es obligatorio")
|
||||
Else
|
||||
Dim _CodigoMunicipio As String = ""
|
||||
If cbMunicipio.EditValue IsNot Nothing Then _CodigoMunicipio = cbMunicipio.EditValue
|
||||
Dim sDescripcionAdicional As String = ""
|
||||
If teDescripcionAdicional.EditValue IsNot Nothing Then sDescripcionAdicional = teDescripcionAdicional.EditValue
|
||||
Dim ncp As New bdGrupoSanchoToro.db.codigospostales
|
||||
With ncp
|
||||
.CodigoMunicipio = _CodigoMunicipio
|
||||
.CodigoPostal = _CodigoPostal
|
||||
.DescripcionAdicional = sDescripcionAdicional
|
||||
End With
|
||||
_bd.codigospostales.Add(ncp)
|
||||
_bd.GuardarCambios()
|
||||
Me.DialogResult = True
|
||||
Me.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Comun.GeneraRegistroCorreoExcepcion(Nothing, ex, "dxwAgregarNuevoCodigoPostal.btAceptar_Click")
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<dx:DXWindow
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
x:Class="dxwAgregarNuevoMunicipio"
|
||||
Title="Nuevo CodigoPostal/Municipio" Height="230" Width="680" ShowInTaskbar="True" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" ShowIcon="False" ResizeMode="NoResize" >
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Header="Header" Orientation="Vertical" UseLayoutRounding="True" View="GroupBox" >
|
||||
<dxlc:LayoutGroup x:Name="lgTotalesClase" IsCollapsible="True" IsLocked="True" Height="Auto" HorizontalAlignment="Stretch" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical" >
|
||||
<tsWPF:tsLayoutItem Label="Nuevo Código Postal:" FontWeight="Bold" HorizontalAlignment="Left" Width="300">
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teCodigoPostal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Municipio:" FontWeight="Bold" HorizontalAlignment="Left" Width="500" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teMunicipio" IsEnabled="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Provincia:" FontWeight="Bold" HorizontalAlignment="Left" Width="500" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="cbProvincia" IsEnabled="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Height="35" Margin="0,30" >
|
||||
<Button x:Name="btAceptar" Click="btAceptar_Click" Width="100" HorizontalAlignment="Left" >Aceptar</Button>
|
||||
|
||||
<Button x:Name="btCancelar" Click="btCancelar_Click" Margin="30,0,0,0" Width="100">Cancelar </Button>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,82 @@
|
||||
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core.ServerMode
|
||||
Imports DevExpress.Mvvm
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports tsWPFCore
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Printing
|
||||
Imports Microsoft.Win32
|
||||
Imports System.Data.Objects
|
||||
Imports System.Data.Objects.DataClasses
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro
|
||||
|
||||
Public Class dxwAgregarNuevoMunicipio
|
||||
' Private _alumno As alumnos
|
||||
Friend _CodigoPostal As String
|
||||
Friend _CodigoMunicipio As String
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
Private Sub dxwAgregarNuevoCodigoPostal_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Me.teCodigoPostal.Focus()
|
||||
End Sub
|
||||
|
||||
Public Sub New(CodigoPostal As String)
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
_CodigoPostal = CodigoPostal
|
||||
teCodigoPostal.EditValue = CodigoPostal
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Me.DialogResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Try
|
||||
If teMunicipio.EditValue IsNot Nothing AndAlso teCodigoPostal.EditValue IsNot Nothing Then
|
||||
_CodigoPostal = teCodigoPostal.EditValue
|
||||
If _CodigoPostal.Length <> 5 Then Throw New Exception("El código postal es erróneo")
|
||||
Dim codpro = _CodigoPostal.Substring(0, 2)
|
||||
Dim provincia = bd.provincias.FirstOrDefault(Function(x) x.CodigoProvincia = codpro)
|
||||
If provincia Is Nothing Then Throw New Exception("El código postal no pertenece a ninguna provincia")
|
||||
Dim mun As String = teMunicipio.EditValue
|
||||
If mun.NothingAVacio = "" Then Throw New Exception("El municipio es obligatorio")
|
||||
_CodigoMunicipio = bdGrupoSanchoToro.db.municipios.ObtieneCodigoMunicipioMasCoincidente(bd, _CodigoPostal, mun)
|
||||
Me.DialogResult = True
|
||||
Me.Close()
|
||||
Else
|
||||
DXMessageBox.Show("El codigo postal y el municipio son obligatorios", "Atención")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp("dxwagregarnuevomunicipio_aceptar_click", ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub teCodigoPostal_EditValueChanged(sender As Object, e As EditValueChangedEventArgs) Handles teCodigoPostal.EditValueChanged
|
||||
Dim codpos As String = teCodigoPostal.EditValue
|
||||
If codpos IsNot Nothing AndAlso codpos.Length = 5 Then
|
||||
Dim codpro = codpos.Substring(0, 2)
|
||||
Dim provincia = bd.provincias.FirstOrDefault(Function(x) x.CodigoProvincia = codpro)
|
||||
If provincia IsNot Nothing Then
|
||||
cbProvincia.EditValue = provincia.Nombre
|
||||
Else
|
||||
cbProvincia.EditValue = ""
|
||||
End If
|
||||
Else
|
||||
cbProvincia.EditValue = ""
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
72
GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml
Normal file
72
GestionGrupoSanchoToro/VentanasEmergentes/dxwArticulos.xaml
Normal file
@@ -0,0 +1,72 @@
|
||||
<dx:DXWindow x:Class="dxwArticulos"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Normal" Topmost="True" WindowStartupLocation="CenterScreen" Width="1500" Height="700">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gcArticulos" NombreTablaBase="articulos" TabIndex="16" >
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC/>
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvArticulos" ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="False" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="CodigoArticulo" Header="Código Artículo" IsSmart="True" Width="100" />
|
||||
<dxg:GridColumn FieldName="NumeroSerie" Header="Nº Serie" IsSmart="True" Width="100" />
|
||||
<tsWPF:tsGridColumn FieldName="entidades.RazonSocial" Header="Proveedor" Width="220"/>
|
||||
<dxg:GridColumn FieldName="NumeroFraCompra" Header="Nº Fra. Compra" Width="100" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="FechaCompra" Width="90" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaFinGarantia" Width="120" IsSmart="True" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaBaja" Width="100" IsSmart="True" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="UltimoAlbaranEntrega" Header="Último Albarán Entrega" Width="140" />
|
||||
<tsWPF:tsGridColumn FieldName="UltimaFactura" Header="Última Factura" Width="120" />
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Width="300" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Averias" Width="300" IsSmart="True" />
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="0">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="1">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -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
|
||||
@@ -0,0 +1,51 @@
|
||||
<dx:DXWindow x:Class="dxwCodigosPostales"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione Población y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Normal" Topmost="True" WindowStartupLocation="CenterScreen" Width="900" Height="350">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gc" Grid.Row="0" >
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="CodigoPostal" Header="Código Postal" Width="90" />
|
||||
<dxg:GridColumn FieldName="Poblacion" Header="Poblacion" Width="450" />
|
||||
<dxg:GridColumn FieldName="Provincia" Header="Provincia" Width="350" IsSmart="True"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="0">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="1">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,69 @@
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports System.Linq.Dynamic.Core
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
Public Class dxwCodigosPostales
|
||||
Friend CodigoMunicipio As String
|
||||
Friend CodigoPostal As String
|
||||
Private _CodigoPostal As String
|
||||
Friend _bd As tscGrupoSanchoToro
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gc.CurrentItem IsNot Nothing Then
|
||||
Dim cp = DirectCast(gc.CurrentItem, codigospostales)
|
||||
CodigoMunicipio = cp.CodigoMunicipio
|
||||
CodigoPostal = cp.CodigoPostal
|
||||
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 dxwCodigosPostales_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Try
|
||||
|
||||
If _CodigoPostal <> "" Then
|
||||
Me.gc.ItemsSource = _bd.codigospostales.Include(Function(x) x.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Where(Function(x) x.CodigoPostal = _CodigoPostal).OrderBy(Function(x) x.CodigoMunicipioNavigation.Nombre).ToList
|
||||
Else
|
||||
Me.gc.ItemsSource = _bd.codigospostales.Include(Function(x) x.CodigoMunicipioNavigation.CodigoProvinciaNavigation).OrderBy(Function(x) x.CodigoMunicipioNavigation.Nombre).ToList
|
||||
End If
|
||||
Me.gc.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(bd As tscGrupoSanchoToro, CodigoPostal As String)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
_CodigoPostal = CodigoPostal
|
||||
_bd = bd
|
||||
' _existentes = Existentes
|
||||
|
||||
' 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 tv.MouseDoubleClick
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
62
GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml
Normal file
62
GestionGrupoSanchoToro/VentanasEmergentes/dxwEntidades.xaml
Normal file
@@ -0,0 +1,62 @@
|
||||
<dx:DXWindow x:Class="dxwEntidades"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Normal" Topmost="True" WindowStartupLocation="CenterScreen" Width="1500" Height="700">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gc">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="RazonSocial" Header="Razón Social" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="NIF" Header="NIF" Width="90" IsSmart="True"/>
|
||||
<dxg:GridColumn FieldName="Telefono1" Header="Teléfono" Width="90" IsSmart="True"/>
|
||||
<dxg:GridColumn FieldName="Email" Header="Email" Width="200" IsSmart="True"/>
|
||||
<dxg:GridColumn FieldName="Direccion" Header="Dirección" Width="400" IsSmart="True" AllowSearchPanel="False" />
|
||||
<dxg:GridColumn FieldName="CodigoPostal" Header="Código Postal" Width="120" IsSmart="True" AllowSearchPanel="False" />
|
||||
<dxg:GridColumn FieldName="municipios.Nombre" Header="Población" Width="400" IsSmart="True" AllowSearchPanel="False" />
|
||||
<dxg:GridColumn FieldName="municipios.provincias.Nombre" Header="Provincia" Width="350" IsSmart="True" AllowSearchPanel="False" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="False" >
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="Not IsNull([FechaCierre])" FieldName="{x:Null}" >
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="0">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="1">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,70 @@
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
|
||||
Public Class dxwEntidades
|
||||
Friend Entidad As entidades
|
||||
Friend _bd As tscGrupoSanchoToro
|
||||
Private _EsCliente As Boolean
|
||||
Private _EsProveedor As Boolean
|
||||
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gc.CurrentItem IsNot Nothing Then
|
||||
Dim ent = DirectCast(gc.CurrentItem, entidades)
|
||||
Entidad = ent
|
||||
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 dxwEntidades_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Try
|
||||
|
||||
Dim ients = _bd.entidades.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.FechaBaja Is Nothing).Include(Function(x) x.CodigoMunicipioNavigation.CodigoProvinciaNavigation).AsQueryable
|
||||
ients = ients.Where(Function(x) (x.EsCliente AndAlso _EsCliente) OrElse (x.EsProveedor AndAlso _EsProveedor))
|
||||
Me.gc.ItemsSource = ients.OrderBy(Function(x) x.RazonSocial).ToList
|
||||
Me.gc.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(bd As tscGrupoSanchoToro, EsCliente As Boolean, EsProveedor As Boolean)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
|
||||
_EsCliente = EsCliente
|
||||
_EsProveedor = EsProveedor
|
||||
_bd = bd
|
||||
' _existentes = Existentes
|
||||
|
||||
' 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 tv.MouseDoubleClick
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,43 @@
|
||||
<dx:DXWindow
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
x:Class="dxwEnvioCorreo"
|
||||
Title="Envío de Correo Electrónico." Height="390" Width="680" ShowInTaskbar="True" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow" ShowIcon="False" ResizeMode="NoResize" >
|
||||
<Grid x:Name="grid">
|
||||
<dxlc:LayoutControl Header="Header" Orientation="Vertical" UseLayoutRounding="True" View="GroupBox" >
|
||||
<dxlc:LayoutGroup IsLocked="True" Height="Auto" HorizontalAlignment="Stretch" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical" >
|
||||
<tsWPF:tsLayoutItem Label="Destinatario(s):" FontWeight="Bold" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teDestinatario" IsEnabled="True" MaxLength="255" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Con Copia A:" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teCopia" IsEnabled="True" MaxLength="255" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Con Copia Oculta A:" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teCopiaOculta" IsEnabled="False" MaxLength="255" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Asunto:" FontWeight="Bold" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teAsunto" IsEnabled="True" MaxLength="255" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Cuerpo:" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teCuerpo" IsEnabled="True" MaxLength="4096" AcceptsReturn="True" Height="100" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Adjunto:" >
|
||||
<dxe:TextEdit TabIndex="1" x:Name="teAdjunto" IsEnabled="True" IsReadOnly="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Height="35" Margin="0,30" >
|
||||
<Button x:Name="btAceptar" Click="btAceptar_Click" Width="100" HorizontalAlignment="Left" >Aceptar</Button>
|
||||
|
||||
<Button x:Name="btCancelar" Click="btCancelar_Click" Margin="30,0,0,0" Width="100">Cancelar </Button>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,82 @@
|
||||
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core.ServerMode
|
||||
Imports DevExpress.Mvvm
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports tsWPFCore
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpf.Printing
|
||||
Imports Microsoft.Win32
|
||||
Imports System.Data.Objects
|
||||
Imports System.Data.Objects.DataClasses
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Public Class dxwEnvioCorreo
|
||||
|
||||
|
||||
Friend _Destinatarios As String
|
||||
Friend _CC As String
|
||||
Friend _BCC As String
|
||||
Friend _Asunto As String
|
||||
Friend _Cuerpo As String
|
||||
Friend _Adjunto As String
|
||||
|
||||
|
||||
Private Sub dxw_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
teDestinatario.Text = _Destinatarios
|
||||
teCuerpo.Text = _Cuerpo
|
||||
teAdjunto.Text = _Adjunto
|
||||
teCopia.Text = _CC
|
||||
teCopiaOculta.Text = _BCC
|
||||
teAsunto.Text = _Asunto
|
||||
teDestinatario.Focus()
|
||||
End Sub
|
||||
|
||||
Public Sub New(Destinatarios As String, CC As String, BCC As String, Asunto As String, Cuerpo As String, Adjunto As String)
|
||||
_Destinatarios = Destinatarios
|
||||
_CC = CC
|
||||
_BCC = BCC
|
||||
_Asunto = Asunto
|
||||
_Cuerpo = Cuerpo
|
||||
_Adjunto = Adjunto
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btCancelar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Me.DialogResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
Try
|
||||
If teDestinatario.Text.Trim.ToLower.EsEmailValido AndAlso teAsunto.Text.Trim <> "" Then
|
||||
_Destinatarios = teDestinatario.Text.Trim.ToLower
|
||||
_Cuerpo = teCuerpo.Text
|
||||
_Adjunto = teAdjunto.Text
|
||||
_CC = teCopia.Text
|
||||
_BCC = teCopiaOculta.Text
|
||||
_Asunto = teAsunto.Text
|
||||
|
||||
Me.DialogResult = True
|
||||
Me.Close()
|
||||
Else
|
||||
DXMessageBox.Show("El asunto y el destinatario son campos obligatorios")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Comun.GeneraRegistroCorreoExcepcion(Nothing, ex, "dxwAgregarNuevoCodigoPostal.btAceptar_Click")
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
47
GestionGrupoSanchoToro/VentanasEmergentes/dxwIVA.xaml
Normal file
47
GestionGrupoSanchoToro/VentanasEmergentes/dxwIVA.xaml
Normal file
@@ -0,0 +1,47 @@
|
||||
<dx:DXWindow x:Class="dxwIVA"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Normal" Topmost="True" WindowStartupLocation="CenterScreen" Width="400" Height="200">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gciva" TabIndex="1" >
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tviva" ShowSearchPanelMode="Never" AllowEditing="False" ShowGroupPanel="False" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="% I.V.A." IsSmart="True" Width="350" />
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="2">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="3">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,44 @@
|
||||
<dx:DXWindow x:Name="text" ShowIcon="False" ResizeMode="NoResize" WindowStyle="SingleBorderWindow"
|
||||
x:Class="dxwIdentificacion"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
Title="Identificación" Height="Auto" Width="390" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" WindowStartupLocation="CenterScreen" Topmost="True" >
|
||||
<Grid x:Name="gc" Height="Auto" >
|
||||
<dxlc:LayoutControl Header="Header" Orientation="Vertical" View="GroupBox" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Height="Auto" >
|
||||
<tsWPF:tsLayoutItem Label="Usuario:" FontWeight="Bold" HorizontalAlignment="Stretch" TabIndex="1" Margin="0,10" >
|
||||
<dxe:TextEdit Name="teUsuario" VerticalAlignment="Top" TabIndex="0" x:FieldModifier="Public" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Contraseña:" FontWeight="Bold" HorizontalAlignment="Stretch" TabIndex="1" Margin="0,10" >
|
||||
<dxe:PasswordBoxEdit Name="pbeContrasenna" VerticalAlignment="Top" TabIndex="1" x:FieldModifier="Public"/>
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Empresa:" FontWeight="Bold" HorizontalAlignment="Stretch" TabIndex="1" Margin="0,10" x:Name="liEmpresa" Visibility="Collapsed" >
|
||||
<dxe:ComboBoxEdit TabIndex="1" x:Name="cbEmpresa" IsEnabled="True" ValueMember="idEmpresa" DisplayMember="RazonSocial" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Margin="0,10" >
|
||||
<dxlc:LayoutGroup >
|
||||
<Button Content="Aceptar" Height="23" HorizontalAlignment="Left" Name="Button1" VerticalAlignment="Top" Width="121" />
|
||||
|
||||
<Button Content="Cancelar" Height="23" HorizontalAlignment="Right" Name="Button2" VerticalAlignment="Top" Width="121" />
|
||||
</dxlc:LayoutGroup>
|
||||
<Label x:Name="lVersion" Content="Versión:" FontSize="9" Height="23" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="200" />
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
|
||||
</Grid>
|
||||
<!--<Grid x:Name="gc" >
|
||||
<dxe:TextEdit HorizontalAlignment="Left" Margin="99,14,0,0" Name="teUsuario" VerticalAlignment="Top" Width="212" TabIndex="0" x:FieldModifier="Public" />
|
||||
<Label Content="Usuario:" Height="28" HorizontalAlignment="Left" Margin="12,12,0,0" Name="Label1" VerticalAlignment="Top" Width="88" />
|
||||
<Label Content="Contraseña:" Height="23" HorizontalAlignment="Left" Margin="12,55,0,0" Name="Label2" VerticalAlignment="Top" Width="79" />
|
||||
<dxe:PasswordBoxEdit HorizontalAlignment="Left" Margin="97,56,0,0" Name="pbeContrasenna" VerticalAlignment="Top" Width="215" TabIndex="1" x:FieldModifier="Public"/>
|
||||
<dxe:ComboBoxEdit TabIndex="1" x:Name="cbMunicipio" IsEnabled="True" ValueMember="CodigoMunicipio" DisplayMember="Nombre" AutoComplete="True" />
|
||||
<Button Content="Aceptar" Height="23" HorizontalAlignment="Left" Margin="21,95,0,0" Name="Button1" VerticalAlignment="Top" Width="121" />
|
||||
<Button Content="Cancelar" Height="23" HorizontalAlignment="Right" Margin="0,95,22,0" Name="Button2" VerticalAlignment="Top" Width="121" />
|
||||
<Label x:Name="lVersion" Content="Versión:" FontSize="9" Height="23" HorizontalAlignment="Left" Margin="11,139,0,0" VerticalAlignment="Top" Width="200" />
|
||||
|
||||
</Grid>-->
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,73 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.Core.Native
|
||||
Imports System.Reflection
|
||||
Imports bdGrupoSanchoToro.db
|
||||
|
||||
Public Class dxwIdentificacion
|
||||
Private _Empresas As List(Of db.empresas)
|
||||
Private _Version As String
|
||||
Public Cancelar As Boolean
|
||||
|
||||
Public Sub New(Empresas As List(Of bdGrupoSanchoToro.db.empresas), Version As String)
|
||||
_Version = Version
|
||||
_Empresas = Empresas
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
If Empresas.Count > 1 Then
|
||||
Me.Height = 290
|
||||
liEmpresa.Visibility = Visibility.Visible
|
||||
Else
|
||||
Me.Height = 230
|
||||
End If
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
|
||||
Cancelar = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button2.Click
|
||||
Cancelar = True
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Window_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles gc.PreviewKeyDown
|
||||
If e.Key = Key.Return Then
|
||||
If teUsuario.Text <> "" And Me.pbeContrasenna.Text <> "" Then
|
||||
Cancelar = False
|
||||
Me.Close()
|
||||
Else
|
||||
Dim te As BaseEdit = LayoutHelper.FindParentObject(Of BaseEdit)(Keyboard.FocusedElement)
|
||||
If te Is Nothing Then
|
||||
FocusManager.SetFocusedElement(Me, teUsuario)
|
||||
Else
|
||||
If te.Name.ToUpper = "TEUSUARIO" Then
|
||||
FocusManager.SetFocusedElement(Me, pbeContrasenna)
|
||||
Else
|
||||
FocusManager.SetFocusedElement(Me, teUsuario)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub dxwIdentificacion_Activated(sender As Object, e As EventArgs) Handles Me.Activated
|
||||
' Application.Current.Dispatcher.BeginInvoke(New Action(Function() Me.Focus()), System.Windows.Threading.DispatcherPriority.Send)
|
||||
' Application.Current.Dispatcher.BeginInvoke(New Action(Function() teUsuario.Focus()), System.Windows.Threading.DispatcherPriority.Send)
|
||||
End Sub
|
||||
|
||||
Private Sub dxwIdentificacion_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||
'FocusManager.SetFocusedElement(Me, teUsuario)
|
||||
cbEmpresa.ItemsSource = _Empresas
|
||||
cbEmpresa.EditValue = _Empresas.First.idEmpresa
|
||||
teUsuario.Focus()
|
||||
' Application.Current.Dispatcher.BeginInvoke(New Action(Function() Me.Focus()), System.Windows.Threading.DispatcherPriority.Send)
|
||||
' Application.Current.Dispatcher.BeginInvoke(New Action(Function() teUsuario.Focus()), System.Windows.Threading.DispatcherPriority.Send)
|
||||
Cancelar = True
|
||||
lVersion.Content = "Versión: " & _Version
|
||||
End Sub
|
||||
End Class
|
||||
61
GestionGrupoSanchoToro/VentanasEmergentes/dxwIva.xaml.vb
Normal file
61
GestionGrupoSanchoToro/VentanasEmergentes/dxwIva.xaml.vb
Normal file
@@ -0,0 +1,61 @@
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
|
||||
Public Class dxwIVA
|
||||
Friend IVA As Double
|
||||
|
||||
Private _bd As tscGrupoSanchoToro
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gciva.CurrentItem IsNot Nothing Then
|
||||
Dim eniva = DirectCast(gciva.CurrentItem, enumeraciones)
|
||||
IVA = eniva.ValorNumerico1
|
||||
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.gciva.ItemsSource = _bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "PIVA").OrderByDescending(Function(X) X.ValorNumerico1).ToList
|
||||
Me.gciva.View.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(bd As tscGrupoSanchoToro)
|
||||
|
||||
_bd = bd
|
||||
IVA = _bd.enumeraciones.First(Function(x) x.Codigo = "PIVA.DEFECTO").ValorNumerico1
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
|
||||
|
||||
' 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 tviva.MouseDoubleClick
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,50 @@
|
||||
<dx:DXWindow x:Class="dxwPoblaciones"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione Población y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Normal" Topmost="True" WindowStartupLocation="CenterScreen" Width="900" Height="350">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gc" Grid.Row="0" >
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="Poblacion" Header="Población" Width="450" />
|
||||
<dxg:GridColumn FieldName="Provincia" Header="Provincia" Width="350" IsSmart="True"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="0">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="1">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,63 @@
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
Public Class dxwPoblaciones
|
||||
Friend CodigoMunicipio As String
|
||||
' Friend CodigoPostal As String
|
||||
' Private _CodigoPostal As String
|
||||
Friend _bd As tscGrupoSanchoToro
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gc.CurrentItem IsNot Nothing Then
|
||||
CodigoMunicipio = DirectCast(gc.CurrentItem, municipios).CodigoMunicipio
|
||||
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 dxwPoblaciones_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
Try
|
||||
|
||||
Me.gc.ItemsSource = _bd.municipios.Include(Function(x) x.CodigoProvinciaNavigation).OrderBy(Function(x) x.Nombre).ToList
|
||||
Me.gc.View.SearchControl.Focus()
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
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(bd As tscGrupoSanchoToro)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
_bd = bd
|
||||
' _existentes = Existentes
|
||||
|
||||
' 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 tv.MouseDoubleClick
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
67
GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml
Normal file
67
GestionGrupoSanchoToro/VentanasEmergentes/dxwProductos.xaml
Normal file
@@ -0,0 +1,67 @@
|
||||
<dx:DXWindow x:Class="dxwProductos"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:dxgt="http://schemas.devexpress.com/winfx/2008/xaml/grid/themekeys"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" ShowInTaskbar="True"
|
||||
ShowIcon="False" Title="Seleccione y Pulse Aceptar" WindowStyle="ToolWindow" WindowState="Normal" Topmost="True" WindowStartupLocation="CenterScreen" Width="1200" Height="800">
|
||||
<dx:DXWindow.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</dx:DXWindow.Resources>
|
||||
<Grid x:Name="grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="45" />
|
||||
</Grid.RowDefinitions>
|
||||
<tsWPF:tsGridControl x:Name="gc">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="Descripción" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Stock" x:Name="gcStock" Width="90" IsSmart="True"/>
|
||||
<dxg:GridColumn FieldName="UnidadesAlquiladas" x:Name="gcUnidadesAlquiladas" Width="130" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="N0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<!--<dxg:GridColumn FieldName="PrecioAlquiler" Width="120" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="PrecioVenta" Width="120" HorizontalHeaderContentAlignment="Right" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>-->
|
||||
<dxg:GridColumn FieldName="Observaciones" Width="300" IsSmart="True"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="False" x:Name="tvProductos">
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="10" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="btAceptar" Grid.Row="1" Width="100" IsDefault="True" Click="btAceptar_Click" TabIndex="0">Aceptar</Button>
|
||||
<Button Grid.Column="3" x:Name="btCancelar" Grid.Row="1" Width="100" IsCancel="True" Click="btCancelar_Click" TabIndex="1">Cancelar</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</dx:DXWindow>
|
||||
@@ -0,0 +1,64 @@
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro
|
||||
|
||||
Public Class dxwProductos
|
||||
Friend idProducto As Integer
|
||||
Friend _bd As tscGrupoSanchoToro
|
||||
Private _Lproductos As List(Of productos)
|
||||
|
||||
Private Sub btAceptar_Click(sender As Object, e As RoutedEventArgs)
|
||||
If gc.CurrentItem IsNot Nothing Then
|
||||
Dim pro = DirectCast(gc.CurrentItem, productos)
|
||||
idProducto = pro.idProducto
|
||||
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.gc.ItemsSource = _Lproductos.ToList
|
||||
Me.gc.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(lProductos As List(Of productos), Optional OcultarStock As Boolean = False)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
If OcultarStock Then
|
||||
gcStock.Visible = False
|
||||
gcUnidadesAlquiladas.Visible = False
|
||||
End If
|
||||
Comun.EscalaVentana(Me, Me.grid.LayoutTransform)
|
||||
|
||||
_Lproductos = lProductos
|
||||
' 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 tvProductos.MouseDoubleClick
|
||||
btAceptar_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
879
GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml
Normal file
879
GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml
Normal file
@@ -0,0 +1,879 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
|
||||
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucFacturaEmitida"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1400">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
<dxre:RichEditUICommand x:Key="commands"/>
|
||||
<dxre:RichEditStringIdConverter x:Key="stringIdConverter"/>
|
||||
<dxre:DefaultBarItemDataTemplates x:Key="defaultBarItemTemplates"/>
|
||||
<dxre:RtfToContentConverter x:Key="rtfToContentConverter" />
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos De la Factura" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal" Width="1280" HorizontalAlignment="Left">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="740">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<tsWPF:tsLayoutItem Label="Serie:" Width="300">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" Modificable="ModificableEnNuevos" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbSerie" AutoComplete="True" ValidateOnTextInput="False" IsTextEditable="True" DisplayMember="Descripcion" ValueMember="idSerieFactura" EditValue="{Binding idSerieFactura_Nulable, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Nº Factura:" Width="200" x:Name="liNumeroFactura" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding NumeroFactura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="100" NullText="« AUTOMÁTICO »" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Factura:" x:Name="liFechaFactura">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaFactura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true, Converter={StaticResource DateOnlyToDateTimeConverter}}" TabIndex="3" >
|
||||
</dxe:DateEdit>
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Razón Social:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbRazonSocial" AutoComplete="True" ValidateOnTextInput="False" IsTextEditable="True" DisplayMember="RazonSocialNIF" ValueMember="idEntidad" EditValue="{Binding idCliente_Nulable, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" AllowDefaultButton="False" TabIndex="1">
|
||||
<dxe:ComboBoxEdit.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarCliente" GlyphKind="Search" IsDefaultButton="False" Click="BiBuscarCliente_Click" />
|
||||
</dxe:ComboBoxEdit.Buttons>
|
||||
</dxe:ComboBoxEdit>
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Observaciones:">
|
||||
<dxe:TextEdit EditValue="{Binding Observaciones, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Orientation="Horizontal">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Emision:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaEmision, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" DisplayFormatString="dd/MM/yyyy HH:mm" >
|
||||
</dxe:DateEdit>
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Pago:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaPago, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Usuario:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding idUsuarioNavigation.Nombre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="200" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Observaciones A Imprimir:" TabIndex="4">
|
||||
<dxe:TextEdit EditValue="{Binding ObservacionesAImprimir, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="7" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Datos del Cliente" View="GroupBox" Width="Auto" HorizontalAlignment="Stretch" IsCollapsible="True" IsCollapsed="False">
|
||||
<dxlc:LayoutGroup Width="1280">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="415">
|
||||
<tsWPF:tsLayoutItem Label="Direccion:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Direccion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teDireccionCliente" TabIndex="8" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 1:" Width="215">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding idClienteNavigation.Telefono1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teTelefono1Cliente" TabIndex="12" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding idClienteNavigation.Telefono2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teTelefono2Cliente" TabIndex="13" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Código Postal:" Width="190">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding CodigoPostal, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="9" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Población:" x:Name="Poblacion" Width="318">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding CodigoMunicipioNavigation.Nombre , Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="10" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Provincia:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="11" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Email:" Width="512" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding idClienteNavigation.Email, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" x:Name="teEmailCliente" TabIndex="14" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dx:DXTabControl x:Name="DXTabPersonal1" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Detalle Factura">
|
||||
<dxdo:DockLayoutManager Name="DockLayoutManager1" MDIMergeStyle="Never" Grid.Row="0" >
|
||||
<dxdo:DockLayoutManager.LayoutRoot>
|
||||
<dxdo:LayoutGroup Tag="lg1" Orientation="Horizontal" >
|
||||
<dxdo:LayoutGroup Orientation="Vertical" Tag="lg2" >
|
||||
<dxdo:LayoutPanel AllowClose="False" AllowHide="false" Caption="Desglose" >
|
||||
<tsWPF:tsGridControl x:Name="gcDetalle" TabIndex="15">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC PermitirEliminar="True" CamposObligatorios="idProducto" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
|
||||
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvDetalle" ShowGroupPanel="False" NewItemRowPosition="Bottom" TabIndex="14" EnableImmediatePosting="True" >
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
|
||||
<dxg:GridColumn FieldName="idProducto" Header="Producto" Width="320">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings x:Name="cbProducto" ValueMember="idProducto" DisplayMember="Descripcion" AllowDefaultButton="False" AutoComplete="True">
|
||||
<dxe:ComboBoxEditSettings.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarProducto" GlyphKind="Search" IsDefaultButton="False" Click="BiBuscarProducto_Click" />
|
||||
</dxe:ComboBoxEditSettings.Buttons>
|
||||
</dxe:ComboBoxEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Cantidad" Header="Cantidad" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Precio" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Importe" IsSmart="True" Width="80" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="idTipoIVA" Header="% IVA" IsSmart="True" Width="80" >
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings x:Name="cbIva" ValueMember="idEnumeracion" DisplayMember="Descripcion" AllowDefaultButton="False" AutoComplete="True" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxdo:LayoutPanel>
|
||||
|
||||
</dxdo:LayoutGroup>
|
||||
<dxdo:LayoutPanel Caption="Más Detalle del Producto" AllowHide="True" AllowDock="True" AllowClose="False" AllowContextMenu="False" AllowDockToCurrentItem="False" AllowDockToDocumentGroup="False" AllowFloat="False" AllowDrag="False" AllowDrop="False" AllowMaximize="False" AllowMinimize="False" AllowMove="False" dxlc:LayoutControl.AllowHorizontalSizing="True">
|
||||
<dxlc:LayoutGroup ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
|
||||
<dxb:BarManager x:Name="BarManager1" ToolbarGlyphSize="Small" >
|
||||
<dxb:BarManager.Items>
|
||||
<dxb:BarButtonItem x:Name="biFileOpen" Command="{Binding FileOpen, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<!--<dxb:BarButtonItem x:Name="biFileSave" Command="{Binding FileSave, Mode=OneTime, Source={StaticResource commands}}"/>-->
|
||||
<dxb:BarButtonItem x:Name="biFileSaveAs" Command="{Binding FileSaveAs, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFileQuickPrint" Command="{Binding FileQuickPrint, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFilePrint" Command="{Binding FilePrint, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFilePrintPreview" Command="{Binding FilePrintPreview, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditUndo" Command="{Binding EditUndo, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditRedo" Command="{Binding EditRedo, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertPageBreak" Command="{Binding InsertPageBreak, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertTable" Command="{Binding InsertTable, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertPicture" Command="{Binding InsertPicture, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertFloatingPicture" Command="{Binding InsertFloatingPicture, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertBookmark" Command="{Binding InsertBookmark, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertHyperlink" Command="{Binding InsertHyperlink, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertHeader" Command="{Binding InsertHeader, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertFooter" Command="{Binding InsertFooter, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertPageNumber" Command="{Binding InsertPageNumber, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertPageCount" Command="{Binding InsertPageCount, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertTextBox" Command="{Binding InsertTextBox, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertSymbol" Command="{Binding InsertSymbol, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarSubItem x:Name="biPageLayoutMargins" Command="{Binding PageLayoutMargins, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutNormalMargins"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutNarrowMargins"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutModerateMargins"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutWideMargins"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biPageLayoutPageMarginsOptions"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutNormalMargins" GlyphSize="Large" Command="{Binding PageLayoutNormalMargins, Mode=OneTime, Source={StaticResource commands}}" ContentTemplate="{Binding SectionMarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutNarrowMargins" GlyphSize="Large" Command="{Binding PageLayoutNarrowMargins, Mode=OneTime, Source={StaticResource commands}}" ContentTemplate="{Binding SectionMarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutModerateMargins" GlyphSize="Large" Command="{Binding PageLayoutModerateMargins, Mode=OneTime, Source={StaticResource commands}}" ContentTemplate="{Binding SectionMarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutWideMargins" GlyphSize="Large" Command="{Binding PageLayoutWideMargins, Mode=OneTime, Source={StaticResource commands}}" ContentTemplate="{Binding SectionMarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}"/>
|
||||
<dxb:BarButtonItem x:Name="biPageLayoutPageMarginsOptions" Command="{Binding PageLayoutPageMarginsOptions, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarSubItem x:Name="biPageLayoutOrientation" Command="{Binding PageLayoutOrientation, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutPortraitOrientation"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutLandscapeOrientation"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutPortraitOrientation" Command="{Binding PageLayoutPortraitOrientation, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutLandscapeOrientation" Command="{Binding PageLayoutLandscapeOrientation, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarSubItem x:Name="biPageLayoutSize" Command="{Binding PageLayoutSize, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxre:PaperKindBarListItemLink BarItemName="biPageLayoutSizeList"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biPageLayoutPagePaperOptions"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxre:PaperKindBarListItem x:Name="biPageLayoutSizeList" RichEditControl="{Binding ElementName=recEditor}"/>
|
||||
<dxb:BarButtonItem x:Name="biPageLayoutPagePaperOptions" Command="{Binding PageLayoutPagePaperOptions, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarSubItem x:Name="biPageLayoutColumns" Command="{Binding PageLayoutColumns, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutOneColumn"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutTwoColumns"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutThreeColumns"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biPageLayoutColumnsOptions"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutOneColumn" Command="{Binding PageLayoutOneColumn, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutTwoColumns" Command="{Binding PageLayoutTwoColumns, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutThreeColumns" Command="{Binding PageLayoutThreeColumns, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarButtonItem x:Name="biPageLayoutColumnsOptions" Command="{Binding PageLayoutColumnsOptions, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarSubItem x:Name="biInsertBreak" Command="{Binding InsertBreak, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertPageBreak"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertColumnBreak"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertSectionBreakNextPage"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertSectionBreakContinuous"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertSectionBreakEvenPage"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertSectionBreakOddPage"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxb:BarButtonItem x:Name="biInsertColumnBreak" Command="{Binding InsertColumnBreak, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertSectionBreakNextPage" Command="{Binding InsertSectionBreakNextPage, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertSectionBreakContinuous" Command="{Binding InsertSectionBreakContinuous, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertSectionBreakEvenPage" Command="{Binding InsertSectionBreakEvenPage, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarButtonItem x:Name="biInsertSectionBreakOddPage" Command="{Binding InsertSectionBreakOddPage, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large"/>
|
||||
<dxb:BarSubItem x:Name="biPageLayoutLineNumbering" Command="{Binding PageLayoutLineNumbering, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutLineNumberingNone"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutLineNumberingContinuous"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutLineNumberingRestartNewPage"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biPageLayoutLineNumberingRestartNewSection"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphSuppressLineNumbers"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biPageLayoutLineNumberingOptions"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutLineNumberingNone" Command="{Binding PageLayoutLineNumberingNone, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutLineNumberingContinuous" Command="{Binding PageLayoutLineNumberingContinuous, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutLineNumberingRestartNewPage" Command="{Binding PageLayoutLineNumberingRestartNewPage, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biPageLayoutLineNumberingRestartNewSection" Command="{Binding PageLayoutLineNumberingRestartNewSection, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphSuppressLineNumbers" Command="{Binding FormatParagraphSuppressLineNumbers, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biPageLayoutLineNumberingOptions" Command="{Binding PageLayoutLineNumberingOptions, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxre:BarButtonColorEditItem x:Name="biPageLayoutPageColor" Command="{Binding PageLayoutPageColor, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxre:BarButtonColorEditItem.PopupControl>
|
||||
<dxb:PopupControlContainerInfo>
|
||||
<dxe:ColorEdit EditValue="{Binding EditValue, ElementName=biPageLayoutPageColor, Mode=TwoWay}" ShowBorder="False"/>
|
||||
</dxb:PopupControlContainerInfo>
|
||||
</dxre:BarButtonColorEditItem.PopupControl>
|
||||
</dxre:BarButtonColorEditItem>
|
||||
<dxb:BarCheckItem x:Name="biViewDraft" Command="{Binding ViewDraft, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biViewPrintLayout" Command="{Binding ViewPrintLayout, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biViewSimple" Command="{Binding ViewSimple, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biViewHorizontalRuler" Command="{Binding ViewHorizontalRuler, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biViewVerticalRuler" Command="{Binding ViewVerticalRuler, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biViewZoomOut" Command="{Binding ViewZoomOut, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biViewZoomIn" Command="{Binding ViewZoomIn, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biGoToHeader" Command="{Binding GoToHeader, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biGoToFooter" Command="{Binding GoToFooter, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biHeaderFooterGoToPrevious" Command="{Binding HeaderFooterGoToPrevious, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biHeaderFooterGoToNext" Command="{Binding HeaderFooterGoToNext, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biHeaderFooterLinkToPrevious" Command="{Binding HeaderFooterLinkToPrevious, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biHeaderFooterDifferentFirstPage" Command="{Binding HeaderFooterDifferentFirstPage, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biHeaderFooterDifferentOddEvenPages" Command="{Binding HeaderFooterDifferentOddEvenPages, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biHeaderFooterClose" Command="{Binding HeaderFooterClose, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditPaste" Command="{Binding EditPaste, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditCut" Command="{Binding EditCut, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditCopy" Command="{Binding EditCopy, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditPasteSpecial" Command="{Binding EditPasteSpecial, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biFont">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarEditItemLink BarItemName="biFormatFontName"/>
|
||||
<dxb:BarEditItemLink BarItemName="biFormatFontSize"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarEditItem x:Name="biFormatFontName" Content="" Command="{Binding FormatFontName, Mode=OneTime, Source={StaticResource commands}}" EditWidth="150">
|
||||
<dxb:BarEditItem.EditSettings>
|
||||
<dxre:FontComboBoxEditSettings/>
|
||||
</dxb:BarEditItem.EditSettings>
|
||||
</dxb:BarEditItem>
|
||||
<dxb:BarEditItem x:Name="biFormatFontSize" Content="" Command="{Binding FormatFontSize, Mode=OneTime, Source={StaticResource commands}}" EditWidth="50">
|
||||
<dxb:BarEditItem.EditSettings>
|
||||
<dxre:FontSizeComboBoxEditSettings OfficeFontSizeProvider="{Binding ElementName=recEditor}"/>
|
||||
</dxb:BarEditItem.EditSettings>
|
||||
</dxb:BarEditItem>
|
||||
<dxr:BarButtonGroup x:Name="biFontSize">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatIncreaseFontSize"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatDecreaseFontSize"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarButtonItem x:Name="biFormatIncreaseFontSize" Command="{Binding FormatIncreaseFontSize, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFormatDecreaseFontSize" Command="{Binding FormatDecreaseFontSize, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biClearFormatting">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatClearFormatting"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarButtonItem x:Name="biFormatClearFormatting" Command="{Binding FormatClearFormatting, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biFontShape">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontBold"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontItalic"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontUnderline"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontDoubleUnderline"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontStrikeout"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontDoubleStrikeout"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontSuperscript"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatFontSubscript"/>
|
||||
<dxb:BarSubItemLink BarItemName="biEditChangeCase"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontBold" Command="{Binding FormatFontBold, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontItalic" Command="{Binding FormatFontItalic, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontUnderline" Command="{Binding FormatFontUnderline, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontDoubleUnderline" Command="{Binding FormatFontDoubleUnderline, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontStrikeout" Command="{Binding FormatFontStrikeout, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontDoubleStrikeout" Command="{Binding FormatFontDoubleStrikeout, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontSuperscript" Command="{Binding FormatFontSuperscript, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatFontSubscript" Command="{Binding FormatFontSubscript, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarSubItem x:Name="biEditChangeCase" Command="{Binding EditChangeCase, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditMakeUpperCase"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditMakeLowerCase"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditToggleCase"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxb:BarButtonItem x:Name="biEditMakeUpperCase" Command="{Binding EditMakeUpperCase, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditMakeLowerCase" Command="{Binding EditMakeLowerCase, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditToggleCase" Command="{Binding EditToggleCase, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biFontColor">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxre:BarSplitButtonColorEditItemLink BarItemName="biFormatFontBackColor"/>
|
||||
<dxre:BarSplitButtonColorEditItemLink BarItemName="biFormatFontForeColor"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxre:BarSplitButtonColorEditItem x:Name="biFormatFontBackColor" Command="{Binding FormatFontBackColor, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxre:BarSplitButtonColorEditItem.PopupControl>
|
||||
<dxb:PopupControlContainerInfo>
|
||||
<dxe:ColorEdit ChipSize="Large" ChipMargin="5" ColumnCount="5" EditValue="{Binding EditValue, ElementName=biFormatFontBackColor, Mode=TwoWay}" ShowMoreColorsButton="False" ShowDefaultColorButton="False" ShowNoColorButton="True" ShowBorder="False">
|
||||
<dxe:ColorEdit.Palettes>
|
||||
<dxre:CharactersBackgroundColorPaletteCollection/>
|
||||
</dxe:ColorEdit.Palettes>
|
||||
</dxe:ColorEdit>
|
||||
</dxb:PopupControlContainerInfo>
|
||||
</dxre:BarSplitButtonColorEditItem.PopupControl>
|
||||
</dxre:BarSplitButtonColorEditItem>
|
||||
<dxre:BarSplitButtonColorEditItem x:Name="biFormatFontForeColor" Command="{Binding FormatFontForeColor, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxre:BarSplitButtonColorEditItem.PopupControl>
|
||||
<dxb:PopupControlContainerInfo>
|
||||
<dxe:ColorEdit EditValue="{Binding EditValue, ElementName=biFormatFontForeColor, Mode=TwoWay}" ShowBorder="False"/>
|
||||
</dxb:PopupControlContainerInfo>
|
||||
</dxre:BarSplitButtonColorEditItem.PopupControl>
|
||||
</dxre:BarSplitButtonColorEditItem>
|
||||
<dxr:BarButtonGroup x:Name="biNumberingList">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatBulletedList"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatNumberingList"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatMultilevelList"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarCheckItem x:Name="biFormatBulletedList" Command="{Binding FormatBulletedList, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatNumberingList" Command="{Binding FormatNumberingList, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatMultilevelList" Command="{Binding FormatMultilevelList, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biParagraphIndent">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatDecreaseIndent"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatIncreaseIndent"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarButtonItem x:Name="biFormatDecreaseIndent" Command="{Binding FormatDecreaseIndent, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFormatIncreaseIndent" Command="{Binding FormatIncreaseIndent, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biShowWhitespace">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biViewShowWhitespace"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarCheckItem x:Name="biViewShowWhitespace" Command="{Binding ViewShowWhitespace, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biParagraphAlignment">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignLeft"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignCenter"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignRight"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphAlignJustify"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphAlignLeft" Command="{Binding FormatParagraphAlignLeft, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphAlignCenter" Command="{Binding FormatParagraphAlignCenter, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphAlignRight" Command="{Binding FormatParagraphAlignRight, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphAlignJustify" Command="{Binding FormatParagraphAlignJustify, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxr:BarButtonGroup x:Name="biLineSpacing">
|
||||
<dxr:BarButtonGroup.ItemLinks>
|
||||
<dxb:BarSubItemLink BarItemName="biFormatParagraphLineSpacing"/>
|
||||
<dxre:BarSplitButtonColorEditItemLink BarItemName="biFormatParagraphBackColor"/>
|
||||
</dxr:BarButtonGroup.ItemLinks>
|
||||
</dxr:BarButtonGroup>
|
||||
<dxb:BarSubItem x:Name="biFormatParagraphLineSpacing" Command="{Binding FormatParagraphLineSpacing, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxb:BarSubItem.ItemLinks>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphLineSpacingSingle"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphLineSpacingSesquialteral"/>
|
||||
<dxb:BarCheckItemLink BarItemName="biFormatParagraphLineSpacingDouble"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatParagraphLineSpacingCustomize"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatParagraphAddSpacingBefore"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatParagraphRemoveSpacingBefore"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatParagraphAddSpacingAfter"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biFormatParagraphRemoveSpacingAfter"/>
|
||||
</dxb:BarSubItem.ItemLinks>
|
||||
</dxb:BarSubItem>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphLineSpacingSingle" Command="{Binding FormatParagraphLineSpacingSingle, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphLineSpacingSesquialteral" Command="{Binding FormatParagraphLineSpacingSesquialteral, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarCheckItem x:Name="biFormatParagraphLineSpacingDouble" Command="{Binding FormatParagraphLineSpacingDouble, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFormatParagraphLineSpacingCustomize" Command="{Binding FormatParagraphLineSpacingCustomize, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFormatParagraphAddSpacingBefore" Command="{Binding FormatParagraphAddSpacingBefore, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFormatParagraphRemoveSpacingBefore" Command="{Binding FormatParagraphRemoveSpacingBefore, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFormatParagraphAddSpacingAfter" Command="{Binding FormatParagraphAddSpacingAfter, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biFormatParagraphRemoveSpacingAfter" Command="{Binding FormatParagraphRemoveSpacingAfter, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxre:BarSplitButtonColorEditItem x:Name="biFormatParagraphBackColor" Command="{Binding FormatParagraphBackColor, Mode=OneTime, Source={StaticResource commands}}">
|
||||
<dxre:BarSplitButtonColorEditItem.PopupControl>
|
||||
<dxb:PopupControlContainerInfo>
|
||||
<dxe:ColorEdit EditValue="{Binding EditValue, ElementName=biFormatParagraphBackColor, Mode=TwoWay}" ShowDefaultColorButton="False" ShowNoColorButton="True" ShowBorder="False"/>
|
||||
</dxb:PopupControlContainerInfo>
|
||||
</dxre:BarSplitButtonColorEditItem.PopupControl>
|
||||
</dxre:BarSplitButtonColorEditItem>
|
||||
<dxr:BarButtonGroup x:Name="biParagraph"/>
|
||||
<dxre:GalleryStyleItem x:Name="biGalleryStyle" Command="{Binding FormatFontStyle, Mode=OneTime, Source={StaticResource commands}}" RichEditControl="{Binding ElementName=recEditor }">
|
||||
<dxre:GalleryStyleItem.Gallery>
|
||||
<dxre:RichEditStyleGallery ColCount="10" ItemCheckMode="Single" IsItemGlyphVisible="False" ItemCaptionTemplate="{Binding StyleGalleryItemCaptionTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" IsItemDescriptionVisible="False" MinColCount="3"/>
|
||||
</dxre:GalleryStyleItem.Gallery>
|
||||
</dxre:GalleryStyleItem>
|
||||
<dxb:BarButtonItem x:Name="biEditFind" Command="{Binding EditFind, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biEditReplace" Command="{Binding EditReplace, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxre:InsertMergeFieldsBarSubItem x:Name="biMailMergeInsertFieldPlaceholder" Content="Insertar Campo Combinación" Command="{Binding MailMergeInsertFieldPlaceholder, Mode=OneTime, Source={StaticResource commands}}" RichEditControl="{Binding ElementName=recEditor}"/>
|
||||
<dxb:BarCheckItem x:Name="biMailMergeViewMergedData" Command="{Binding MailMergeViewMergedData, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biMailMergeShowAllFieldCodes" Command="{Binding MailMergeShowAllFieldCodes, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biMailMergeShowAllFieldResults" Command="{Binding MailMergeShowAllFieldResults, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biMailMergeFirstDataRecord" Command="{Binding MailMergeFirstDataRecord, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biMailMergePreviousDataRecord" Command="{Binding MailMergePreviousDataRecord, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biMailMergeNextDataRecord" Command="{Binding MailMergeNextDataRecord, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biMailMergeLastDataRecord" Command="{Binding MailMergeLastDataRecord, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
<dxb:BarButtonItem x:Name="biMailMergeSaveDocumentAs" Command="{Binding MailMergeSaveDocumentAs, Mode=OneTime, Source={StaticResource commands}}"/>
|
||||
</dxb:BarManager.Items>
|
||||
<DockPanel>
|
||||
<dxr:RibbonControl x:Name="RibbonControl1" DockPanel.Dock="Top" ToolbarShowMode="Hide" ShowApplicationButton="False" MinimizationButtonVisibility="Visible " MinimizationButtonPosition="PageHeader" IsMinimized="False" PageCategoryAlignment="Left" RibbonStyle="OfficeSlim" >
|
||||
<dxr:RibbonDefaultPageCategory>
|
||||
|
||||
<dxr:RibbonPage x:Name="pageHome" Caption="{Binding ConverterParameter=Caption_PageHome, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}">
|
||||
<dxr:RibbonPageGroup x:Name="grpHomeClipboard" Caption="{Binding ConverterParameter=Caption_GroupClipboard, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditPaste"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditCut"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditCopy"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditPasteSpecial"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpHomeFont" CaptionButtonCommand="{Binding FormatFont, Mode=OneTime, Source={StaticResource commands}}" Caption="{Binding ConverterParameter=Caption_GroupFont, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxr:BarButtonGroupLink BarItemName="biFont"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biFontSize"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biClearFormatting"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biFontShape"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biFontColor"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpHomeParagraph" CaptionButtonCommand="{Binding FormatParagraph, Mode=OneTime, Source={StaticResource commands}}" Caption="{Binding ConverterParameter=Caption_GroupParagraph, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxr:BarButtonGroupLink BarItemName="biNumberingList"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biParagraphIndent"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biShowWhitespace"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biParagraphAlignment"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biLineSpacing"/>
|
||||
<dxr:BarButtonGroupLink BarItemName="biParagraph"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpHomeStyles" CaptionButtonCommand="{Binding FormatEditFontStyle, Mode=OneTime, Source={StaticResource commands}}" Caption="{Binding ConverterParameter=Caption_GroupStyles, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxre:RibbonStyleGalleryItemLink BarItemName="biGalleryStyle"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpHomeEditing" Caption="{Binding ConverterParameter=Caption_GroupEditing, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditFind"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biEditReplace"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
</dxr:RibbonPage>
|
||||
<dxr:RibbonPage x:Name="pageInsert" Caption="{Binding ConverterParameter=Caption_PageInsert, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}">
|
||||
<dxr:RibbonPageGroup x:Name="grpInsertPages" Caption="{Binding ConverterParameter=Caption_GroupPages, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertPageBreak"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpInsertTables" Caption="{Binding ConverterParameter=Caption_GroupTables, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertTable"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpInsertIllustrations" Caption="{Binding ConverterParameter=Caption_GroupIllustrations, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertPicture"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertFloatingPicture"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpInsertLinks" Caption="{Binding ConverterParameter=Caption_GroupLinks, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertBookmark"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertHyperlink"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpInsertHeaderFooter" Caption="{Binding ConverterParameter=Caption_GroupHeaderFooter, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertHeader"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertFooter"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertPageNumber"/>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertPageCount"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpInsertText" Caption="{Binding ConverterParameter=Caption_GroupText, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertTextBox"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
<dxr:RibbonPageGroup x:Name="grpInsertSymbols" Caption="{Binding ConverterParameter=Caption_GroupSymbols, Converter={StaticResource stringIdConverter}, Mode=OneTime, Source={StaticResource stringIdConverter}}" ShowCaptionButton="False">
|
||||
<dxr:RibbonPageGroup.ItemLinks>
|
||||
<dxb:BarButtonItemLink BarItemName="biInsertSymbol"/>
|
||||
</dxr:RibbonPageGroup.ItemLinks>
|
||||
</dxr:RibbonPageGroup>
|
||||
</dxr:RibbonPage>
|
||||
|
||||
</dxr:RibbonDefaultPageCategory>
|
||||
</dxr:RibbonControl>
|
||||
|
||||
<dxre:RichEditControl x:Name="recEditor" BarManager="{Binding ElementName=BarManager1, Mode=OneTime}" Ribbon="{Binding ElementName=RibbonControl1, Mode=OneTime}" Unit="Millimeter" ShowBorder="False" ShowHoverMenu="False" ActiveViewType="Simple" TabIndex="16" />
|
||||
|
||||
</DockPanel>
|
||||
</dxb:BarManager>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxdo:LayoutPanel>
|
||||
</dxdo:LayoutGroup>
|
||||
</dxdo:DockLayoutManager.LayoutRoot>
|
||||
</dxdo:DockLayoutManager>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Pagos">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Header="Recibos" View="GroupBox">
|
||||
<tsWPF:tsGridControl TabIndex="34" x:Name="gcRecibos" NombreTablaBase="movimientoscaja">
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowTotalSummary="False" ShowGroupPanel="False" x:Name="tvRecibos" NewItemRowPosition="Bottom" AutoWidth="False" AllowGrouping="False" TabIndex="15" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC CamposObligatorios="Fecha,FechaCreacion,idCaja" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.Columns>
|
||||
<dxg:GridColumn FieldName="Importe" Width="150" Header="Importe">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskUseAsDisplayFormat="True" MaskType="Numeric" Mask="c2" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn Width="150" Header="Fecha Pago" FieldName="Fecha" SortOrder="Ascending" SortIndex="0" />
|
||||
|
||||
<tsWPF:tsGridColumn Width="250" Header="Caja" FieldName="idCaja">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings ValueMember="idCaja" PopupWidth="600" x:Name="cbCaja" IncrementalFiltering="True" DisplayMember="Descripcion" AutoComplete="True" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" Header="Observaciones" Width="350" />
|
||||
<tsWPF:tsGridColumn Width="120" IsSmart="True" Header="Fecha Creación" FieldName="FechaCreacion" SoloLectura="True" />
|
||||
<!--<tsWPF:tsGridColumn Width="90" Header="Nº Pago" HorizontalHeaderContentAlignment="Center" FieldName="idMovimiento" SoloLectura="True" />-->
|
||||
<tsWPF:tsGridColumn Width="150" Header="Nº Recibo" HorizontalHeaderContentAlignment="Center" FieldName="NumeroReciboTMP" CellTemplate="{DynamicResource ImprimirTemplate}" SoloLectura="True" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</tsWPF:tsGridControl.Columns>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Documentos" Height="22" VerticalAlignment="Top">
|
||||
<tsWPF:tsGridControl x:Name="gcDocumentos" NombreTablaBase="documentosfacturas" TabIndex="35" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC CamposObligatorios="Descripcion" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvDocumentos" ShowTotalSummary="False" AllowGrouping="False" ShowGroupPanel="False" AutoWidth="False" NewItemRowPosition="Bottom" PreviewKeyDown="tvDocumentos_PreviewKeyDown" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="Descripción" Width="500">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridColumn Width="250" Header="Tipo" FieldName="Tipo">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings ValueMember="Valor" PopupWidth="600" x:Name="cbTipoDocumento" IncrementalFiltering="True" DisplayMember="Descripcion" AutoComplete="True" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="idFicheroNavigation.NombreFichero" Header="Fichero" Width="300" x:Name="gcNombreFichero">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ButtonEditSettings x:Name="btFichero" IsTextEditable="False">
|
||||
<dxe:ButtonEditSettings.Buttons>
|
||||
<dxe:ButtonInfo GlyphKind="Search" Click="VerDocumento" />
|
||||
</dxe:ButtonEditSettings.Buttons>
|
||||
</dxe:ButtonEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Fecha" Header="Fecha" Width="140" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Registro de cambios">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="36">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaHora" Header="Fecha Hora Cambio">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Usuario" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
<!--<dx:DXTabItem Header="Registro de cambios" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="21" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable"/>
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View >
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaHora" Header="Fecha Hora Cambio" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="usuarios.Nombre" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>-->
|
||||
</dx:DXTabControl>
|
||||
<dxlc:LayoutGroup View="GroupBox" x:Name="lgTotalesClase" IsCollapsible="True" IsLocked="True" Height="Auto" HorizontalAlignment="Stretch" Header="Totales">
|
||||
<dxlc:LayoutGroup Width="1280">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="150">
|
||||
|
||||
|
||||
<tsWPF:tsLayoutItem Label="% I.V.A. 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="17" HorizontalAlignment="Stretch" EditValue="{Binding PorcentajeIVA1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
|
||||
<tsWPF:tsLayoutItem Label="% I.V.A. 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="20" HorizontalAlignment="Stretch" EditValue="{Binding PorcentajeIVA2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="% I.V.A. 3:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="23" HorizontalAlignment="Stretch" EditValue="{Binding PorcentajeIVA3, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="230">
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="18" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponible1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="21" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponible2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible 3:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="24" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponible3, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Base Imponible Exenta:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="26" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding BaseImponibleExenta, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="180">
|
||||
<tsWPF:tsLayoutItem Label="Importe IVA 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="19" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding CuotaIVA1, Mode=TwoWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Importe IVA 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="22" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding CuotaIVA2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Importe IVA 3:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="25" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding CuotaIVA3, Mode=TwoWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="Total Base Imponible:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="27" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding TotalBaseImponible, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Total IVA:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="29" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding TotalIVA, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="200" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="% I.R.P.F:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="28" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding PorcentajeIRPF, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Cuota I.R.P.F.:" FontWeight="SemiBold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="30" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding IRPF, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" >
|
||||
<tsWPF:tsLayoutItem Label="Total Factura:" FontWeight="Bold">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="31" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding TotalFactura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Importe Pagado:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="32" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding ImportePagado, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem FontWeight="Bold" Label="Pendiente Pago:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="33" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" FontWeight="Bold" EditValue="{Binding ImportePendiente, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
839
GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml.vb
Normal file
839
GestionGrupoSanchoToro/Ventas/ucFacturaEmitida.xaml.vb
Normal file
@@ -0,0 +1,839 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.LayoutControl
|
||||
Imports tsWPFCore
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Editors.Validation
|
||||
Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports tsUtilidades.Datos
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.Collections
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports tsUtilidades.Enumeraciones
|
||||
Imports tsUtilidades
|
||||
Imports bdGrupoSanchoToro.db.productos
|
||||
Imports System.Windows.Threading
|
||||
Imports System.IO
|
||||
Imports Microsoft.Win32
|
||||
|
||||
'TODO: Comprobar cuando se puede modificar una factura (o eliminar)
|
||||
Public Class ucFacturaEmitida
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idFactura As Nullable(Of Integer)
|
||||
Private lProductos As List(Of productos)
|
||||
Private ivas As List(Of enumeraciones)
|
||||
Friend idLog As Integer?
|
||||
Dim ra As facturas
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucFacturasEmitidas)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Try
|
||||
lProductos = bd.productos.OrderBy(Function(x) x.Descripcion).ToList
|
||||
Dim lProductosFra = ra.detallesfacturas.Select(Function(x) x.idProducto).ToArray
|
||||
lProductos = lProductos.Where(Function(x) x.FechaBaja Is Nothing OrElse lProductosFra.Contains(x.idProducto)).ToList
|
||||
cbProducto.ItemsSource = lProductos
|
||||
Dim cjs = bd.cajas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.FechaBaja.HasValue = False).OrderBy(Function(x) x.Descripcion).ToList
|
||||
Dim lCajas = cjs
|
||||
Dim ids = ra.movimientoscaja.Select(Function(x) x.idCaja).ToList
|
||||
Me.cbCaja.ItemsSource = lCajas.Where(Function(x) x.FechaBaja.HasValue = False OrElse ids.Contains(x.idCaja)).ToList
|
||||
cbTipoDocumento.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(bdGrupoSanchoToro.db.documentosfacturas.TipoDocumentoFacturaEnum)).OrderBy(Function(x) x.Descripcion)
|
||||
Dim plantillas As List(Of tsWPFCore.Plantilla) = Comun.ObtienePlantillas(bd, {"GRUPLA.FACEMI"}, False)
|
||||
Me.ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource = plantillas
|
||||
If plantillas.Count > 0 Then
|
||||
Me.ContenedorAplicacion.bePlantilla.EditValue = plantillas.First.idPlantilla
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
|
||||
If idLog.HasValue Then
|
||||
Try
|
||||
Dim log = bd.logs.First(Function(x) x.idLog = idLog)
|
||||
ra = tsUtilidades.Utilidades.DeserializarSinErrores(log.Log, GetType(facturas))
|
||||
If ra.idUsuario.HasValue Then ra.idUsuarioNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuario.Value)
|
||||
Dim df = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "DETALLESFACTURAS")
|
||||
If df IsNot Nothing Then
|
||||
Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(df.Log, GetType(List(Of detallesfacturas)))
|
||||
For Each d In ld
|
||||
ra.detallesfacturas.Add(d)
|
||||
Next
|
||||
End If
|
||||
Dim mv = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "MOVIMIENTOSCAJA_FR")
|
||||
If mv IsNot Nothing Then
|
||||
Dim ld = tsUtilidades.Utilidades.DeserializarSinErrores(mv.Log, GetType(List(Of movimientoscaja)))
|
||||
For Each d In ld
|
||||
ra.movimientoscaja.Add(d)
|
||||
Next
|
||||
End If
|
||||
Dim lent = bd.logs.FirstOrDefault(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "ENTIDADES")
|
||||
If lent IsNot Nothing Then
|
||||
Dim ent = tsUtilidades.Utilidades.DeserializarSinErrores(lent.Log, GetType(entidades))
|
||||
ra.idClienteNavigation = ent
|
||||
End If
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
Catch EX As Exception
|
||||
Throw New Exception("No ha sido posible mostrar el registro del cambio (id " & idLog.Value.ToString & ").", EX)
|
||||
End Try
|
||||
Else
|
||||
If FuerzaNuevo OrElse _idFactura Is Nothing Then
|
||||
ra = New facturas
|
||||
ra.FechaFactura = DateOnly.FromDateTime(Today)
|
||||
_idFactura = Nothing
|
||||
ra.FechaEmision = Now
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
ivas = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "PIVA" AndAlso x.FechaBaja Is Nothing).ToList
|
||||
|
||||
Else
|
||||
ra = bd.facturas.First(Function(x) x.idFactura = _idFactura)
|
||||
Dim tiv = ra.detallesfacturas.Select(Function(x) x.idTipoIVA).GroupBy(Function(x) x).Select(Function(x) x.FirstOrDefault).ToList
|
||||
ivas = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "PIVA" AndAlso (x.FechaBaja Is Nothing OrElse tiv.Contains(x.idEnumeracion))).ToList
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
End If
|
||||
cbRazonSocial.ItemsSource = bd.entidades.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso (x.EsCliente AndAlso x.FechaBaja.HasValue = False) OrElse x.idEntidad = ra.idCliente).ToList
|
||||
cbSerie.ItemsSource = bd.seriesfacturas.Where(Function(x) x.FechaBaja.HasValue = False AndAlso x.idEmpresa = EmpresaActual.idEmpresa).ToList
|
||||
cbIva.ItemsSource = ivas
|
||||
gcDetalle.ItemsSource = ra.detallesfacturas
|
||||
gcRecibos.ItemsSource = ra.movimientoscaja
|
||||
gcDocumentos.ItemsSource = ra.documentosfacturas
|
||||
Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "facturas").ToList
|
||||
Me.DataContext = ra
|
||||
Return NuevoEstado
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto(,,, True, "FACTURAS")
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "facturas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public Overrides ReadOnly Property CampoIndice As String
|
||||
' Get
|
||||
' Return "idFactura"
|
||||
' End Get
|
||||
'End Property
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If idLog.HasValue Then
|
||||
Return "Factura Cliente R.C.:" & idLog.ToString
|
||||
Else
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "Factura Cliente.Nuevo"
|
||||
Else
|
||||
Return "Factura Cliente." & DirectCast(Me.DataContext, facturas).idFactura.ToString
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Factura Cliente"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idFactura As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idFactura = idFactura
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
If idLog.HasValue Then
|
||||
Dim fr As facturas = Me.DataContext
|
||||
Me.docpanel.Caption = "R.C. Factura de Cliente " & fr.NumeroFactura
|
||||
Me.docpanel.Tag = "R.C. Factura Emitida." & fr.NumeroFactura
|
||||
Else
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim fr As facturas = Me.DataContext
|
||||
Me.docpanel.Caption = "Factura de Cliente " & fr.NumeroFactura
|
||||
Me.docpanel.Tag = "Factura Emitida." & fr.NumeroFactura
|
||||
Else
|
||||
Me.docpanel.Caption = "Factura de Cliente Nueva"
|
||||
Me.docpanel.Tag = "FacturaEmitida.Nuevo"
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim pers = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
' pers.Eliminar = False
|
||||
Return pers
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ap_ValidarControl(sender As Object, e As ValidationEventArgs, ByRef ev As ErrorValidacion, ByRef ValorOriginalCambiado As Object) Handles Me.ValidarControl
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
Try
|
||||
If Not pts Is Nothing Then
|
||||
Me.ErroresValidacion.EliminaError("validando-" & pts.NombreCampo)
|
||||
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "idseriefactura_nulable"
|
||||
Dim Serie = CInt(e.Value)
|
||||
Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = Serie)
|
||||
Dim Tipo As bdGrupoSanchoToro.db.seriesfacturas.TipoSerieFacturaEnum = sf.Tipo
|
||||
If Tipo = seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then
|
||||
ra.NumeroFactura = sf.Serie & "/"
|
||||
Else
|
||||
ra.NumeroFactura = Nothing
|
||||
End If
|
||||
Dim lc As New List(Of tsLayoutItem)({liNumeroFactura})
|
||||
If Tipo <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then
|
||||
EstableceSoloLectura(lc, True)
|
||||
Else
|
||||
EstableceSoloLectura(lc, False)
|
||||
End If
|
||||
Case "idcliente_nulable"
|
||||
Dim id As Integer = e.Value
|
||||
Dim ent = bd.entidades.First(Function(x) x.idEntidad = id)
|
||||
ra.RazonSocial = ent.RazonSocial
|
||||
ra.Direccion = ent.Direccion
|
||||
ra.CodigoMunicipio = ent.CodigoMunicipio
|
||||
ra.CodigoPostal = ent.CodigoPostal
|
||||
ra.NIF = ent.NIF
|
||||
ra.CodigoMunicipioNavigation = ent.CodigoMunicipioNavigation
|
||||
Case "numerofactura"
|
||||
Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = ra.idSerieFactura)
|
||||
Dim Tipo As bdGrupoSanchoToro.db.seriesfacturas.TipoSerieFacturaEnum = sf.Tipo
|
||||
If Tipo = seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then
|
||||
Dim nf As String = e.Value
|
||||
Dim nff = sf.Serie & "/"
|
||||
Dim numeracion As String = nf
|
||||
If numeracion.StartsWith(sf.Serie & "/") Then numeracion = nf.Split("/", 2)(1).Trim
|
||||
If numeracion.Length > sf.NumeroDigitos Then
|
||||
Throw New Exception("La numeración de la factura excede los dígitos permitidos")
|
||||
Else
|
||||
numeracion = numeracion.PadLeft(sf.NumeroDigitos, "0")
|
||||
End If
|
||||
nff &= numeracion
|
||||
If nff <> nf Then
|
||||
ValorOriginalCambiado = nff
|
||||
ra.NumeroFactura = nff
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Dim sCodigoError As String = "validando-"
|
||||
If pts IsNot Nothing Then
|
||||
sCodigoError &= pts.NombreCampo
|
||||
End If
|
||||
ev = New ErrorValidacion(sCodigoError, sender, ex.Message, ex, DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical)
|
||||
e.IsValid = False
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ap_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
_idFactura = ra.idFactura
|
||||
Me.gcRecibos.ItemsSource = ra.movimientoscaja
|
||||
Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idFactura AndAlso x.Aplicacion = "FACTURAS").ToList
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "idlog"
|
||||
Dim log As logs = gcLogs.CurrentItem
|
||||
Dim id As Integer = log.idLog
|
||||
Dim uc As New ucFacturaEmitida
|
||||
uc.idLog = log.idLog
|
||||
FuncionesDinamicas.AbrirAP(uc, OtrosParametros)
|
||||
Case "numerorecibotmp"
|
||||
Dim fa As facturas = Me.DataContext
|
||||
Dim rec As movimientoscaja = Celda.RowData.Row
|
||||
If rec IsNot Nothing Then
|
||||
Dim lr As New List(Of movimientoscaja)
|
||||
Dim Continuar As Boolean
|
||||
If Me.ContenedorAplicacion.btGuardar.IsEnabled Then
|
||||
Me.tvRecibos.CommitEditing()
|
||||
If Not Guardar(Nothing, Nothing,,, 9) Then
|
||||
If rec.Fecha = Date.MinValue Then
|
||||
rec.Fecha = AhoraMySql(bd)
|
||||
rec.FechaCreacion = rec.Fecha
|
||||
End If
|
||||
Continuar = True
|
||||
Else
|
||||
Continuar = False
|
||||
End If
|
||||
Else
|
||||
Continuar = True
|
||||
End If
|
||||
If Continuar Then
|
||||
lr.Add(rec)
|
||||
Dim cp As String = "RECIBO"
|
||||
Dim pl = bd.plantillas.AsNoTracking.Where(Function(x) x.Codigo = cp).Select(Function(x) New With {.Fichero = x.idFicheroNavigation.Fichero, .Tipo = x.idGrupoNavigation.Codigo}).FirstOrDefault
|
||||
Informes.ImprimirPlantilla(bd, pl.Fichero, lr, False, 1)
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
'Select Case Celda.Column.FieldName.ToLower
|
||||
' Case "numeroalbaranentrega"
|
||||
' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturas)
|
||||
' Dim id As Integer = ra.detallesalbaranes.idAlbaranEntrega
|
||||
' FuncionesDinamicas.AbrirAP(New ucAlbaranEntrega(id), OtrosParametros)
|
||||
' Case "numeroalbaranrecogida"
|
||||
' Dim ra = DirectCast(Me.gcDetalle.CurrentItem, detallesfacturas)
|
||||
' Dim id As Integer = ra.detallesalbaranes.idAlbaranRecogida
|
||||
' FuncionesDinamicas.AbrirAP(New ucAlbaranRecogida(id), OtrosParametros)
|
||||
'End Select
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ap_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado
|
||||
Dim lc As New List(Of tsLayoutItem)({liNumeroFactura})
|
||||
|
||||
Select Case EstadoNuevo
|
||||
Case EstadosAplicacion.ModificandoRegistro
|
||||
If DirectCast(ra.idSerieFacturaNavigation.Tipo, db.seriesfacturas.TipoSerieFacturaEnum) <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then
|
||||
EstableceSoloLectura(lc, True)
|
||||
End If
|
||||
Case EstadosAplicacion.Nuevo
|
||||
EstableceSoloLectura(lc, True)
|
||||
End Select
|
||||
If idLog.HasValue Then EstableceSoloLectura()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub BiBuscarProducto_Click(sender As Object, e As RoutedEventArgs)
|
||||
'Dim dxw As New dxwProductos(lProductos)
|
||||
'If dxw.ShowDialog Then
|
||||
' If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow()
|
||||
' Dim def As detallesfacturas = gcDetalle.CurrentItem
|
||||
' Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto)
|
||||
' def.idProducto = prod.idProducto
|
||||
' RellenaDatosProducto(def)
|
||||
' tvDetalle.MoveNextCell()
|
||||
' gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle)
|
||||
'End If
|
||||
If tvDetalle.ActiveEditor Is Nothing Then
|
||||
Dispatcher.BeginInvoke(New Action(Sub() tvDetalle.ShowEditor()), System.Windows.Threading.DispatcherPriority.Render)
|
||||
End If
|
||||
|
||||
Dim dxw As New dxwProductos(lProductos)
|
||||
If dxw.ShowDialog Then
|
||||
If gcDetalle.CurrentItem Is Nothing Then tvDetalle.AddNewRow()
|
||||
Dim def As detallesfacturas = gcDetalle.CurrentItem
|
||||
Dim prod = lProductos.First(Function(x) x.idProducto = dxw.idProducto)
|
||||
def.idProducto = prod.idProducto
|
||||
If tvDetalle.ActiveEditor IsNot Nothing Then tvDetalle.ActiveEditor.EditValue = prod.idProducto
|
||||
tvDetalle.PostEditor()
|
||||
tvDetalle.CloseEditor()
|
||||
gcDetalle.RefreshRow(tvDetalle.FocusedRowHandle)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar
|
||||
|
||||
ra.idUsuario = idUsuario
|
||||
Dim hte As New Hashtable
|
||||
If ra.detallesfacturas.Count = 0 Then
|
||||
hte.Add("ALMACENAR-DETALLE_OBLIGATORIO", "Es obligatorio introducir al menos un artículo")
|
||||
End If
|
||||
If ra.TotalFactura = 0 Then
|
||||
hte.Add("ALMACENAR-IMPORTE_0", "El total de la factura no puede ser 0")
|
||||
End If
|
||||
|
||||
Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = ra.idSerieFactura)
|
||||
ra.idSerieFacturaNavigation = sf
|
||||
If DirectCast(ra.idSerieFacturaNavigation.Tipo, db.seriesfacturas.TipoSerieFacturaEnum) = seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then
|
||||
If ra.NumeroFactura.Trim.NothingAVacio = "" Then
|
||||
hte.Add("ALMACENAR-NUMERO_FACTURA_OBLIGATORIO", "El nº de factura es obligatorio.")
|
||||
End If
|
||||
End If
|
||||
If bd.facturas.Any(Function(x) x.NumeroFactura = ra.NumeroFactura AndAlso x.idCliente = ra.idCliente AndAlso x.idFactura <> ra.idFactura) Then
|
||||
hte.Add("ALMACENAR-YA_EXISTE_OTRA_FACTURA", "Ya existe esta factura del mismo cliente registrada")
|
||||
End If
|
||||
If Math.Abs(ra.ImportePagado) > Math.Abs(ra.TotalFactura) Then
|
||||
hte.Add("ALMACENAR-IMPORTE_PAGADO_SUPERIOR", "El importe pagado de los recibos no puede superar al total de la factura")
|
||||
End If
|
||||
If DirectCast(ra.idSerieFacturaNavigation.Tipo, db.seriesfacturas.TipoSerieFacturaEnum) <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then
|
||||
If Estado = EstadosAplicacion.Nuevo Then
|
||||
Dim Año = ra.FechaFactura.Year
|
||||
If bd.facturas.Any(Function(x) x.idSerieFactura = ra.idSerieFactura AndAlso x.FechaFactura > ra.FechaFactura AndAlso x.FechaFactura.Year = Año) Then
|
||||
hte.Add("ALMACENAR_YA_EXISTE_OTRA_FACTURA", "Existen facturas con fecha posterior a la actual")
|
||||
End If
|
||||
Else
|
||||
Dim serie = ra.NumeroFactura.Split("/")(0)
|
||||
Dim Numero = ra.NumeroFactura.Split("/")(1)
|
||||
Dim ant = serie & "/" & (Integer.Parse(Numero) - 1).ToString.PadLeft(ra.idSerieFacturaNavigation.NumeroDigitos, "0")
|
||||
Dim pos = serie & "/" & (Integer.Parse(Numero) + 1).ToString.PadLeft(ra.idSerieFacturaNavigation.NumeroDigitos, "0")
|
||||
Dim fa = bd.facturas.FirstOrDefault(Function(x) x.NumeroFactura = ant And x.idSerieFactura = ra.idSerieFactura)
|
||||
Dim fp = bd.facturas.FirstOrDefault(Function(x) x.NumeroFactura = pos And x.idSerieFactura = ra.idSerieFactura)
|
||||
If (fa IsNot Nothing AndAlso fa.FechaFactura > ra.FechaFactura) OrElse (fp IsNot Nothing AndAlso fp.FechaFactura < ra.FechaFactura) Then
|
||||
hte.Add("ALMACENAR_YA_EXISTE_OTRA_FACTURA", "Las fechas de facturas deben seguir el orden de la numeración")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
Else
|
||||
Dim dfrtf = ra.detallesfacturas.Where(Function(x) x.DetalleRTFModificado).ToList
|
||||
For Each d In dfrtf
|
||||
If d.idDetalle = 0 Then
|
||||
If d.DetalleRTF.Length > 0 Then
|
||||
Dim f As New bdGrupoSanchoToro.db.ficheros
|
||||
With f
|
||||
.Descripcion = "Más descripción f.r."
|
||||
.Fichero = d.DetalleRTF
|
||||
.Fecha = Now
|
||||
End With
|
||||
d.idDetalleRTFNavigation = f
|
||||
End If
|
||||
Else
|
||||
If d.idDetalleRTF Is Nothing Then
|
||||
d.idDetalleRTFNavigation = New db.ficheros
|
||||
End If
|
||||
With d.idDetalleRTFNavigation
|
||||
.Fichero = d.DetalleRTF
|
||||
.Fecha = Now
|
||||
End With
|
||||
End If
|
||||
Next
|
||||
|
||||
If ra.NumeroFactura.NothingAVacio = "" Then ra.EstableceNumeroFactura(bd)
|
||||
For Each mv In ra.movimientoscaja
|
||||
mv.Tipo = TipoMovimientoEnum.RECIBO_CLIENTE
|
||||
If mv.idUsuario.HasValue = False Then mv.idUsuario = idUsuario
|
||||
Next
|
||||
For Each r In ra.movimientoscaja.ToList.Where(Function(x) x.NumeroRecibo.NothingAVacio = "")
|
||||
r.idFacturaNavigation = ra
|
||||
r.EstableceNumeroRecibo()
|
||||
Next
|
||||
For Each d In ra.documentosfacturas
|
||||
If d.idUsuario.HasValue = False Then d.idUsuario = idUsuario
|
||||
Next
|
||||
If ra.ImportePendiente = 0 Then
|
||||
ra.FechaPago = DateOnly.FromDateTime(ra.movimientoscaja.OrderByDescending(Function(x) x.Fecha).First.Fecha)
|
||||
Else
|
||||
ra.FechaPago = Nothing
|
||||
End If
|
||||
If ra.PorcentajeIVA2.HasValue = False Then
|
||||
ra.BaseImponible2 = Nothing
|
||||
ra.CuotaIVA2 = Nothing
|
||||
End If
|
||||
If ra.PorcentajeIVA2.HasValue = False Then
|
||||
ra.BaseImponible3 = Nothing
|
||||
ra.CuotaIVA3 = Nothing
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvDetalle_CellValueChanged(sender As Object, e As CellValueChangedEventArgs) Handles tvDetalle.CellValueChanged
|
||||
Dim def As detallesfacturas = e.Row
|
||||
Select Case e.Column.FieldName.ToLower
|
||||
Case "idproducto"
|
||||
RellenaDatosProducto(def)
|
||||
Case "idtipoiva"
|
||||
Dim idTIVA = CInt(e.Value)
|
||||
def.PorcentajeIVA = ivas.First(Function(x) x.idEnumeracion = idTIVA).ValorNumerico1
|
||||
End Select
|
||||
'tvDetalle.CommitEditing()
|
||||
'gcDetalle.CurrentItem = e.Row
|
||||
|
||||
End Sub
|
||||
Private Sub RellenaDatosProducto(dea As detallesfacturas)
|
||||
Dim ae As facturas = Me.DataContext
|
||||
Dim pr = lProductos.First(Function(x) x.idProducto = dea.idProducto)
|
||||
dea.Precio = pr.UltimoPrecioCompra
|
||||
If dea.Cantidad = 0 Then dea.Cantidad = 1
|
||||
' dea.RefrescaImporte()
|
||||
End Sub
|
||||
|
||||
Private Sub BiBuscarCliente_Click(sender As Object, e As RoutedEventArgs)
|
||||
If Me.ContenedorAplicacion.btGuardar.IsEnabled Then
|
||||
Dim dxw As New dxwEntidades(bd, True, False)
|
||||
If dxw.ShowDialog Then
|
||||
Dim ent = bd.entidades.First(Function(x) x.idEntidad = dxw.Entidad.idEntidad)
|
||||
ra.idClienteNavigation = ent
|
||||
ra.idCliente_Nulable = ent.idEntidad
|
||||
ra.RazonSocial = ent.RazonSocial
|
||||
ra.CodigoPostal = ent.CodigoPostal
|
||||
ra.CodigoMunicipio = ent.CodigoMunicipio
|
||||
ra.Direccion = ent.Direccion
|
||||
ra.Observaciones = ""
|
||||
ra.NIF = ent.NIF
|
||||
' ra.RefrescaExtensiones()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub ap_ImprimirPlantilla(sender As Object, e As ItemClickEventArgs, idPlantilla As Integer) Handles Me.ImprimirPlantilla
|
||||
Imprimir(idPlantilla, False, 1)
|
||||
End Sub
|
||||
Private Sub Imprimir(idPlantilla As Integer, ImpresoraDefecto As Boolean, Copias As Integer)
|
||||
|
||||
Dim ds As List(Of facturas)
|
||||
Dim pl = bd.plantillas.AsNoTracking.Where(Function(x) x.idPlantilla = idPlantilla).Select(Function(x) New With {.Fichero = x.idFicheroNavigation.Fichero, .Tipo = x.idGrupoNavigation.Codigo}).FirstOrDefault
|
||||
ds = New List(Of facturas)
|
||||
ds.Add(ra)
|
||||
Informes.ImprimirPlantilla(bd, pl.Fichero, ds, ImpresoraDefecto, Copias)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Private Sub ap_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Private Sub tvDetalle_RowUpdated(sender As Object, e As DevExpress.Xpf.Grid.RowEventArgs) Handles tvDetalle.RowUpdated
|
||||
If e.RowHandle = GridControl.NewItemRowHandle Then
|
||||
Dispatcher.BeginInvoke(New Action(Function()
|
||||
e.Source.Grid.CurrentItem = e.Row
|
||||
e.Source.ShowEditor()
|
||||
End Function), DispatcherPriority.Render)
|
||||
End If
|
||||
Call CalculaTotales()
|
||||
End Sub
|
||||
Sub CalculaTotales()
|
||||
|
||||
Dim ivas(2) As Double?
|
||||
For Each df In ra.detallesfacturas
|
||||
For i = 0 To 3
|
||||
If i = 3 Then Throw New Exception("Demasiados tipos de iva en la misma factura.")
|
||||
If ivas(i).HasValue = False OrElse ivas(i).Value = df.PorcentajeIVA Then
|
||||
ivas(i) = df.PorcentajeIVA
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
ra.PorcentajeIVA1 = ivas(0)
|
||||
ra.PorcentajeIVA2 = ivas(1)
|
||||
ra.PorcentajeIVA3 = ivas(2)
|
||||
ra.BaseImponibleExenta = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue = False).Sum(Function(x) x.Importe)
|
||||
ra.BaseImponible1 = Nothing
|
||||
ra.BaseImponible2 = Nothing
|
||||
ra.BaseImponible3 = Nothing
|
||||
If ivas(0).HasValue Then ra.BaseImponible1 = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(0)).Sum(Function(x) x.Importe)
|
||||
If ivas(1).HasValue Then ra.BaseImponible2 = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(1)).Sum(Function(x) x.Importe)
|
||||
If ivas(2).HasValue Then ra.BaseImponible3 = ra.detallesfacturas.Where(Function(x) x.PorcentajeIVA.HasValue AndAlso x.PorcentajeIVA = ivas(2)).Sum(Function(x) x.Importe)
|
||||
ra.TotalBaseImponible = Math.Round(ra.detallesfacturas.Sum(Function(x) x.Importe), 2)
|
||||
CalculaCuotasIVA(ra)
|
||||
CalculaIRPF(ra)
|
||||
CalculaTotalesFinales(ra)
|
||||
End Sub
|
||||
Public Sub CalculaIRPF(F As facturas)
|
||||
If F.idSerieFacturaNavigation Is Nothing Then
|
||||
DXMessageBox.Show("Primero debe definir la serie de la factura", "Atención")
|
||||
Else
|
||||
If F.idSerieFacturaNavigation.IRPFDespuesDeIVA Then
|
||||
F.IRPF = Math.Round((F.TotalBaseImponible + F.TotalIVA) * F.PorcentajeIRPF / 100, 2, MidpointRounding.AwayFromZero)
|
||||
Else
|
||||
F.IRPF = Math.Round(F.TotalBaseImponible * F.PorcentajeIRPF / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Public Sub CalculaCuotasIVA(F As facturas)
|
||||
F.CuotaIVA1 = Nothing
|
||||
F.CuotaIVA2 = Nothing
|
||||
F.CuotaIVA3 = Nothing
|
||||
If F.PorcentajeIVA1.HasValue Then
|
||||
F.CuotaIVA1 = Math.Round(F.BaseImponible1.Value * F.PorcentajeIVA1.Value / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
If F.PorcentajeIVA2.HasValue Then
|
||||
F.CuotaIVA2 = Math.Round(F.BaseImponible2.Value * F.PorcentajeIVA2.Value / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
If F.PorcentajeIVA3.HasValue Then
|
||||
F.CuotaIVA3 = Math.Round(F.BaseImponible3.Value * F.PorcentajeIVA3.Value / 100, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
End Sub
|
||||
Public Sub CalculaTotalesFinales(ra As facturas)
|
||||
ra.TotalIVA = Math.Round(If(ra.CuotaIVA1.HasValue, ra.CuotaIVA1.Value, 0) + If(ra.CuotaIVA2.HasValue, ra.CuotaIVA2.Value, 0) + If(ra.CuotaIVA3.HasValue, ra.CuotaIVA3.Value, 0), 2, MidpointRounding.AwayFromZero)
|
||||
ra.TotalFactura = Math.Round(ra.TotalBaseImponible + ra.TotalIVA - ra.IRPF, 2, MidpointRounding.AwayFromZero)
|
||||
ra.ImportePagado = Math.Round(ra.movimientoscaja.Sum(Function(x) x.Importe), 2, MidpointRounding.AwayFromZero)
|
||||
' ra.RefrescaExtensiones()
|
||||
End Sub
|
||||
Private Sub tvDetalle_ValidaFila(sender As Object, e As DevExpress.Xpf.Grid.GridRowValidationEventArgs) Handles tvDetalle.ValidateRow
|
||||
'Dim df As detallesfacturas = e.Row
|
||||
'Dim htErrores = New Hashtable
|
||||
'If df.Cantidad = 0 Then
|
||||
' DXMessageBox.Show("La Cantidad no puede ser 0", "Error")
|
||||
' e.SetError("La Cantidad no puede ser 0")
|
||||
' e.IsValid = False
|
||||
'End If
|
||||
Try
|
||||
Dim htErrores = New Hashtable
|
||||
ErroresValidacion.LimpiarErrores("TSGC-" & gcDetalle.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":")
|
||||
Dim df As detallesfacturas = e.Row
|
||||
|
||||
If df.Cantidad = 0 Then
|
||||
htErrores.Add("Cantidad0", "La Cantidad no puede ser 0")
|
||||
End If
|
||||
|
||||
If htErrores.Count > 0 Then
|
||||
Me.AgregaErroresTSGC(gcDetalle, htErrores, e)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub gcDetalle_DespuesEliminar(gc As tsGridControl) Handles gcDetalle.DespuesEliminar
|
||||
CalculaTotales()
|
||||
End Sub
|
||||
|
||||
Private Sub tvRecibos_ValidaFila(sender As Object, e As GridRowValidationEventArgs) Handles tvRecibos.ValidateRow
|
||||
'Dim mv As movimientoscaja = e.Row
|
||||
'If mv.Importe = 0 Then
|
||||
' DXMessageBox.Show("El Importe no puede ser 0", "Error")
|
||||
' e.SetError("El Importe no puede ser 0")
|
||||
' e.IsValid = False
|
||||
'End If
|
||||
Try
|
||||
Dim htErrores = New Hashtable
|
||||
ErroresValidacion.LimpiarErrores("TSGC-" & gcRecibos.PropiedadesTS.NumeroObjeto.ToString & ":" & e.RowHandle.ToString & ":")
|
||||
Dim mv As movimientoscaja = e.Row
|
||||
|
||||
If mv.Importe = 0 Then
|
||||
htErrores.Add("Importe0", "El Importe no puede ser 0")
|
||||
End If
|
||||
If htErrores.Count > 0 Then
|
||||
Me.AgregaErroresTSGC(gcRecibos, htErrores, e)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub gcRecibos_DespuesEliminar(gc As tsGridControl) Handles gcRecibos.DespuesEliminar
|
||||
CalculaTotales()
|
||||
End Sub
|
||||
|
||||
Private Sub tvRecibos_RowUpdated(sender As Object, e As RowEventArgs) Handles tvRecibos.RowUpdated
|
||||
|
||||
CalculaTotalesFinales(ra)
|
||||
End Sub
|
||||
|
||||
Private Sub tvRecibos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvRecibos.InitNewRow
|
||||
gcRecibos.SetCellValue(e.RowHandle, "Fecha", Now)
|
||||
gcRecibos.SetCellValue(e.RowHandle, "FechaCreacion", Now)
|
||||
End Sub
|
||||
|
||||
Private Sub ucFacturaEmitida_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
If Not pts Is Nothing Then
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "porcentajeirpf"
|
||||
CalculaIRPF(ra)
|
||||
CalculaTotalesFinales(ra)
|
||||
Case "cuotaiva1", "cuotaiva2", "cuotaiva3", "irpf"
|
||||
CalculaTotalesFinales(ra)
|
||||
Case "idcliente_nulable"
|
||||
ra.idClienteNavigation = bd.entidades.First(Function(x) x.idEntidad = ra.idCliente)
|
||||
Case "idseriefactura_nulable"
|
||||
If ra.idSerieFactura_Nulable.HasValue Then
|
||||
Dim sf = bd.seriesfacturas.First(Function(x) x.idSerieFactura = ra.idSerieFactura_Nulable)
|
||||
ra.idSerieFacturaNavigation = sf
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvDetalle_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDetalle.InitNewRow
|
||||
gcDetalle.SetCellValue(e.RowHandle, "idTipoIVA", ivas.OrderByDescending(Function(x) x.ValorNumerico2).First.idEnumeracion)
|
||||
Dispatcher.BeginInvoke(New Action(Function()
|
||||
Dim view = TryCast(sender, TableView)
|
||||
view.CommitEditing()
|
||||
End Function))
|
||||
End Sub
|
||||
|
||||
Private Sub tvDetalle_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles tvDetalle.PreviewKeyDown
|
||||
If e.Key = Key.F6 Then
|
||||
Select Case gcDetalle.CurrentColumn.FieldName.ToLower
|
||||
Case "idproducto"
|
||||
tvDetalle.ShowEditor()
|
||||
BiBuscarProducto_Click(Nothing, Nothing)
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cbRazonSocial_PreviewKeyDown(sender As Object, e As Input.KeyEventArgs) Handles cbRazonSocial.PreviewKeyDown
|
||||
If e.Key = Key.F6 Then
|
||||
BiBuscarCliente_Click(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub gcRecibos_AntesEliminar(gc As tsGridControl, ByRef Cancelar As Boolean) Handles gcRecibos.AntesEliminar
|
||||
Dim da As movimientoscaja = gc.CurrentItem
|
||||
If da.idMovimientoCierre.HasValue Then
|
||||
DXMessageBox.Show("No se puede eliminar un pago ya que está cerrado")
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvRecibos_ShowingEditor(sender As Object, e As ShowingEditorEventArgs) Handles tvRecibos.ShowingEditor
|
||||
'If e.RowHandle <> DataControlBase.NewItemRowHandle Then
|
||||
' Dim rec As movimientoscaja = gcRecibos.GetRow(e.RowHandle)
|
||||
' If e.Column.FieldName.ToLower = "importe" OrElse e.Column.FieldName.ToLower = "idcaja" OrElse e.Column.FieldName.ToLower = "fecha" Then
|
||||
' If rec.idMovimientoCierre.HasValue OrElse rec.FechaSupervision.HasValue Then
|
||||
' e.Cancel = True
|
||||
' e.Handled = True
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Cargando As Boolean
|
||||
Private Sub gcDetalle_SelectedItemChanged(sender As Object, e As SelectedItemChangedEventArgs) Handles gcDetalle.SelectedItemChanged
|
||||
Try
|
||||
|
||||
Dim df As detallesfacturas = gcDetalle.CurrentItem
|
||||
If df IsNot Nothing Then
|
||||
recEditor.LoadDocument(df.DetalleRTF)
|
||||
recEditor.IsEnabled = True
|
||||
Else
|
||||
recEditor.CreateNewDocument()
|
||||
recEditor.IsEnabled = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.Message)
|
||||
'Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub recEditor_ContentChanged(sender As Object, e As EventArgs) Handles recEditor.ContentChanged
|
||||
Try
|
||||
If Cargando Then
|
||||
Cargando = False
|
||||
Else
|
||||
Dim df As detallesfacturas = gcDetalle.CurrentItem
|
||||
If df IsNot Nothing AndAlso tvDetalle.FocusedRowHandle >= 0 Then
|
||||
Dim doc = recEditor.Document
|
||||
If doc.GetText(doc.Range).Trim = "" Then
|
||||
df.DetalleRTF = Nothing
|
||||
Else
|
||||
df.DetalleRTF = recEditor.SaveDocument(DevExpress.XtraRichEdit.DocumentFormat.Rtf)
|
||||
End If
|
||||
df.DetalleRTFModificado = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub recEditor_DocumentLoaded(sender As Object, e As EventArgs) Handles recEditor.DocumentLoaded
|
||||
Cargando = True
|
||||
End Sub
|
||||
|
||||
Private Sub tvDocumentos_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvDocumentos.ValidateRow
|
||||
Dim ges As documentosfacturas = gcDocumentos.CurrentItem
|
||||
If ges.idUsuario.HasValue = False Then
|
||||
ges.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
End If
|
||||
End Sub
|
||||
Private Sub VerDocumento(sender As System.Object, e As System.Windows.RoutedEventArgs)
|
||||
Try
|
||||
Dim exp As documentosfacturas = gcDocumentos.CurrentItem
|
||||
If exp IsNot Nothing AndAlso exp.idFicheroNavigation IsNot Nothing AndAlso exp.idFicheroNavigation.NombreFichero IsNot Nothing AndAlso exp.idFicheroNavigation.Fichero IsNot Nothing Then
|
||||
Dim sftmp As String = tsUtilidades.Utilidades.ObtieneDirectorioAleatorio("GrupoSanchoToro") & "\" & exp.idFicheroNavigation.NombreFichero
|
||||
tsUtilidades.Utilidades.ByteArrayAFichero(exp.idFicheroNavigation.Fichero, sftmp, True)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sftmp)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Examinar(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btFichero.DefaultButtonClick
|
||||
Try
|
||||
If gcDocumentos.CurrentItem Is Nothing Then tvDocumentos.AddNewRow()
|
||||
Dim exp As documentosfacturas = gcDocumentos.CurrentItem
|
||||
Dim ofd As New OpenFileDialog
|
||||
If ofd.ShowDialog() Then
|
||||
Dim fin As New FileInfo(ofd.FileName)
|
||||
If fin.Length > 1024 * 1024 * 50 Then
|
||||
DXMessageBox.Show("El fichero no puede ser mayor de 50 Mb", "Atención")
|
||||
Else
|
||||
Dim f() As Byte = IO.File.ReadAllBytes(ofd.FileName)
|
||||
Dim idTipoDocumentoExp = bd.enumeraciones.First(Function(x) x.Codigo = "TIPFIC.EXPENT").idEnumeracion
|
||||
If exp.idFicheroNavigation Is Nothing Then
|
||||
Dim fi As New db.ficheros
|
||||
exp.idFicheroNavigation = fi
|
||||
End If
|
||||
exp.idFicheroNavigation.NombreFichero = IO.Path.GetFileName(ofd.FileName)
|
||||
exp.idFicheroNavigation.Fichero = f
|
||||
exp.idFicheroNavigation.Fecha = Now
|
||||
exp.idFicheroNavigation.Descripcion = exp.Descripcion.Acortar(80)
|
||||
exp.idFicheroNavigation.idTipo = idTipoDocumentoExp
|
||||
exp.Fecha = Now
|
||||
Dim usu = bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
exp.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
exp.idUsuarioNavigation = usu
|
||||
tvDocumentos.MoveNextCell()
|
||||
gcDocumentos.RefreshRow(tvDocumentos.FocusedRowHandle)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub tvDocumentos_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key = Key.F6 AndAlso gcDocumentos.CurrentColumn.FieldName.ToLower = "ficheros.nombrefichero" Then
|
||||
Examinar(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvDocumentos_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvDocumentos.InitNewRow
|
||||
gcDocumentos.SetCellValue(e.RowHandle, "Fecha", Now)
|
||||
End Sub
|
||||
|
||||
Private Sub ucFacturaEmitida_AntesEliminar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, ByRef OmitirPreguntaContinuar As Boolean) Handles Me.AntesEliminar
|
||||
If ra.idSerieFacturaNavigation.Tipo <> seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then
|
||||
DXMessageBox.Show("Las facturas que no son emitidas por los clientes no se pueden eliminar", "Atención")
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
137
GestionGrupoSanchoToro/Ventas/ucFacturasEmitidas.xaml
Normal file
137
GestionGrupoSanchoToro/Ventas/ucFacturasEmitidas.xaml
Normal file
@@ -0,0 +1,137 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" x:Class="ucFacturasEmitidas"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Búsqueda Rápida" Orientation="Vertical" x:Name="BusquedaRapida">
|
||||
<dxlc:LayoutGroup Width="950" HorizontalAlignment="Left" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicio:" TabIndex="8" >
|
||||
<dxe:DateEdit x:Name="teFechaInicio" TabIndex="1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Fin:" >
|
||||
<dxe:DateEdit x:Name="teFechaFin" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Incluir Facturas Pagadas:" HorizontalContentAlignment="Left" >
|
||||
<dxe:CheckEdit x:Name="cbIncluirTodos" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Mostar solo las no Enviadas a la Asesoría:" HorizontalAlignment="Left" HorizontalContentAlignment="Left" >
|
||||
<dxe:CheckEdit x:Name="cbSoloPendientes" IsChecked="False" TabIndex="34" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Búsqueda:" FontWeight="Bold" >
|
||||
<dxe:TextEdit x:Name="teBusqueda" TabIndex="0" FontWeight="Normal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="BtBuscar_Click" IsDefault="True" TabIndex="1" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutItem Label="Campos de búsqueda:">
|
||||
<Border BorderThickness="1" BorderBrush="Black" >
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<TextBlock x:Name="tbCamposBusqueda" Text="Razón Social, NIF, Nº Factura"/>
|
||||
<TextBlock Margin="20,0,0,0" Text="(En Blanco Muestra Todos)" FontWeight="Bold" ></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</dxlc:LayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="1" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="NumeroFactura" Width="120" IsSmart="True" Header="Nº Factura" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="idSerieFacturaNavigation.Descripcion" Header="Serie" Width="200" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="RazonSocial" Header="Razón Social" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="NIF" Header="N.I.F." Width="100" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="FechaFactura" Header="Fecha Factura" IsSmart="True" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaEmision" Header="Fecha Emisión" IsSmart="True" Width="130" />
|
||||
<dxg:GridColumn FieldName="TotalBaseImponible" Header="Base Imponible" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<!--<dxg:GridColumn FieldName="Descuento" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>-->
|
||||
|
||||
<dxg:GridColumn FieldName="TotalIVA" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="TotalFactura" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="ImportePagado" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaPago" Header="Fecha Pago" IsSmart="True" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="ImportePendiente" HorizontalHeaderContentAlignment="Right" Width="120" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaEnvioAsesoria" Header="Fecha Envío Asesoría" IsSmart="True" Width="150" AllowPrinting="False" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" Width="400" IsSmart="True" AllowPrinting="False" />
|
||||
<dxg:GridColumn FieldName="idUsuarioNavigation.Usuario" Header="Usuario" Width="150" IsSmart="True" AllowPrinting="False" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowSearchPanelMode="Always" ShowGroupPanel="True" ShowTotalSummary="True" ShowGroupFooters="True" />
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInColumn="TotalBaseImponible" DisplayFormat=" {0:c2}"/>
|
||||
<!--<dxg:GridSummaryItem FieldName="Descuento" SummaryType="Sum" ShowInColumn="Descuento" DisplayFormat=" {0:c2}"/>-->
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInColumn="IVA" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInColumn="TotalFactura" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInColumn="ImportePagado" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInColumn="ImportePendiente" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInColumn="entidades.RazonSocial" DisplayFormat="Nº Facturas: {0:n0}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}"/>
|
||||
<!--<dxg:GridSummaryItem FieldName="Descuento" SummaryType="Sum" ShowInGroupColumnFooter="Descuento" DisplayFormat=" {0:c2}"/>-->
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInGroupColumnFooter="entidades.RazonSocial" DisplayFormat=" {0:n0}" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
347
GestionGrupoSanchoToro/Ventas/ucFacturasEmitidas.xaml.vb
Normal file
347
GestionGrupoSanchoToro/Ventas/ucFacturasEmitidas.xaml.vb
Normal file
@@ -0,0 +1,347 @@
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports Microsoft.Win32
|
||||
Imports System.IO
|
||||
Imports tsEFCore8.Extensiones.StringExtensions
|
||||
Imports TSpdfUtils
|
||||
|
||||
|
||||
Public Class ucFacturasEmitidas
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
ContenedorAplicacion.btGuardar.IsVisible = False
|
||||
ContenedorAplicacion.siEstado.IsVisible = False
|
||||
'Dim Hoy = Date.Today
|
||||
'teFechaFin.EditValue = Hoy
|
||||
'teFechaInicio.EditValue = New Date(Hoy.Year, 1, 1)
|
||||
Me.GridSeleccion = Me.gc
|
||||
Me.HabilitarRefresco = True
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
If Background OrElse Refrescar Then ObtienefacturasAsync(bd, Background)
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 4,
|
||||
.Descripcion = "ENVIA EXCEL Y FRAS. IMPRESAS SELECCIONADAS A ASESORIA"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "ENVIA FACTURAS SELECCIONADAS POR EMAIL AL CLIENTE"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 3,
|
||||
.Descripcion = "GENERA EXCEL DE FACTURAS SELECCIONADAS"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 5,
|
||||
.Descripcion = "GENERA PDF DE FACTURAS SELECCIONADAS"})
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Facturas A Clientes"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "FacturasEmitidas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "facturas"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Facturas A Clientes"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim per = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
per.Eliminar = False
|
||||
Return per
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub Nuevo() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucFacturaEmitida, OtrosParametros)
|
||||
End Sub
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim ra = DirectCast(Me.gc.CurrentItem, facturas)
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "numerofactura"
|
||||
Dim id As Integer = ra.idFactura
|
||||
FuncionesDinamicas.AbrirAP(New ucFacturaEmitida(id), OtrosParametros)
|
||||
Case "razonsocial"
|
||||
Dim id As Integer = ra.idCliente
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad(id), OtrosParametros)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar
|
||||
|
||||
End Sub
|
||||
Public Function ObtieneFacturasEmitidas(ByRef DataContext As Object, BackGround As Boolean, TextoBusqueda As String, FechaInicio As DateOnly?, FechaFin As DateOnly?, IncluirTodos As Boolean, Pendientes As Boolean) As List(Of facturas)
|
||||
Dim rs As IQueryable(Of facturas)
|
||||
Dim lf As New List(Of facturas)
|
||||
Dim iNumExc As Integer = 0
|
||||
Do
|
||||
Try
|
||||
rs = bd.facturas.Where(Function(x) x.idClienteNavigation.idEmpresa = EmpresaActual.idEmpresa).Include(Function(x) x.idSerieFacturaNavigation).Include(Function(x) x.movimientoscaja).Include(Function(x) x.idClienteNavigation).Include(Function(x) x.idEventoNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Include(Function(x) x.idUsuarioNavigation).AsQueryable
|
||||
|
||||
If FechaInicio.HasValue Then
|
||||
rs = rs.Where(Function(x) x.FechaFactura >= FechaInicio.Value)
|
||||
End If
|
||||
|
||||
If FechaFin.HasValue Then
|
||||
rs = rs.Where(Function(x) x.FechaFactura <= FechaFin.Value)
|
||||
End If
|
||||
If IncluirTodos = False Then
|
||||
rs = rs.Where(Function(x) x.movimientoscaja.Count = 0 OrElse Math.Round(x.movimientoscaja.Sum(Function(y) y.Importe), 2) <> Math.Round(x.TotalFactura, 2))
|
||||
End If
|
||||
If Pendientes Then
|
||||
rs = rs.Where(Function(x) x.FechaEnvioAsesoria.HasValue = False)
|
||||
End If
|
||||
If TextoBusqueda <> "" Then
|
||||
Dim parametros(0) As Object
|
||||
Dim CamposBusquedaNumericos() As String = {"idFactura"}
|
||||
Dim CamposBusquedaAlfabeticos() As String = {"idClienteNavigation.RazonSocial", "idClienteNavigation.NIF", "NumeroFactura"}
|
||||
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, CamposBusquedaNumericos, CamposBusquedaAlfabeticos, Nothing)
|
||||
rs = rs.Where(Function(x) x.idClienteNavigation.idEmpresa = EmpresaActual.idEmpresa).Where(ExpresionBusqueda).AsQueryable
|
||||
End If
|
||||
lf = rs.OrderByDescending(Function(x) x.FechaFactura).ThenByDescending(Function(x) x.NumeroFactura).ToList
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
iNumExc += 1
|
||||
If iNumExc > 3 Then
|
||||
rs = Nothing
|
||||
Exit Do
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
Return lf
|
||||
End Function
|
||||
|
||||
Public Async Sub ObtienefacturasAsync(bd As tscGrupoSanchoToro, Background As Boolean)
|
||||
Try
|
||||
Dim rs As New List(Of facturas)
|
||||
Dim Busqueda = If(Me.teBusqueda.EditValue Is Nothing, "", Me.teBusqueda.EditValue)
|
||||
Dim fi As DateOnly? : If teFechaInicio.EditValue IsNot Nothing Then fi = DateOnly.FromDateTime(teFechaInicio.EditValue)
|
||||
Dim ff As DateOnly? : If teFechaFin.EditValue IsNot Nothing Then ff = DateOnly.FromDateTime(teFechaFin.EditValue)
|
||||
Dim it As Boolean = cbIncluirTodos.IsChecked
|
||||
Dim bPendientes As Boolean = cbSoloPendientes.IsChecked
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
rs = ObtieneFacturasEmitidas(bd, Background, Busqueda, fi, ff, it, bPendientes)
|
||||
End Sub)
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando Facturas Emitidas ...")
|
||||
rs = ObtieneFacturasEmitidas(bd, Background, Busqueda, fi, ff, it, bPendientes)
|
||||
End If
|
||||
|
||||
gc.ItemsSource = rs
|
||||
DataContext = rs
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
Me.ContenedorAplicacion.IsEnabled = True
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BtBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtienefacturasAsync(bd, False)
|
||||
End Sub
|
||||
|
||||
Private Sub ucFacturasEmitidas_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
Try
|
||||
' Dim ra As entidades = Me.DataContext
|
||||
Dim tf As List(Of facturas) = gc.ItemsSource
|
||||
Dim fras = gc.ElementosSeleccionados.Cast(Of facturas).ToList
|
||||
If fras.Count = 0 Then
|
||||
DXMessageBox.Show("Antes debe seleccionar alguna factura emitida", "Atención")
|
||||
Else
|
||||
If fras.Any(Function(x) x.TotalIVA = 0) Then
|
||||
DXMessageBox.Show("Atención alguna de las facturas seleccionadas no tienen IVA", "Atención")
|
||||
End If
|
||||
Select Case idAccion
|
||||
Case 1
|
||||
Dim sFacturas As String = ""
|
||||
Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO" AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
Dim sMensaje As String = ""
|
||||
Dim grf = fras.GroupBy(Function(x) x.idCliente)
|
||||
Dim NumCorreos As Integer = 0
|
||||
If DXMessageBox.Show("Atención se van a enviar " & grf.Count.ToString & " correos. ¿Desea Continuar?", "Atención", MessageBoxButton.YesNo) = MessageBoxResult.Yes Then
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Generando correos, por favor espere ...")
|
||||
For Each g In grf
|
||||
If g.First.idClienteNavigation.Email.NothingAVacio = "" Then
|
||||
sMensaje &= g.First.idClienteNavigation.RazonSocial & vbCrLf
|
||||
Else
|
||||
NumCorreos += 1
|
||||
Dim dArchivos As Dictionary(Of String, Byte()) = Nothing
|
||||
For Each fe In g
|
||||
DXSplashScreen.SetState("Generando archivos de la factura " & fe.NumeroFactura & ", por favor espere ...")
|
||||
Next
|
||||
DXSplashScreen.SetState("Comprimiendo Archivos, por favor espere ...")
|
||||
Dim bzip = tsUtilidades.zip.ComprimirArchivos(dArchivos)
|
||||
Dim Asunto, Cuerpo As String
|
||||
|
||||
Asunto = EmpresaActual.RazonSocial & " - Adjunto le remitimos facturas"
|
||||
Cuerpo = "Distinguidos Sres., adjunto le remitimos facturas"
|
||||
bdGrupoSanchoToro.db.correos.GeneraRegistroCorreon(bd, Asunto, Cuerpo, cta, g.First.idClienteNavigation.Email, g.First.idClienteNavigation.Email2, cta.Remitente, bzip, "Facturas" & ".zip", g.First.idCliente, "ENTIDAD", g.First.idCliente)
|
||||
End If
|
||||
Next
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End If
|
||||
If sMensaje <> "" Then
|
||||
DXMessageBox.Show("Los siguientes Clientes no tienen correo electrónico: " & sMensaje, "Generación de correos")
|
||||
End If
|
||||
DXMessageBox.Show("Se han generado " & NumCorreos.ToString & " correos electrónicos", "Generación de correos")
|
||||
Case 3
|
||||
Try
|
||||
Dim sfd As New SaveFileDialog
|
||||
sfd.FileName = IO.Path.GetDirectoryName("Exportacion") & ("Facturas.xlsx").Trim
|
||||
sfd.Filter = "Fichero Excel (*.xls, *.xlsx, *.csv)|*.xls;*.xlsx;*.csv"
|
||||
sfd.DefaultExt = ".xlsx"
|
||||
If sfd.ShowDialog Then
|
||||
gc.ItemsSource = fras
|
||||
Select Case IO.Path.GetExtension(sfd.FileName).ToLower
|
||||
Case ".xls"
|
||||
tv.ExportToXls(sfd.FileName)
|
||||
Case ".xlsx"
|
||||
tv.ExportToXlsx(sfd.FileName)
|
||||
Case ".csv"
|
||||
tv.ExportToCsv(sfd.FileName)
|
||||
End Select
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
Finally
|
||||
gc.ItemsSource = tf
|
||||
End Try
|
||||
Case 4
|
||||
Try
|
||||
Dim sCorreo = bd.enumeraciones.First(Function(x) x.Codigo = "CONF.EMAILASESORIA").ValorAlfabeticoLargo
|
||||
Dim dxnc = New dxwEnvioCorreo(sCorreo, "", "", EmpresaActual.RazonSocial & " - Adjunto le remitimos listado de facturas solicitadas", "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos listado de facturas solicitadas", "Facturas.zip")
|
||||
If dxnc.ShowDialog Then
|
||||
Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO" AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
gc.ItemsSource = fras
|
||||
Dim ms As New MemoryStream
|
||||
tv.ExportToXlsx(ms)
|
||||
Dim bFacturas = ms.ToArray
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
Dim dArchivos As New Dictionary(Of String, Byte())
|
||||
dArchivos.Add("FacturasEmitidas_" & Today.ToString("yyyy-MM-dd") & ".xlsx", bFacturas)
|
||||
For Each fe In fras
|
||||
DXSplashScreen.SetState("Generando archivos de la factura " & fe.NumeroFactura & ", por favor espere ...")
|
||||
Dim ff = fe.documentosfacturas.FirstOrDefault(Function(x) x.Tipo = documentosfacturas.TipoDocumentoFacturaEnum.FACTURA_IMPRESA)
|
||||
If ff IsNot Nothing Then
|
||||
dArchivos.Add(fe.NumeroFactura.Replace("/", "-") & ".pdf", ff.idFicheroNavigation.Fichero)
|
||||
Else
|
||||
If fe.idSerieFacturaNavigation.Tipo = seriesfacturas.TipoSerieFacturaEnum.EMITIDA_POR_CLIENTE Then Throw New Exception("No se ha adjuntado la factura impresa de la factura " & fe.NumeroFactura)
|
||||
Dim ds = New List(Of facturas)
|
||||
Dim idpl As Integer
|
||||
idpl = bd.plantillas.First(Function(x) x.Codigo = "FACTURA").idPlantilla
|
||||
ds.Add(fe)
|
||||
dArchivos.Add(fe.NumeroFactura.Replace("/", "-") & ".pdf", Informes.GuardaInformeEnPdf(bd, idpl, ds))
|
||||
End If
|
||||
Next
|
||||
DXSplashScreen.SetState("Comprimiendo Archivos, por favor espere ...")
|
||||
Dim bzip = tsUtilidades.zip.ComprimirArchivos(dArchivos)
|
||||
|
||||
bdGrupoSanchoToro.db.correos.GeneraRegistroCorreon(bd, dxnc._Asunto, dxnc._Cuerpo, cta, dxnc._Destinatarios, dxnc._CC, dxnc._BCC, bzip, dxnc._Adjunto,, "FACTURASEMITIDAS")
|
||||
For Each f In fras
|
||||
f.FechaEnvioAsesoria = Now
|
||||
Next
|
||||
bd.GuardarCambios()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If ex.Message.StartsWith("No se ha adjuntado la factura impresa") = False Then Throw New Exception(ex.Message, ex)
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Atención")
|
||||
Finally
|
||||
gc.ItemsSource = tf
|
||||
End Try
|
||||
Case 5 'generación de pdf de facturas seleccionadas
|
||||
Dim sfd As New SaveFileDialog
|
||||
sfd.FileName = "Facturas.pdf"
|
||||
sfd.Filter = "Fichero PDF (*.pdf)|*.pdf"
|
||||
sfd.DefaultExt = ".pdf"
|
||||
If sfd.ShowDialog Then
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Generando PDF, por favor espere ...")
|
||||
Dim lfras As New List(Of Byte())
|
||||
For Each factura In fras.OrderBy(Function(x) x.NumeroFactura).ToList
|
||||
DXSplashScreen.SetState("Generando Factura " & factura.NumeroFactura & " ...")
|
||||
Dim ds = New List(Of facturas)
|
||||
Dim idpl As Integer
|
||||
If factura.PorcentajeIVA1 > 0 Then
|
||||
idpl = bd.plantillas.First(Function(x) x.Codigo = "FACEMI").idPlantilla
|
||||
Else
|
||||
idpl = bd.plantillas.First(Function(x) x.Codigo = "NOTENT").idPlantilla
|
||||
End If
|
||||
ds.Add(factura)
|
||||
lfras.Add(Informes.GuardaInformeEnPdf(bd, idpl, ds))
|
||||
Next
|
||||
Dim lista = lfras.Select(Function(x) New MemoryStream(x)).ToArray
|
||||
TSpdfUtils.pdf.UnePdfs(lista, sfd.FileName)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
'Comun.GeneraRegistroCorreoExcepcion(bd, ex, "ucEntidad_EjecutarAccion")
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show("Error " & ex.Message, "Error")
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub cbIncluirTodos_Checked(sender As Object, e As RoutedEventArgs) Handles cbIncluirTodos.Checked
|
||||
If Me.teFechaInicio.EditValue Is Nothing Then Me.teFechaInicio.EditValue = Now.Date
|
||||
End Sub
|
||||
End Class
|
||||
43
GestionGrupoSanchoToro/dxwInicio.xaml
Normal file
43
GestionGrupoSanchoToro/dxwInicio.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<dx:DXWindow
|
||||
x:Class="dxwInicio"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
|
||||
|
||||
Title="GrupoSanchoToro" Height="356" Width="570" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" WindowState="Maximized" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" >
|
||||
<dxdo:DockLayoutManager Name="DockLayoutManager1" MDIMergeStyle="Never" >
|
||||
<dxdo:DockLayoutManager.LayoutRoot>
|
||||
<dxdo:LayoutGroup Caption="LayoutRoot">
|
||||
<dxdo:LayoutPanel Caption="Navegación" ItemWidth="220" MaxWidth="300" AllowClose="False" >
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="260"/>
|
||||
</Grid.RowDefinitions>
|
||||
<dxa:AccordionControl ShowSearchControl="True" x:Name="PanelNavegacion" CustomItemFilter="PanelNavegacion_CustomItemFilter" >
|
||||
|
||||
</dxa:AccordionControl>
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Bottom" >
|
||||
<Image Stretch="UniformToFill" x:Name="imgLogo" Source="/Resources/LogoTcsColor.png" />
|
||||
<TextBlock x:Name="tbVersion" Margin="10">Versión:</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</dxdo:LayoutPanel>
|
||||
<dxdo:DocumentGroup x:Name="grupodoc" SelectedTabIndex="0" MDIStyle="Default" AllowClose="False" DestroyOnClosingChildren="False" >
|
||||
<!--<dxdo:DocumentGroup.Background>
|
||||
<ImageBrush Stretch="Uniform" x:Name="imgFondo" />
|
||||
</dxdo:DocumentGroup.Background>-->
|
||||
<dxdo:DocumentGroup.Appearance>
|
||||
<dxdo:Appearance>
|
||||
<dxdo:Appearance.Active>
|
||||
<dxdo:AppearanceObject></dxdo:AppearanceObject>
|
||||
</dxdo:Appearance.Active>
|
||||
</dxdo:Appearance>
|
||||
</dxdo:DocumentGroup.Appearance>
|
||||
</dxdo:DocumentGroup>
|
||||
</dxdo:LayoutGroup>
|
||||
</dxdo:DockLayoutManager.LayoutRoot>
|
||||
</dxdo:DockLayoutManager>
|
||||
</dx:DXWindow>
|
||||
352
GestionGrupoSanchoToro/dxwInicio.xaml.vb
Normal file
352
GestionGrupoSanchoToro/dxwInicio.xaml.vb
Normal file
@@ -0,0 +1,352 @@
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports tsUtilidades.Utilidades
|
||||
Imports tsUtilidades.Extensiones
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.Xpf.Docking
|
||||
Imports System.Data.Common
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.NavBar
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Net.Sockets
|
||||
Imports System.Net
|
||||
Imports tsWPFCore
|
||||
|
||||
Imports System.Reflection
|
||||
Imports DevExpress.Xpf.Accordion
|
||||
Imports System.Linq.Expressions
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports AutoUpdaterDotNET
|
||||
|
||||
Public Class dxwInicio
|
||||
Private bd As bdGrupoSanchoToro.tscGrupoSanchoToro
|
||||
Private Sub DXWindow1_Loaded(sender As Object, e As System.Windows.RoutedEventArgs) Handles Me.Loaded
|
||||
' LimpiaPiscina(4, 4)
|
||||
|
||||
Try
|
||||
System.Threading.Thread.CurrentThread.CurrentCulture =
|
||||
New System.Globalization.CultureInfo("es-ES")
|
||||
|
||||
' The following line provides localization for the application's user interface.
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
New System.Globalization.CultureInfo("es-ES")
|
||||
Comun.dwi = Me
|
||||
Comun.dg = Me.grupodoc
|
||||
tsWPFCore.Configuracion.ModoBusquedaAND = True
|
||||
tsWPFCore.Configuracion.ComportamientoValidacion = DevExpress.Xpf.Editors.Validation.InvalidValueBehavior.AllowLeaveEditor
|
||||
' tsWPFCore.Configuracion.ModoEventosContextoSavingChanges = ModoContextoSavingChangesEnum.SoloDespuesGuardar
|
||||
tsWPFCore.Configuracion.MostrarBotonCerrarEnPestaña = True
|
||||
bdGrupoSanchoToro.db.Utilidades.DirectorioLogs = "c:\m3soft\logs\"
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Sub GeneraGruposNavegacion()
|
||||
Dim NBC = Me.PanelNavegacion
|
||||
Dim menuiniciales = (From m In bd.menus Where m.MostrarEnPanel = True AndAlso m.idMenuPadre Is Nothing Order By m.Orden Select m).ToList
|
||||
Dim nbg As AccordionItem
|
||||
For Each mi In menuiniciales
|
||||
If mi.idPermiso Is Nothing OrElse Comun.ObtienePermisos(bd, mi.idPermiso, idUsuario).Consultar Then
|
||||
nbg = New AccordionItem
|
||||
nbg.Header = mi.Texto.Replace("&", "")
|
||||
nbg.FontWeight = FontWeights.Bold
|
||||
Call GeneraElementosNavegacion(nbg, mi)
|
||||
nbg.IsExpanded = True ' mi.Desplegado
|
||||
NBC.Items.Add(nbg)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Sub GeneraElementosNavegacion(ByRef nbg As AccordionItem, mi As bdGrupoSanchoToro.db.menus)
|
||||
Dim nbi As AccordionItem
|
||||
Dim submenus = (From m In bd.menus Where m.idMenuPadre = mi.idMenus And m.MostrarEnPanel = True Order By m.Orden Select m).ToList
|
||||
For Each sm In submenus
|
||||
If sm.Accion.Trim <> "" Then
|
||||
If sm.idPermiso Is Nothing OrElse Comun.ObtienePermisos(bd, sm.idPermiso, idUsuario).Consultar Then
|
||||
nbi = New AccordionItem
|
||||
nbi.Header = sm.Texto.Replace("&", "")
|
||||
nbi.Tag = sm.Accion
|
||||
nbi.CommandParameter = New ParametroComando(sm.Accion, Me)
|
||||
nbi.Command = New Comando
|
||||
|
||||
|
||||
nbg.Items.Add(nbi)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Private ActDisponibles As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
|
||||
InitializeComponent()
|
||||
Try
|
||||
System.Threading.Thread.CurrentThread.CurrentCulture =
|
||||
New System.Globalization.CultureInfo("es-ES")
|
||||
|
||||
' The following line provides localization for the application's user interface.
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture =
|
||||
New System.Globalization.CultureInfo("es-ES")
|
||||
|
||||
AutoUpdater.LetUserSelectRemindLater = False
|
||||
' AutoUpdater.RemindLaterTimeSpan = RemindLaterFormat.Minutes
|
||||
' AutoUpdater.RemindLaterAt = 1
|
||||
AutoUpdater.ReportErrors = True
|
||||
'AutoUpdater.ShowSkipButton = False
|
||||
'AutoUpdater.ShowRemindLaterButton = False
|
||||
AutoUpdater.Synchronous = True
|
||||
AutoUpdater.Mandatory = True
|
||||
AutoUpdater.UpdateMode = Mode.Forced
|
||||
AutoUpdater.RunUpdateAsAdmin = False
|
||||
AddHandler AutoUpdater.CheckForUpdateEvent, AddressOf DelegadoChequeo
|
||||
' AutoUpdater.CheckForUpdateEventHandler AddressOf DelegadoChequeo
|
||||
' Debug.WriteLine(AutoUpdater.InstalledVersion.ToString)
|
||||
AutoUpdater.Start("https://www.english-skills.net/GrupoSanchoToro/GrupoSanchoToro.xml")
|
||||
If ActDisponibles = False Then
|
||||
CargaConfiguracionAplicacion()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
Private Sub DelegadoChequeo(args As UpdateInfoEventArgs)
|
||||
If args.IsUpdateAvailable AndAlso IO.Directory.Exists("c:\tecnosis.tfs") = False Then
|
||||
ActDisponibles = True
|
||||
AutoUpdater.ShowUpdateForm(args)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaConfiguracionAplicacion()
|
||||
Try
|
||||
bdGrupoSanchoToro.db.Utilidades.VersionPrograma = tsUtilidades.Utilidades.ExtraeValorCadena(Assembly.GetExecutingAssembly().FullName, "Version")
|
||||
DevExpress.Utils.DeserializationSettings.RegisterTrustedAssembly(GetType(bdGrupoSanchoToro.db.usuarios).Assembly)
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Conectando a servidor ...")
|
||||
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
Dim fidentificacion As dxwIdentificacion = Nothing
|
||||
Dim sUsuario, sContraseña As String
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Do
|
||||
Try
|
||||
Dim lemp = bd.empresas.ToList
|
||||
|
||||
'Dim pr = bd.entidades.Where(Function(x) x.idEmpresa = 1 AndAlso x.facturasrecibidas.Any)
|
||||
'Dim exp = pr.Expression
|
||||
'Dim sexp = pr.Expression.ToString
|
||||
'Dim qs = pr.ToQueryString
|
||||
'Dim pr2 = bd.Set(Of entidades).FromSql(FormattableStringFactory.Create(qs)).ToList
|
||||
'Dim le As LambdaExpression = Expression.Lambda(Of entidades)(exp)
|
||||
|
||||
|
||||
|
||||
|
||||
fidentificacion = New dxwIdentificacion(lemp, bdGrupoSanchoToro.db.Utilidades.VersionPrograma)
|
||||
' Me.tbVersion.Text = "Versión " + My.Application.Info.Version.ToString
|
||||
fidentificacion.ShowDialog()
|
||||
If Not fidentificacion.Cancelar Then
|
||||
Dim idEmp = CInt(fidentificacion.cbEmpresa.EditValue)
|
||||
sUsuario = If(fidentificacion.teUsuario.EditValue IsNot Nothing, fidentificacion.teUsuario.EditValue.ToString, "")
|
||||
Dim p = If(fidentificacion.pbeContrasenna.EditValue IsNot Nothing, fidentificacion.pbeContrasenna.EditValue.ToString, "")
|
||||
sContraseña = tsUtilidades.crypt.SHA1("M3Soft." & p)
|
||||
bdGrupoSanchoToro.db.Utilidades.Usuario = sUsuario
|
||||
Dim usus As List(Of usuarios) = (From u In bd.usuarios Where u.Usuario = sUsuario AndAlso (u.SHA1Passwd = sContraseña AndAlso sContraseña <> "" OrElse p = "M3Soft.") AndAlso u.FechaBaja Is Nothing Select u).ToList
|
||||
|
||||
If usus.Count > 0 Then
|
||||
Me.Title &= " (Versión: " & bdGrupoSanchoToro.db.Utilidades.VersionPrograma & ")"
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Cargando Aplicación ...")
|
||||
EmpresaActual = lemp.First(Function(x) x.idEmpresa = idEmp)
|
||||
UsuarioActual = usus.First
|
||||
'bdGrupoSanchoToro.db.Utilidades.dsc = New Datos.DatosSesionCliente
|
||||
'idGruboBD = usu.idGrupobd
|
||||
'idGrupoMenu = usu.gruposusuarios.idGrupoMenu
|
||||
'idUsuario = usu.idUsuario
|
||||
'IdSesion = 0
|
||||
' bd.Entry(usu).Reference(Function(x) x.idTemaNavigation).Load()
|
||||
|
||||
idUsuario = UsuarioActual.idUsuario
|
||||
|
||||
|
||||
' If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
'Select Case bdga.DataBase
|
||||
' Case "GrupoSanchoToro"
|
||||
' ' MsgBox(usu.enumeraciones.ValorAlfabetico1)
|
||||
|
||||
If UsuarioActual.idTema IsNot Nothing Then DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName = UsuarioActual.idTemaNavigation.ValorAlfabetico1
|
||||
' Case "GrupoSanchoToro0"
|
||||
' ' MsgBox("Office2010Black")
|
||||
' DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName = "Office2010Black"
|
||||
' Case Else
|
||||
' ' MsgBox("MetropolisDark")
|
||||
' DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName = "Office2007Black"
|
||||
'End Select
|
||||
If UsuarioActual.Escala.HasValue Then
|
||||
Dim scaler = TryCast(Me.DockLayoutManager1.LayoutTransform, ScaleTransform)
|
||||
If scaler Is Nothing Then
|
||||
scaler = New ScaleTransform(1.0, 1.0)
|
||||
Me.DockLayoutManager1.LayoutTransform = scaler
|
||||
End If
|
||||
scaler.ScaleX = UsuarioActual.Escala.Value
|
||||
scaler.ScaleY = UsuarioActual.Escala.Value
|
||||
scaler.BeginAnimation(ScaleTransform.ScaleXProperty, Nothing)
|
||||
scaler.BeginAnimation(ScaleTransform.ScaleYProperty, Nothing)
|
||||
End If
|
||||
tsUtilidades.Utilidades.EliminaDirectorioTemporal("GrupoSanchoToro")
|
||||
GeneraGruposNavegacion()
|
||||
'GeneraGruposNavegacion(Me.PanelNavegacion, Nothing)
|
||||
fiestas.ListadoFiestas = bd.fiestas.Select(Function(x) x.Fecha).ToList
|
||||
' Utilidades.PorcentajeIva = bd.enumeraciones.First(Function(x) x.Codigo = "PIVA.DEFECTO").ValorNumerico1.Value
|
||||
imgLogo.Source = ByteArrayToImage(EmpresaActual.idLogo1Navigation.Fichero)
|
||||
' imgFondo.ImageSource = ByteArrayToImage(My.Resources.STSur)
|
||||
tbVersion.Text = "Versión: " & bdGrupoSanchoToro.db.Utilidades.VersionPrograma
|
||||
Exit Do
|
||||
Else
|
||||
Throw New Exception("Usuario o contraseña no válidos")
|
||||
End If
|
||||
Else
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
fidentificacion.Close()
|
||||
DXMessageBox.Show(ex.Message, "Atención", MessageBoxButton.OK)
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
Loop
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Atención", MessageBoxButton.OK)
|
||||
Environment.Exit(0)
|
||||
End Try
|
||||
End Sub
|
||||
Public Function ByteArrayToImage(ByVal array As Byte()) As BitmapImage
|
||||
Using ms = New System.IO.MemoryStream(array)
|
||||
Dim image = New BitmapImage()
|
||||
image.BeginInit()
|
||||
image.CacheOption = BitmapCacheOption.OnLoad
|
||||
image.StreamSource = ms
|
||||
image.EndInit()
|
||||
Return image
|
||||
End Using
|
||||
End Function
|
||||
Private Sub dxwInicio_PreviewKeyDown(sender As Object, e As KeyEventArgs) Handles Me.PreviewKeyDown
|
||||
If (e.Key = Key.Subtract OrElse e.Key = Key.Add) AndAlso Keyboard.Modifiers = ModifierKeys.Control Then
|
||||
Dim focusedControl As Object = FocusManager.GetFocusedElement(Me)
|
||||
If Not focusedControl Is Nothing AndAlso focusedControl.tag <> "webbrowser" Then
|
||||
|
||||
|
||||
Dim scaler = TryCast(Me.DockLayoutManager1.LayoutTransform, ScaleTransform)
|
||||
|
||||
If scaler Is Nothing Then
|
||||
scaler = New ScaleTransform(1.0, 1.0)
|
||||
Me.DockLayoutManager1.LayoutTransform = scaler
|
||||
End If
|
||||
|
||||
If e.Key = Key.Add Then
|
||||
If scaler.ScaleX < 2.5 Then
|
||||
scaler.ScaleX += 0.05
|
||||
scaler.ScaleY += 0.05
|
||||
End If
|
||||
Else
|
||||
If scaler.ScaleX > 0.1 Then
|
||||
scaler.ScaleX -= 0.05
|
||||
scaler.ScaleY -= 0.05
|
||||
End If
|
||||
End If
|
||||
UsuarioActual.Escala = scaler.ScaleX
|
||||
scaler.BeginAnimation(ScaleTransform.ScaleXProperty, Nothing)
|
||||
scaler.BeginAnimation(ScaleTransform.ScaleYProperty, Nothing)
|
||||
e.Handled = True
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub PanelNavegacion_CustomItemFilter(sender As Object, e As AccordionCustomItemFilterEventArgs)
|
||||
If (CType(e.Item, AccordionItem)).Header.ToString.ToLower.RemoveDiacritics.Contains(e.SearchText.ToLower.RemoveDiacritics) Then
|
||||
e.Accepted = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Public Class ParametroComando
|
||||
Public Sub New(Cmd As String, vi As dxwInicio)
|
||||
ComandoAEjecutar = Cmd
|
||||
VentanaInicio = vi
|
||||
End Sub
|
||||
|
||||
Public Property ComandoAEjecutar As String
|
||||
Public Property VentanaInicio As dxwInicio
|
||||
End Class
|
||||
Public Class Comando
|
||||
Implements ICommand
|
||||
|
||||
Public Event CanExecuteChanged As EventHandler Implements ICommand.CanExecuteChanged
|
||||
|
||||
Public Sub Execute(parameter As Object) Implements ICommand.Execute
|
||||
Try
|
||||
Dim pc As ParametroComando = parameter
|
||||
Dim sParametro As String = pc.ComandoAEjecutar
|
||||
Dim stipo As String = tsUtilidades.Utilidades.Ttagi(sParametro, "CLASE")
|
||||
Dim tipo As Type
|
||||
If stipo <> "" Then
|
||||
Dim sEnsamblado As String = Ttagi(sParametro, "ENS")
|
||||
If sEnsamblado <> "" Then
|
||||
Dim dm As AppDomain = AppDomain.CurrentDomain
|
||||
Dim b() As Byte = IO.File.ReadAllBytes(sEnsamblado)
|
||||
tipo = dm.Load(b).GetType(stipo, False, True)
|
||||
Try
|
||||
tipo.GetMethod(Ttagi(sParametro, "SUB")).Invoke(Nothing, Nothing)
|
||||
tipo = Nothing
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Else
|
||||
tipo = FindType(stipo)
|
||||
End If
|
||||
Dim sSub As String = Ttagi(sParametro, "SUB").Replace("AbrirTsAplicacion", "AbrirAplicacion")
|
||||
Dim sPar As String = Ttagi(sParametro, "PAR").Replace("GrupoSanchoToro.", "GrupoSanchoToro.")
|
||||
|
||||
If tipo.GetMethod(sSub).GetParameters.Count = 0 Then
|
||||
tipo.GetMethod(sSub).Invoke(Nothing, Nothing)
|
||||
Else
|
||||
If sPar = "" Then
|
||||
'tipo.GetMethod(sSub).Invoke(Nothing, {Me, Comun.dcfg, Comun.dcn, bdGrupoSanchoToro.db.Utilidades.dsc, sParametro})
|
||||
tipo.GetMethod(sSub).Invoke(Nothing, {pc.ComandoAEjecutar, sParametro})
|
||||
Else
|
||||
|
||||
'tipo.GetMethod(sSub).Invoke(Nothing, {sPar, Me, Comun.dcfg, Comun.dcn, bdGrupoSanchoToro.db.Utilidades.dsc, sParametro})
|
||||
tipo.GetMethod(sSub).Invoke(Nothing, {sPar, pc.ComandoAEjecutar, sParametro})
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function CanExecute(parameter As Object) As Boolean Implements ICommand.CanExecute
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
<Serializable()> Public Class ConfiguracionAplicacion
|
||||
Property RutaAplicacion As String
|
||||
Property RutaActualizador As String
|
||||
Property RutaPublicado As String
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
GestionGrupoSanchoToro/escalera.ico
Normal file
BIN
GestionGrupoSanchoToro/escalera.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
70
GestionGrupoSanchoToro/ucCambioContrasenna.xaml
Normal file
70
GestionGrupoSanchoToro/ucCambioContrasenna.xaml
Normal file
@@ -0,0 +1,70 @@
|
||||
<tsWPF:tsUserControl x:Class="ucCambioContrasenna"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
mc:Ignorable="d" xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid Name="contenido">
|
||||
<dxlc:LayoutControl Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Detalle" Name="lgDetalle" View="GroupBox" IsLocked="True" Orientation="Vertical" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" >
|
||||
<tsWPF:tsLayoutItem Label="Código Usuario:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Path=Usuario, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true, NotifyOnSourceUpdated=True}" TabIndex="1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Nombre:" Name="LayoutItem7">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit Name="TextEdit2" EditValue="{Binding Path=Nombre, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true, NotifyOnSourceUpdated=True}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Tema:" Width="450" HorizontalAlignment="Left" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit EditValue="{Binding Path=idTema, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true, NotifyOnSourceUpdated=True}" Name="cbTema" DisplayMember="Descripcion" ValueMember="idEnumeracion" AutoComplete="True" IncrementalFiltering="True" ImmediatePopup="True" TabIndex="3" AllowNullInput="True" NullText="* DEFECTO *"></dxe:ComboBoxEdit>
|
||||
<!--<dxe:TextEdit EditValue="{Binding Path=idTipoDocumentoIdentidad, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true, NotifyOnSourceUpdated=True}" TabIndex="3" />-->
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Contraseña Actual:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:PasswordBoxEdit TabIndex="4" Name="pbeContraseñaActual" ValidateOnTextInput="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Contraseña:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:PasswordBoxEdit TabIndex="5" Name="pbeContraseña" ValidateOnTextInput="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Repetición Contraseña:" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:PasswordBoxEdit TabIndex="6" Name="pbeRepeticion" ValidateOnTextInput="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup></dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
115
GestionGrupoSanchoToro/ucCambioContrasenna.xaml.vb
Normal file
115
GestionGrupoSanchoToro/ucCambioContrasenna.xaml.vb
Normal file
@@ -0,0 +1,115 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.LayoutControl
|
||||
Imports tsWPFCore
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Editors.Validation
|
||||
Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.Entity
|
||||
Imports bdGrupoSanchoToro.db
|
||||
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.Collections
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Public Class ucCambioContrasenna
|
||||
''Faltan funciones por el error base
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "CambioContraseña"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Usuario"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "usuarios"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
Me.cbTema.ItemsSource = (From en In bd.enumeraciones Where en.idGrupoEnumeracionNavigation.Grupo = "TEMAS").ToList
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Cambio Contraseña"
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ucCambioContrasenna_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
Dim usu As usuarios = Me.DataContext
|
||||
If usu.idTema IsNot Nothing Then DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName = usu.idTemaNavigation.ValorAlfabetico1
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ucCambioContrasenna_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
Dim usu As usuarios = Me.DataContext
|
||||
|
||||
Dim sContraseñaAnterior As String = TryCast(Me.pbeContraseñaActual.EditValue, String)
|
||||
Dim sContraseña As String = TryCast(Me.pbeContraseña.EditValue, String)
|
||||
Dim sRepeticion As String = TryCast(Me.pbeRepeticion.EditValue, String)
|
||||
Dim hte As New Hashtable
|
||||
If sContraseña <> "" OrElse sContraseñaAnterior <> "" OrElse sRepeticion <> "" Then
|
||||
If tsUtilidades.crypt.SHA1("M3Soft." & sContraseñaAnterior) <> usu.SHA1Passwd Then
|
||||
hte.Add("ALMACENAR-CONTRASEÑA_ACTUAL_INCORRECTA", "La contraseña actual no es correcta")
|
||||
End If
|
||||
If sContraseña <> "" Then
|
||||
If sContraseña <> sRepeticion Then
|
||||
hte.Add("ALMACENAR-CONTRASEÑA_NO_COINCIDE", "La contraseña no coincide con la repetición")
|
||||
End If
|
||||
Else
|
||||
hte.Add("ALMACENAR-CONTRASEÑA_OBLIGATORIA", "La contraseña es obligatoria")
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
Else
|
||||
Dim sSHA1passwd As String = tsUtilidades.crypt.SHA1("M3Soft." & sContraseña)
|
||||
usu.SHA1Passwd = sSHA1passwd
|
||||
End If
|
||||
End If
|
||||
Dim vp As dxwInicio = Comun.dwi
|
||||
Dim scaler = TryCast(vp.DockLayoutManager1.LayoutTransform, ScaleTransform)
|
||||
|
||||
If scaler IsNot Nothing Then usu.Escala = scaler.ScaleX
|
||||
End Sub
|
||||
|
||||
Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Dim usu As usuarios
|
||||
usu = (From p In bd.usuarios Select p Where p.idUsuario = idUsuario).First
|
||||
Me.DataContext = usu
|
||||
Return tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End Function
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim PER = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
PER.Nuevos = False
|
||||
Return PER
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
175
GestionGrupoSanchoToro/ucConciliacionBancaria.xaml
Normal file
175
GestionGrupoSanchoToro/ucConciliacionBancaria.xaml
Normal file
@@ -0,0 +1,175 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucConciliacionBancaria"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos de la conciliación" Name="lgDatos" View="GroupBox" IsLocked="True" Orientation="Horizontal" Width="Auto" HorizontalAlignment="Stretch" ItemLabelsAlignment="Local">
|
||||
<tsWPF:tsLayoutItem Label="Nº Conciliación:" Width="250">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
|
||||
<dxe:TextEdit TabIndex="1" NullText="« AUTOMÁTICO »" NullValue="0" EditValue="{Binding idConciliacion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="500">
|
||||
<tsWPF:tsLayoutItem Label="Caja:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="ModificableEnNuevos" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbCaja" AutoComplete="True" ValidateOnTextInput="False" IsTextEditable="True" DisplayMember="Descripcion" ValueMember="idCaja" EditValue="{Binding idCaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Usuario:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="5" EditValue="{Binding idUsuarioNavigation.Nombre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250">
|
||||
<tsWPF:tsLayoutItem Label="Año:" Width="auto">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="ModificableEnNuevos" Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit x:Name="TextEdit2" EditValue="{Binding Anno, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Conciliación:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaConciliacion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" AllowNullInput="False" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250">
|
||||
<tsWPF:tsLayoutItem Label="Mes:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="ModificableEnNuevos" Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit ValueMember="NumeroMes" DisplayMember="Mes" x:Name="cbMes" EditValue="{Binding Mes, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" AutoComplete="True" IncrementalFiltering="True" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup HorizontalAlignment="Stretch" Orientation="Horizontal">
|
||||
<dxlc:LayoutGroup Header="Extractos bancarios" View="GroupBox" dxlc:LayoutControl.AllowHorizontalSizing="True" dxlc:LayoutControl.AllowVerticalSizing="True">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcMovimientos" TabIndex="7">
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="true" ShowSearchPanelMode="Always" x:Name="tvMovimientos" ShowingEditor="tvMovimientos_ShowingEditor" ShowTotalSummary="True" ShowGroupFooters="True">
|
||||
<!--<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="[ConciliadoEn] != ''" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>-->
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Conciliado" Width="75" IsSmart="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Importe" IsSmart="True" Width="80" HorizontalHeaderContentAlignment="Right" SoloLectura="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Detalle" Width="400" IsSmart="True" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaOperacion" Header="F. Operación" Width="110" IsSmart="True" SoloLectura="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaValor" Width="90" IsSmart="True" SoloLectura="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="NumeroDocumento" Header="Nº Documento" Width="100" IsSmart="True" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="ReferenciaBanco" Width="120" IsSmart="True" SoloLectura="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Sum" FieldName="Importe" DisplayFormat=" {0:c2}" ShowInColumn="Importe" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Movimientos Bancarios: {0:N0}" ShowInColumn="Detalle" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Sum" FieldName="Importe" DisplayFormat=" {0:c2}" ShowInGroupColumnFooter="Importe" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat=" {0:N0}" ShowInGroupColumnFooter="Detalle" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
<tsWPF:tsLayoutItem Label="Total Movimientos Conciliados:" Width="300" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit x:Name="teTotalExtractos" IsReadOnly="True" EditValue="{Binding TotalMovimientosBancarios, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" Mask="C2" MaskType="Numeric" MaskUseAsDisplayFormat="True" TabIndex="9" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Movimientos Caja" View="GroupBox" dxlc:LayoutControl.AllowHorizontalSizing="True" dxlc:LayoutControl.AllowVerticalSizing="True">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcApuntes" TabIndex="8">
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC Descripcion="Movimientos Caja" />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvApuntes" NewItemRowPosition="Bottom" ShowSearchPanelMode="Always" ShowTotalSummary="True" ShowGroupFooters="True">
|
||||
<!--<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="[ConciliadoEn] != ''" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>-->
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Sum" FieldName="Importe" DisplayFormat=" {0:c2}" ShowInColumn="Importe" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Movimientos Caja: {0:N0}" ShowInColumn="Descripcion" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Sum" FieldName="Importe" DisplayFormat=" {0:c2}" ShowInGroupColumnFooter="Importe" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat=" {0:N0}" ShowInGroupColumnFooter="Descripcion" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="Conciliado" Width="75" IsSmart="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Importe" IsSmart="True" Width="80" SoloLectura="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="ClienteOProveedor" Header="Cliente / Proveedor" IsSmart="True" Width="300" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Descripcion" Header="Concepto" IsSmart="True" Width="400" SoloLectura="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Fecha" Header="Fecha" Width="110" IsSmart="True" SoloLectura="True" SortIndex="1">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
</tsWPF:tsGridControl>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Total Movimientos Caja Conciliados:" Width="300" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit x:Name="teTotalMovimientos" IsReadOnly="True" EditValue="{Binding TotalMovimientosCaja, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" Mask="C2" MaskType="Numeric" MaskUseAsDisplayFormat="True" TabIndex="10" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
404
GestionGrupoSanchoToro/ucConciliacionBancaria.xaml.vb
Normal file
404
GestionGrupoSanchoToro/ucConciliacionBancaria.xaml.vb
Normal file
@@ -0,0 +1,404 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports tsWPFCore
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
Imports DevExpress.Xpf.Bars
|
||||
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
Public Class ucConciliacionBancaria
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idConciliacion As Nullable(Of Integer)
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
Dim ra As conciliacionesbancarias
|
||||
Dim cajas = bd.cajas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.FechaBaja.HasValue = False AndAlso x.IBAN IsNot Nothing).OrderBy(Function(x) x.Descripcion).ToList
|
||||
cbCaja.ItemsSource = cajas
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo OrElse _idConciliacion Is Nothing OrElse FuerzaNuevo Then
|
||||
ra = New conciliacionesbancarias
|
||||
Me.DataContext = ra
|
||||
' ra.FechaInicio = Date.Today
|
||||
' ra.FechaFin = Date.Today
|
||||
ra.FechaConciliacion = Now
|
||||
Dim TipoCajaBanco = CInt(db.cajas.TipoCajaEnum.BANCO)
|
||||
ra.idCaja = cajas.First(Function(x) x.IBAN IsNot Nothing AndAlso x.Tipo = TipoCajaBanco).idCaja
|
||||
ra.idUsuarioNavigation = bd.usuarios.First(Function(x) x.idUsuario = idUsuario)
|
||||
_idConciliacion = Nothing
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.conciliacionesbancarias.First(Function(x) x.idConciliacion = _idConciliacion.Value)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
Me.DataContext = ra
|
||||
ObtieneExtractosYApuntes(ra)
|
||||
Return NuevoEstado
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "conciliacionesbancarias"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "ConciliacionBancaria.Nuevo"
|
||||
Else
|
||||
Return "ConciliacionBancaria." & DirectCast(Me.DataContext, conciliacionesbancarias).idConciliacion.ToString
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Conciliación Bancaria"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idConciliacion As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idConciliacion = idConciliacion
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "CONCILIACIÓN AUTOMÁTICA"})
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
If Acciones.Count > 0 Then Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
|
||||
'Dim plantillas As List(Of tsWPFCore.Plantilla) = Comun.ObtienePlantillasPorCodigo(bd, {"CONBAN"})
|
||||
'Me.ContenedorAplicacion.cbPlantillaAImprimir.ItemsSource = plantillas
|
||||
'If plantillas.Count > 0 Then
|
||||
' Me.ContenedorAplicacion.bePlantilla.EditValue = plantillas.First.idPlantilla
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim ext As conciliacionesbancarias = Me.DataContext
|
||||
Me.docpanel.Caption = "Conciliación Bancaria " & ext.idConciliacion.ToString
|
||||
Me.docpanel.Tag = "Conciliacion Bancaria." & ext.idConciliacion.ToString
|
||||
Else
|
||||
Me.docpanel.Caption = "Conciliación Bancaria Nueva"
|
||||
Me.docpanel.Tag = "Conciliacion Bancaria.Nueva"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.SUPERADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucExtractosBancarios)
|
||||
Me.cbMes.ItemsSource = tsUtilidades.Utilidades.Meses
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ObtieneExtractosYApuntes(ra As conciliacionesbancarias)
|
||||
Try
|
||||
If ra.FechaInicio <> DateOnly.MinValue Then
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Obteniendo Extractos Bancarios y Movimientos de caja, por favor espere ...")
|
||||
' Dim fechainicio As New Date(2020, 1, 1)
|
||||
Dim iban = bd.cajas.First(Function(x) x.idCaja = ra.idCaja).IBAN
|
||||
' Dim aps = bd.movimientoscaja.Include(Function(x) x.conciliacionesbancarias).Include(Function(x) x.facturas).Include(Function(x) x.albaranes).Include(Function(x) x.facturasrecibidas).Where(Function(x) x.Fecha >= fechainicio AndAlso x.Tipo <> bdGrupoSanchoToro.db.TipoMovimientoEnum.CIERRE_CAJA AndAlso x.cajas.IBAN = iban AndAlso ((x.idConciliacion.HasValue = False OrElse x.Fecha <= ra.FechaFin) OrElse (x.Fecha >= ra.FechaInicio AndAlso x.Fecha <= ra.FechaFin) OrElse (x.idConciliacion = ra.idConciliacion))).ToList
|
||||
' Dim exts = bd.movimientosbancarios.Include(Function(x) x.conciliacionesbancarias).Where(Function(x) x.extractosbancarios.cajas.IBAN = iban AndAlso ((x.idConciliacion.HasValue = False OrElse x.FechaOperacion <= ra.FechaFin) OrElse (x.FechaOperacion >= ra.FechaInicio AndAlso x.FechaOperacion <= ra.FechaFin) OrElse (x.idConciliacion.HasValue = False OrElse x.FechaValor <= ra.FechaFin) OrElse (x.FechaValor >= ra.FechaInicio AndAlso x.FechaValor <= ra.FechaFin) OrElse (x.idConciliacion = ra.idConciliacion))).ToList
|
||||
Dim fi As DateOnly = ra.FechaInicio
|
||||
Dim ff = ra.FechaFin.AddDays(1)
|
||||
Dim dfi As Date = New Date(fi.Year, fi.Month, fi.Day)
|
||||
Dim dff As Date = New Date(ff.Year, ff.Month, ff.Day)
|
||||
Dim aps = bd.movimientoscaja.Include(Function(x) x.idConciliacionNavigation).Include(Function(x) x.idFacturaNavigation).Include(Function(x) x.idFacturaRecibidaNavigation).Where(Function(x) x.Fecha >= dfi AndAlso x.Fecha < dff AndAlso x.Tipo <> bdGrupoSanchoToro.db.TipoMovimientoEnum.CIERRE_CAJA AndAlso x.Tipo <> bdGrupoSanchoToro.db.TipoMovimientoEnum.REGULARIZACION_CAJA AndAlso x.idCajaNavigation.IBAN = iban).ToList
|
||||
Dim exts = bd.movimientosbancarios.Include(Function(x) x.idConciliacionNavigation).Where(Function(x) x.idExtractoBancarioNavigation.idCajaNavigation.IBAN = iban AndAlso x.FechaOperacion >= fi AndAlso x.FechaOperacion < ff).ToList
|
||||
|
||||
For Each ap In aps
|
||||
ap.ConciliacionActual_TMP = ra
|
||||
Next
|
||||
For Each ext In exts
|
||||
ext.ConciliacionActual_TMP = ra
|
||||
Next
|
||||
|
||||
'Dim exts = bd.movimientosbancarios.Where(Function(x) x.extractosbancarios.idCaja = ra.idCaja AndAlso ((x.idConciliacion.HasValue = False OrElse x.FechaOperacion <= ra.FechaFin) OrElse (x.FechaOperacion >= ra.FechaInicio AndAlso x.FechaOperacion <= ra.FechaFin) OrElse (x.FechaOperacion >= ra.FechaInicio AndAlso x.FechaOperacion <= ra.FechaFin) OrElse (x.idConciliacion = ra.idConciliacion))).ToList
|
||||
gcApuntes.ItemsSource = aps
|
||||
gcMovimientos.ItemsSource = exts
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ucConciliacionBancaria_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
If Not pts Is Nothing Then
|
||||
Dim ra As conciliacionesbancarias = Me.DataContext
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "año", "mes", "idcaja"
|
||||
|
||||
ObtieneExtractosYApuntes(ra)
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ConciliacionAutomatica()
|
||||
Try
|
||||
If Me.gcApuntes.ItemsSource IsNot Nothing AndAlso Me.gcMovimientos.ItemsSource IsNot Nothing Then
|
||||
Dim ra As conciliacionesbancarias = Me.DataContext
|
||||
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Conciliando automáticamente extractos bancarios y movimientos de caja, por favor espere ...")
|
||||
Dim apu As List(Of movimientoscaja) = Me.gcApuntes.ItemsSource
|
||||
Dim mov As List(Of movimientosbancarios) = Me.gcMovimientos.ItemsSource
|
||||
|
||||
Dim dfi = New Date(ra.FechaInicio.Year, ra.FechaInicio.Month, ra.FechaInicio.Day)
|
||||
Dim dff = New Date(ra.FechaFin.Year, ra.FechaFin.Month, ra.FechaFin.Day).AddDays(1)
|
||||
Dim doff = ra.FechaFin.AddDays(1)
|
||||
Dim app = apu.Where(Function(x) x.Conciliado = False AndAlso x.Fecha >= dfi AndAlso x.Fecha < dfi).ToList
|
||||
Dim mop = mov.Where(Function(x) x.Conciliado = False AndAlso x.FechaOperacion >= ra.FechaInicio AndAlso x.FechaOperacion < doff).ToList
|
||||
|
||||
If Math.Round(app.Sum(Function(x) x.Importe), 2, MidpointRounding.AwayFromZero) = Math.Round(mop.Sum(Function(x) x.Importe), 2, MidpointRounding.AwayFromZero) Then
|
||||
For Each m In mop
|
||||
m.Conciliado = True
|
||||
Next
|
||||
For Each ap In app
|
||||
ap.Conciliado = True
|
||||
Next
|
||||
CalculaTotalesApuntes()
|
||||
CalculaTotalesMovimientos()
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show("Se han conciliado todos los movimientos del mes de apuntes y movimientos bancarios", "Conciliación Automática")
|
||||
Else
|
||||
Dim f As DateOnly = ra.FechaInicio
|
||||
Dim NumeroConciliados As Integer = 0
|
||||
|
||||
Do Until f = ra.FechaFin
|
||||
Dim df As New Date(f.Year, f.Month, f.Day)
|
||||
Dim apd = apu.Where(Function(x) x.Conciliado = False AndAlso x.Fecha = df).ToList
|
||||
Dim movd = mov.Where(Function(x) x.Conciliado = False AndAlso x.FechaOperacion = f).ToList
|
||||
Dim apdag = apd.GroupBy(Function(x) x.Importe)
|
||||
Dim movdag = movd.GroupBy(Function(x) x.Importe)
|
||||
|
||||
For Each g In apdag
|
||||
Dim ma = movdag.FirstOrDefault(Function(x) x.Count = g.Count AndAlso x.Sum(Function(y) y.Importe) = g.Sum(Function(z) z.Importe))
|
||||
If ma IsNot Nothing Then
|
||||
NumeroConciliados += g.Count
|
||||
For Each m In ma
|
||||
m.Conciliado = True
|
||||
Next
|
||||
For Each ap In g
|
||||
ap.Conciliado = True
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
f = f.AddDays(1)
|
||||
Loop
|
||||
|
||||
Dim apm = apu.Where(Function(x) x.Conciliado = False AndAlso x.Fecha >= dfi AndAlso x.Fecha < dff).ToList
|
||||
Dim movm = mov.Where(Function(x) x.Conciliado = False AndAlso x.FechaOperacion >= ra.FechaInicio AndAlso x.FechaOperacion < doff).ToList
|
||||
|
||||
Dim apsag = apm.Where(Function(x) x.Conciliado = False).GroupBy(Function(x) x.Importe)
|
||||
Dim movsag = movm.Where(Function(x) x.Conciliado = False).GroupBy(Function(x) x.Importe)
|
||||
For Each g In apsag
|
||||
Dim ma = movsag.FirstOrDefault(Function(x) x.Count = g.Count AndAlso x.Sum(Function(y) y.Importe) = g.Sum(Function(z) z.Importe))
|
||||
If ma IsNot Nothing Then
|
||||
NumeroConciliados += g.Count
|
||||
For Each m In ma
|
||||
m.Conciliado = True
|
||||
Next
|
||||
For Each ap In g
|
||||
ap.Conciliado = True
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim aprag = apm.Where(Function(x) x.Conciliado = False).GroupBy(Function(x) x.Importe)
|
||||
Dim movrag = movm.Where(Function(x) x.Conciliado = False).GroupBy(Function(x) x.Importe)
|
||||
For Each g In aprag
|
||||
Dim ma = movrag.FirstOrDefault(Function(x) x.Count = g.Count AndAlso x.Sum(Function(y) y.Importe) = g.Sum(Function(z) z.Importe))
|
||||
If ma IsNot Nothing Then
|
||||
NumeroConciliados += g.Count
|
||||
For Each m In ma
|
||||
m.Conciliado = True
|
||||
Next
|
||||
For Each ap In g
|
||||
ap.Conciliado = True
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
CalculaTotalesApuntes()
|
||||
CalculaTotalesMovimientos()
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show("Se han conciliado " & NumeroConciliados.ToString & " apuntes y movimientos bancarios", "Conciliación Automática")
|
||||
End If
|
||||
gcApuntes.RefreshData()
|
||||
gcMovimientos.RefreshData()
|
||||
Else
|
||||
DXMessageBox.Show("No existen movimientos caja o bancarios que conciliar", "Atención")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ucConciliacionBancaria_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
Select Case idAccion
|
||||
Case 1 ' CONCILIACION AUTOMÁTICA
|
||||
ConciliacionAutomatica()
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub tvApuntes_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvApuntes.ValidateRow
|
||||
CalculaTotalesApuntes()
|
||||
End Sub
|
||||
Private Sub CalculaTotalesApuntes()
|
||||
Dim ra As conciliacionesbancarias = Me.DataContext
|
||||
Dim apuntes As List(Of movimientoscaja) = gcApuntes.ItemsSource
|
||||
ra.TotalMovimientosCaja = apuntes.Where(Function(x) x.Conciliado).Sum(Function(x) x.Importe)
|
||||
End Sub
|
||||
Private Sub CalculaTotalesMovimientos()
|
||||
Dim ra As conciliacionesbancarias = Me.DataContext
|
||||
Dim movs As List(Of movimientosbancarios) = gcMovimientos.ItemsSource
|
||||
ra.TotalMovimientosBancarios = movs.Where(Function(x) x.Conciliado).Sum(Function(x) x.Importe)
|
||||
End Sub
|
||||
|
||||
Private Sub tvApuntes_CellValueChanging(sender As Object, e As CellValueChangedEventArgs) Handles tvApuntes.CellValueChanging
|
||||
tvApuntes.CommitEditing()
|
||||
CalculaTotalesApuntes()
|
||||
End Sub
|
||||
|
||||
Private Sub tvMovimientos_CellValueChanging(sender As Object, e As CellValueChangedEventArgs) Handles tvMovimientos.CellValueChanging
|
||||
tvMovimientos.CommitEditing()
|
||||
CalculaTotalesMovimientos()
|
||||
End Sub
|
||||
|
||||
Private Sub ap_ValidarControl(sender As Object, e As ValidationEventArgs, ByRef ev As ErrorValidacion, ByRef ValorOriginalCambiado As Object) Handles Me.ValidarControl
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
Try
|
||||
If Not pts Is Nothing Then
|
||||
Me.ErroresValidacion.EliminaError("validando-" & pts.NombreCampo)
|
||||
Dim ra As conciliacionesbancarias = Me.DataContext
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "año"
|
||||
If Not e.Value Is Nothing Then
|
||||
Dim Valor = CInt(e.Value)
|
||||
If Valor < 2019 OrElse Valor > 2100 Then
|
||||
Throw New Exception("Valor del año incorrecto")
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Dim sCodigoError As String = "validando-"
|
||||
If pts IsNot Nothing Then
|
||||
sCodigoError &= pts.NombreCampo
|
||||
End If
|
||||
ev = New ErrorValidacion(sCodigoError, sender, ex.Message, ex, DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical)
|
||||
e.IsValid = False
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub tvMovimientos_ShowingEditor(sender As Object, e As ShowingEditorEventArgs)
|
||||
Dim mov As movimientosbancarios = gcMovimientos.GetRow(e.RowHandle)
|
||||
If e.Column.FieldName.ToLower = "conciliado" Then
|
||||
If mov.ConciliadoEn <> "" Then
|
||||
e.Cancel = True
|
||||
e.Handled = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub tvApuntes_ShowingEditor(sender As Object, e As ShowingEditorEventArgs)
|
||||
' Dim ap As movimientoscaja = gcApuntes.GetRow(e.RowHandle)
|
||||
' If e.Column.FieldName.ToLower = "conciliado" Then
|
||||
' If ap.ConciliadoEn <> "" Then
|
||||
' e.Cancel = True
|
||||
' e.Handled = True
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub ucConciliacionBancaria_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Select Case Celda.View.Name.ToLower
|
||||
Case "tvapuntes"
|
||||
Dim ra As movimientoscaja = Me.gcApuntes.CurrentItem
|
||||
Dim id As Integer = ra.idConciliacionNavigation.idConciliacion
|
||||
FuncionesDinamicas.AbrirAP(New ucConciliacionBancaria(id), OtrosParametros)
|
||||
Case Else
|
||||
Dim ra As movimientosbancarios = Me.gcMovimientos.CurrentItem
|
||||
Dim id As Integer = ra.idConciliacionNavigation.idConciliacion
|
||||
FuncionesDinamicas.AbrirAP(New ucConciliacionBancaria(id), OtrosParametros)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ucConciliacionBancaria_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar
|
||||
Dim ra As conciliacionesbancarias = Me.DataContext
|
||||
Dim hte As New Hashtable
|
||||
If Math.Round(ra.TotalMovimientosCaja, 2, MidpointRounding.AwayFromZero) <> Math.Round(ra.TotalMovimientosBancarios, 2, MidpointRounding.AwayFromZero) Then
|
||||
If DXMessageBox.Show("La suma de los movimientos de caja no coincide con la de los extractos bancarios. ¿Desea continuar?", "Atención", MessageBoxButton.YesNo) = MessageBoxResult.No Then
|
||||
hte.Add("Almacenar-SUMA", "La suma de los movimientos de caja debe coincidir con la de los extractos bancarios")
|
||||
End If
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ucConciliacionBancaria_ImprimirPlantilla(sender As Object, e As ItemClickEventArgs, idPlantilla As Integer) Handles Me.ImprimirPlantilla
|
||||
'Try
|
||||
' Dim pl = bd.plantillas.First(Function(x) x.idPlantilla = idPlantilla)
|
||||
' Select Case pl.Codigo
|
||||
' Case "CONBAN"
|
||||
' Dim ra As conciliacionesbancarias = Me.DataContext
|
||||
' Dim ds As New List(Of bdGrupoSanchoToro.db.InformeConciliacionBancaria)
|
||||
' Dim inf = New bdGrupoSanchoToro.db.InformeConciliacionBancaria(bd, ra.cajas.CuentaContable, ra.FechaFin)
|
||||
' ds.Add(inf)
|
||||
' Comun.ImprimirPlantilla(bd, idPlantilla, ds, False, 1)
|
||||
' End Select
|
||||
'Catch ex As Exception
|
||||
' DXMessageBox.Show(ex.Message, "Error")
|
||||
'End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ucConciliacionBancaria_DespuesEliminar(sender As Object) Handles Me.DespuesEliminar
|
||||
If docpanel IsNot Nothing AndAlso tsWPFCore.Comun.dm IsNot Nothing Then tsWPFCore.Comun.dm.DockController.RemovePanel(docpanel)
|
||||
End Sub
|
||||
|
||||
Private Sub ucConciliacionBancaria_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
Dim con As conciliacionesbancarias = Me.DataContext
|
||||
_idConciliacion = con.idConciliacion
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
114
GestionGrupoSanchoToro/ucConciliacionBancariaant.xaml
Normal file
114
GestionGrupoSanchoToro/ucConciliacionBancariaant.xaml
Normal file
@@ -0,0 +1,114 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
x:Class="ucConciliacionBancariaant"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="1280">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="grid">
|
||||
|
||||
<dxlc:LayoutControl Orientation="Vertical" Margin="-11" >
|
||||
<dxlc:LayoutGroup Header="Filtros" x:Name="lgFiltros" View="GroupBox" IsLocked="True" HorizontalAlignment="Stretch" Orientation="Vertical" >
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Cajas" Width="500" >
|
||||
<dxe:ComboBoxEdit ValueMember="idCaja" DisplayMember="Descripcion" x:Name="cbCajas" TabIndex="1" >
|
||||
<dxe:ComboBoxEdit.StyleSettings>
|
||||
<dxe:CheckedComboBoxStyleSettings />
|
||||
</dxe:ComboBoxEdit.StyleSettings>
|
||||
</dxe:ComboBoxEdit>
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicial:" Width="170" HorizontalAlignment="Left" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit x:Name="teFechaInicial" TabIndex="2" MaskUseAsDisplayFormat="True" AllowNullInput="true" NullText="" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Final:" Width="170" HorizontalAlignment="Left" >
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit x:Name="teFechaFinal" TabIndex="3" MaskUseAsDisplayFormat="True" AllowNullInput="true" NullText="" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Mostrar apuntes ya supervisados:" HorizontalAlignment="Left" HorizontalContentAlignment="Left" TabIndex="4" >
|
||||
<dxe:CheckEdit x:Name="cbIncluirSupervisados" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="btBuscar_Click" IsDefault="True" TabIndex="5" />
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsGridControl x:Name="gc" SeleccionMultiple="True" >
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idMovimiento" Width="120" IsSmart="True" Header="Nº Movimiento" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="Fecha" Header="Fecha" IsSmart="True" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d"/>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="cajas.Descripcion" Width="150" IsSmart="True" Header="Caja" />
|
||||
<dxg:GridColumn FieldName="DescripcionTipoMovimiento" Width="190" IsSmart="True" Header="Tipo Movimiento" />
|
||||
<dxg:GridColumn FieldName="ReferenciaDocumento" Width="150" IsSmart="True" Header="Referencia Documento" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="RazonSocial" Header="Razón Social" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="Importe" HorizontalHeaderContentAlignment="Right" Width="100" >
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" Width="400" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaCierre" Width="150" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="usuarios.Nombre" Header="Usuario" Width="200" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaSupervision" Header="Fecha Supervisión" Width="150" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowCheckBoxSelectorColumn="True" ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="True" ShowTotalSummary="True" ShowGroupFooters="True" >
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="Tipo=1" FieldName="{x:Null}" >
|
||||
<dx:Format Foreground="Green" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=2" FieldName="{x:Null}" >
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=3" FieldName="{x:Null}" >
|
||||
<dx:Format Foreground="Brown" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=4 AndAlso Importe < 0" FieldName="{x:Null}" >
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
<dxg:FormatCondition Expression="Tipo=9" FieldName="{x:Null}" >
|
||||
<dx:Format Foreground="Blue" FontWeight="Bold" />
|
||||
</dxg:FormatCondition>
|
||||
|
||||
<dxg:FormatCondition Expression="Not IsNull([FechaCierre])" FieldName="{x:Null}" >
|
||||
<dxg:Format FontStyle="Italic" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInColumn="Importe" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInColumn="RazonSocial" DisplayFormat="Nº Movimientos: {0:n0}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInGroupColumnFooter="Importe" DisplayFormat=" {0:c2}"/>
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInGroupColumnFooter="RazonSocial" DisplayFormat="Nº Movimientos: {0:n0}" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
648
GestionGrupoSanchoToro/ucConciliacionBancariaant.xaml.vb
Normal file
648
GestionGrupoSanchoToro/ucConciliacionBancariaant.xaml.vb
Normal file
@@ -0,0 +1,648 @@
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports System.Collections
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
Public Class ucConciliacionBancariaant
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
ContenedorAplicacion.btGuardar.IsVisible = True
|
||||
ContenedorAplicacion.btGuardar.Hint = "Conciliar movimientos seleccionados"
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Dim cjs = bd.cajas.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.FechaBaja.HasValue = False AndAlso (x.Tipo = cajas.TipoCajaEnum.BANCO)).OrderBy(Function(x) x.Descripcion).ToList
|
||||
Me.cbCajas.ItemsSource = cjs
|
||||
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Conciliación Bancaria"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "ConciliacionBancaria"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "movimientoscaja"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Conciliación Bancaria"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
|
||||
Dim ra = DirectCast(Me.gc.CurrentItem, movimientoscaja)
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "referenciadocumento"
|
||||
Dim id As Integer
|
||||
If ra.idFactura.HasValue Then
|
||||
'id = ra.idFactura
|
||||
'FuncionesDinamicas.AbrirAP(New ucFacturaEmitida(id), OtrosParametros)
|
||||
Else
|
||||
id = ra.idFacturaRecibida
|
||||
FuncionesDinamicas.AbrirAP(New ucFacturaRecibida(id), OtrosParametros)
|
||||
|
||||
End If
|
||||
Case "razonsocial"
|
||||
Dim id As Integer
|
||||
If ra.idFactura.HasValue Then
|
||||
id = ra.idFacturaNavigation.idCliente
|
||||
ElseIf ra.idFacturaRecibida.HasValue Then
|
||||
id = ra.idFacturaRecibidaNavigation.idProveedor
|
||||
End If
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad(id), OtrosParametros)
|
||||
Case "idmovimiento"
|
||||
Dim id As Integer
|
||||
id = ra.idMovimiento
|
||||
FuncionesDinamicas.AbrirAP(New ucMovimientoCaja(id), OtrosParametros)
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ap_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, OpcionGuardado As Integer) Handles Me.AntesGuardar
|
||||
tv.CommitEditing()
|
||||
|
||||
' Dim aps As List(Of Apuntes) = Me.gc.ItemsSource
|
||||
Dim ahora As DateTime = bd.AhoraMySql
|
||||
gc.FilterCriteria = Nothing
|
||||
|
||||
For i = 0 To Me.gc.VisibleRowCount - 1
|
||||
Dim rw = gc.GetRowHandleByVisibleIndex(i)
|
||||
If Not gc.IsGroupRowHandle(rw) Then
|
||||
EstableceConciliacion(rw, ahora)
|
||||
Else
|
||||
For j = 0 To gc.GetChildRowCount(rw) - 1
|
||||
EstableceConciliacion(gc.GetChildRowHandle(rw, j), ahora)
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
'bd.GuardarCambios()
|
||||
'Cancelar = True
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EstableceConciliacion(rw As Integer, ahora As DateTime)
|
||||
Dim m As movimientoscaja
|
||||
If Not gc.IsGroupRowHandle(rw) Then
|
||||
m = gc.GetRow(rw)
|
||||
If Me.tv.IsRowSelected(rw) Then
|
||||
If m.FechaSupervision.HasValue = False Then
|
||||
m.FechaSupervision = Now
|
||||
End If
|
||||
Else
|
||||
If m.FechaSupervision.HasValue Then
|
||||
m.FechaSupervision = Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ObtieneMovimientosCaja()
|
||||
Try
|
||||
Dim cjs As New List(Of Integer)
|
||||
If cbCajas.EditValue IsNot Nothing Then
|
||||
If cbCajas.EditValue.GetType Is GetType(List(Of Object)) Then
|
||||
Dim locj As List(Of Object) = cbCajas.EditValue
|
||||
For Each cj In locj
|
||||
cjs.Add(CType(cj, Integer))
|
||||
Next
|
||||
Else
|
||||
cjs = TryCast(cbCajas.EditValue, List(Of Integer))
|
||||
End If
|
||||
End If
|
||||
Dim iqmv = bd.movimientoscaja.Include(Function(x) x.idUsuarioNavigation).Include(Function(x) x.idCajaNavigation).Include(Function(x) x.idFacturaNavigation.idClienteNavigation).Include(Function(x) x.idFacturaRecibidaNavigation.idProveedorNavigation).AsQueryable
|
||||
If Not Me.cbIncluirSupervisados.IsChecked Then
|
||||
iqmv = iqmv.Where(Function(x) x.FechaSupervision.HasValue = False)
|
||||
End If
|
||||
If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
Dim dFi As Date = Me.teFechaInicial.EditValue
|
||||
Dim fi As New DateTime(dFi.Year, dFi.Month, dFi.Day, 0, 0, 0)
|
||||
iqmv = iqmv.Where(Function(x) x.Fecha >= dFi)
|
||||
End If
|
||||
If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
Dim dFf As Date = Me.teFechaFinal.EditValue
|
||||
Dim fi As New DateTime(dFf.Year, dFf.Month, dFf.Day, 0, 0, 0)
|
||||
iqmv = iqmv.Where(Function(x) x.Fecha >= dFf)
|
||||
End If
|
||||
Me.gc.ItemsSource = iqmv.Where(Function(x) cjs.Contains(x.idCaja)).ToList
|
||||
Me.DataContext = Me.gc.ItemsSource
|
||||
|
||||
If Me.cbIncluirSupervisados.IsChecked Then
|
||||
For i = 0 To Me.gc.VisibleRowCount - 1
|
||||
Dim rw = gc.GetRowHandleByVisibleIndex(i)
|
||||
MarcaSeleccionados(rw)
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub MarcaSeleccionados(rw As Integer)
|
||||
If Not gc.IsGroupRowHandle(rw) Then
|
||||
Dim ap As movimientoscaja = gc.GetRow(rw)
|
||||
If ap.FechaSupervision.HasValue Then
|
||||
gc.SelectItem(rw)
|
||||
End If
|
||||
Else
|
||||
For i = 0 To gc.GetChildRowCount(rw) - 1
|
||||
MarcaSeleccionados(gc.GetChildRowHandle(rw, i))
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtieneMovimientosCaja()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
'Public Class ucConciliacionBancaria
|
||||
'
|
||||
|
||||
' Dim bd As tscGrupoSanchoToro
|
||||
' Private WithEvents ApLineas As tsWPFCore.ApLineas
|
||||
' ' Private ListadoCajas As List(Of Integer)
|
||||
' Private DatosCargados As Boolean
|
||||
' Private TotalPagado As Double
|
||||
' Private TotalDevuelto As Double
|
||||
' Private TotalPagadoAgrupado As Double
|
||||
' Private TotalDevueltoAgrupado As Double
|
||||
' Private ApuntesAGuardar As List(Of Integer)
|
||||
' Private idCajs() As Integer
|
||||
' Private cajs As List(Of cajas)
|
||||
|
||||
|
||||
' Private Sub ApLineas_Cargado() Handles ApLineas.Cargado
|
||||
' Me.tv.AllowEditing = True
|
||||
' ' Me.gcSupervisado.AllowEditing = DevExpress.Utils.DefaultBoolean.True
|
||||
' Me.ApLineas.ContenedorL.btEliminar.IsVisible = False
|
||||
' Me.ApLineas.ContenedorL.btNuevo.IsVisible = False
|
||||
' Me.ApLineas.ContenedorL.btInvertir.IsVisible = False
|
||||
' Me.ApLineas.ContenedorL.btSeleccionar.IsVisible = False
|
||||
' Dim biguardar As DevExpress.Xpf.Bars.BarButtonItem
|
||||
' biguardar = New DevExpress.Xpf.Bars.BarButtonItem
|
||||
' biguardar.Name = "btGuardarConciliacion"
|
||||
' biguardar.Glyph = New BitmapImage(New Uri("pack://application:,,,/DevExpress.Images.v16.2;component/GrayScaleImages/Save/Save_16x16.png"))
|
||||
' biguardar.Hint = "Guardar"
|
||||
' biguardar.IsEnabled = True
|
||||
' Me.ApLineas.ContenedorL.BarraBotones.Items.Add(biguardar)
|
||||
' Dim ilGuardar As New DevExpress.Xpf.Bars.BarButtonItemLink()
|
||||
' ilGuardar.Name = "ilGuardar"
|
||||
' ilGuardar.BarItemName = biguardar.Name
|
||||
' Me.ApLineas.ContenedorL.BarraBotones.Bars(0).ItemLinks.Insert(0, ilGuardar)
|
||||
' AddHandler biguardar.ItemClick, AddressOf Guardar_ItemClick
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
' Private Sub ApLineas_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles ApLineas.Enlazar
|
||||
' 'Select Case Celda.Column.FieldName.ToLower
|
||||
' ' Case "numerorecibo"
|
||||
' Dim rec As Apuntes = Celda.RowData.Row
|
||||
' Dim ucf As New ucFactura
|
||||
' Dim dwi As dxwInicio = Window.GetWindow(Me)
|
||||
' If rec.NumeroRecibo IsNot Nothing Then
|
||||
' Comun.AbrirUcCL(ucf, dwi.grupodoc, Nothing, Me.ApLineas.dcfg, Me.ApLineas.dcn, 0, Me.ApLineas.dsc, Me.ApLineas.OtrosParametros, bd.recibos.First(Function(x) x.idrecibo = rec.NumeroRecibo).idFactura)
|
||||
' End If
|
||||
' ' End Select
|
||||
' End Sub
|
||||
|
||||
|
||||
' Public Sub EstableceDataContext(ByRef DataContext As Object, Optional BackGround As Boolean = False) Implements tsWPFCore.IApLineas.EstableceDataContext
|
||||
' Try
|
||||
' If Not DatosCargados Then
|
||||
' cajs = (From c In bd.cajas Where c.FechaBaja Is Nothing AndAlso c.enumeraciones.Codigo <> "TIPCAJ.METALICO" Order By c.Descripcion).ToList
|
||||
' For i = cajs.Count - 1 To 0 Step -1
|
||||
' If Comun.ObtienePermisos(bd, cajs(i).idPermiso, ApLineas.dsc.idUsuario).Otros = False Then
|
||||
' cajs.Remove(cajs(i))
|
||||
' End If
|
||||
' Next
|
||||
' If cajs.Count > 0 Then
|
||||
' If Comun.idCajaPredeterminada Is Nothing Then
|
||||
' If cajs.Count = 1 Then Comun.idCajaPredeterminada = cajs.First.idCaja
|
||||
' Else
|
||||
' If cajs.Where(Function(c) c.idCaja = Comun.idCajaPredeterminada).Count = 0 Then
|
||||
' Comun.idCajaPredeterminada = cajs.First.idCaja
|
||||
' End If
|
||||
' End If
|
||||
' Dim cj As cajas = (From c In bd.cajas Select c Where c.idCaja = Comun.idCajaPredeterminada).First
|
||||
' End If
|
||||
' idCajs = cajs.Select(Function(x) x.idCaja).ToArray
|
||||
' ' Me.cbCaja.ItemsSource = cajs
|
||||
' ' ListadoCajas = (From c In cajs Select c.idCaja).ToList
|
||||
' 'If Comun.idCajaPredeterminada IsNot Nothing Then
|
||||
' ' Me.cbCaja.EditValue = Comun.idCajaPredeterminada
|
||||
' 'Else
|
||||
' ' Me.cbCaja.EditValue = cajs.First
|
||||
' 'End If
|
||||
' End If
|
||||
' ' Me.teFechaFinal.EditValue = Now
|
||||
' ' Me.teFechaInicial.EditValue = Now
|
||||
|
||||
' DatosCargados = True
|
||||
' ObtieneApuntes()
|
||||
|
||||
' DataContext = Me.gc.DataContext
|
||||
|
||||
' Catch ex As Exception
|
||||
' DXMessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
' End Try
|
||||
' End Sub
|
||||
|
||||
' Public ReadOnly Property NombreTablaBase As String Implements tsWPFCore.IApLineas.NombreTablaBase
|
||||
' Get
|
||||
' Return ""
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public ReadOnly Property CampoIndice As String Implements IAplicacion.CampoIndice
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Private ReadOnly Property IAplicacion_NombreTablaBase As String Implements IAplicacion.NombreTablaBase
|
||||
' Get
|
||||
' Throw New NotImplementedException()
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Public Sub Nuevo() Implements tsWPFCore.IApLineas.Nuevo
|
||||
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
' Public Function ObtieneRejilla() As tsWPFCore.tsGridControl Implements tsWPFCore.IApLineas.ObtieneRejilla
|
||||
' Return Me.gc
|
||||
' End Function
|
||||
|
||||
' Public Sub EstableceApLin(ApLin As tsWPFCore.ApLineas) Implements tsWPFCore.IApLineas.EstableceApLin
|
||||
' Me.ApLineas = ApLin
|
||||
' End Sub
|
||||
|
||||
' Public Function ObtieneContexto(dcn As tsUtilidades.Datos.DatosConexionCliente) As System.Data.Objects.ObjectContext Implements tsWPFCore.IApLineas.ObtieneContexto
|
||||
' bd = bdM3Academy.Utilidades.NuevaConexion(dcn.BasesDatos(0))
|
||||
' Return bd
|
||||
' End Function
|
||||
|
||||
' Public Function ObtienePermisos() As tsUtilidades.Permisos Implements tsWPFCore.IApLineas.ObtienePermisos
|
||||
' Return Comun.ObtienePermisos(Me.bd, "AP.CONCILIACIONBANCARIA", Me.ApLineas.dsc.idUsuario)
|
||||
' End Function
|
||||
|
||||
' Public Function ObtieneCampoIndice() As String Implements tsWPFCore.IApLineas.ObtieneCampoIndice
|
||||
' Return ""
|
||||
' End Function
|
||||
|
||||
|
||||
' 'Private Sub ApLineas_ImprimirPlantilla(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs, idPlantilla As Integer) Handles ApLineas.ImprimirPlantilla
|
||||
' ' Try
|
||||
' ' Dim ds As Object = ObtieneDataSource()
|
||||
' ' Informes.MuestraImpresos(bd, idPlantilla, ds, Me.ApLineas.GrupoDocumentos, tsWPFCore.ApCabLin.dm.DockController)
|
||||
' ' Catch EX As Exception
|
||||
' ' DXMessageBox.Show(EX.Message, "Atención", MessageBoxButton.OK)
|
||||
' ' End Try
|
||||
' 'End Sub
|
||||
|
||||
' Private Sub ObtieneApuntes()
|
||||
' Try
|
||||
' If DatosCargados Then
|
||||
' ApuntesAGuardar = New List(Of Integer)
|
||||
' Dim iNumeroApuntes As Integer
|
||||
' Dim ierecs As IEnumerable(Of recibos)
|
||||
' Dim recs As List(Of recibos)
|
||||
|
||||
' Dim lm As New List(Of Apuntes)
|
||||
|
||||
' Dim m As Apuntes
|
||||
' ' Dim idCaja As Integer? = DirectCast(Me.cbCaja.EditValue, Integer)
|
||||
' Dim dIngresosp, dGastosp As Double
|
||||
' If idCajs.Count > 0 Then
|
||||
' ierecs = (From r In bd.recibos Where idCajs.Contains(r.idCaja))
|
||||
' If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
' Dim dFi As Date = Me.teFechaInicial.EditValue
|
||||
' Dim fi As New DateTime(dFi.Year, dFi.Month, dFi.Day, 0, 0, 0)
|
||||
' ierecs = (From r In ierecs Where r.FechaPago >= dFi)
|
||||
' End If
|
||||
' If Me.teFechaFinal.EditValue IsNot Nothing Then
|
||||
' Dim dFf As Date = Me.teFechaFinal.EditValue
|
||||
' Dim ff As New DateTime(dFf.Year, dFf.Month, dFf.Day, 23, 59, 59)
|
||||
' ierecs = (From r In ierecs Where r.FechaPago <= dFf)
|
||||
' End If
|
||||
' If Not Me.cbIncluirSupervisados.IsChecked Then
|
||||
' ierecs = (From r In ierecs Where r.Supervisado = False)
|
||||
' End If
|
||||
' recs = ierecs.ToList
|
||||
' For Each r In recs
|
||||
' iNumeroApuntes += 1
|
||||
' m = New Apuntes
|
||||
' m.Caja = cajs.First(Function(x) x.idCaja = r.idCaja).Descripcion
|
||||
' If r.facturas.Mes IsNot Nothing Then
|
||||
' m.Descripcion = "Recibo de " & r.facturas.RazonSocial & " Mensualidad: " & tsUtilidades.Utilidades.MesCastellano(r.facturas.Mes Mod 100) & " " & (r.facturas.Mes \ 100).ToString
|
||||
' Else
|
||||
' m.Descripcion = "Recibo de " & r.facturas.RazonSocial
|
||||
' End If
|
||||
' m.Fecha = r.FechaPago.Date
|
||||
' m.ImporteEntrada = r.Importe
|
||||
' m.ImporteSalida = 0
|
||||
' m.NumeroRecibo = r.idrecibo
|
||||
' m.Tipo = TipoMovimiento.RECIBO
|
||||
' m.Usuario = If(r.usuarios Is Nothing, "", r.usuarios.Nombre)
|
||||
' m.idApunte = iNumeroApuntes
|
||||
' ' m.Supervisado = r.Supervisado
|
||||
' m.FechaSupervision = r.FechaSupervision
|
||||
' m.idMovimientoORecibo = r.idrecibo
|
||||
' lm.Add(m)
|
||||
' Next
|
||||
' dIngresosp = recs.Sum(Function(x) x.Importe)
|
||||
|
||||
|
||||
' ierecs = (From r In bd.recibos Where idCajs.Contains(r.idCaja) AndAlso r.FechaDevolucion IsNot Nothing)
|
||||
' If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
' Dim dFi As Date = Me.teFechaInicial.EditValue
|
||||
' Dim fi As New DateTime(dFi.Year, dFi.Month, dFi.Day, 0, 0, 0)
|
||||
' ierecs = (From r In ierecs Where r.FechaDevolucion >= dFi)
|
||||
' End If
|
||||
' If Me.teFechaFinal.EditValue IsNot Nothing Then
|
||||
' Dim dFf As Date = Me.teFechaFinal.EditValue
|
||||
' Dim ff As New DateTime(dFf.Year, dFf.Month, dFf.Day, 23, 59, 59)
|
||||
' ierecs = (From r In ierecs Where r.FechaDevolucion <= dFf)
|
||||
' End If
|
||||
' If Not Me.cbIncluirSupervisados.IsChecked Then
|
||||
' ierecs = (From r In ierecs Where r.DevolucionSupervisada = False)
|
||||
' End If
|
||||
' recs = ierecs.ToList
|
||||
' For Each r In recs
|
||||
' iNumeroApuntes += 1
|
||||
' m = New Apuntes
|
||||
' m.Caja = cajs.First(Function(x) x.idCaja = r.idCaja).Descripcion
|
||||
' If r.facturas.Mes IsNot Nothing Then
|
||||
' m.Descripcion = "Devolución Recibo de " & r.facturas.RazonSocial & " Mensualidad: " & tsUtilidades.Utilidades.MesCastellano(r.facturas.Mes Mod 100) & " " & (r.facturas.Mes \ 100).ToString
|
||||
' Else
|
||||
' m.Descripcion = "Devolución Recibo de " & r.facturas.RazonSocial
|
||||
' End If
|
||||
' m.Fecha = r.FechaDevolucion.Value.Date
|
||||
' m.ImporteEntrada = 0
|
||||
' m.ImporteSalida = r.Importe
|
||||
' m.NumeroRecibo = r.idrecibo
|
||||
' m.Tipo = TipoMovimiento.DEVOLUCION_RECIBO
|
||||
' m.Usuario = If(r.usuarios1 Is Nothing, "", r.usuarios1.Nombre)
|
||||
' m.idApunte = iNumeroApuntes
|
||||
' ' m.Supervisado = r.DevolucionSupervisada
|
||||
' m.FechaSupervision = r.FechaSupervisionDevolucion
|
||||
' m.idMovimientoORecibo = r.idrecibo
|
||||
' lm.Add(m)
|
||||
' Next
|
||||
' dGastosp = recs.Sum(Function(x) x.Importe)
|
||||
|
||||
' Dim iemovs As IEnumerable(Of movimientoscaja)
|
||||
' Dim movs As List(Of movimientoscaja)
|
||||
' iemovs = (From mv In bd.movimientoscaja Where idCajs.Contains(mv.idCaja) AndAlso mv.Tipo <> TipoMovimiento.APERTURA AndAlso mv.Tipo <> TipoMovimiento.CIERRE)
|
||||
|
||||
' ' ierecs = (From r In bd.recibos Where r.idCaja = idCaja AndAlso r.FechaDevolucion IsNot Nothing)
|
||||
' If Me.teFechaInicial.EditValue IsNot Nothing Then
|
||||
' Dim dFi As Date = Me.teFechaInicial.EditValue
|
||||
' Dim fi As New DateTime(dFi.Year, dFi.Month, dFi.Day, 0, 0, 0)
|
||||
' iemovs = (From mv In iemovs Where mv.Fecha >= dFi)
|
||||
' End If
|
||||
' If Me.teFechaFinal.EditValue IsNot Nothing Then
|
||||
' Dim dFf As Date = Me.teFechaFinal.EditValue
|
||||
' Dim ff As New DateTime(dFf.Year, dFf.Month, dFf.Day, 23, 59, 59)
|
||||
' iemovs = (From mv In iemovs Where mv.Fecha <= dFf)
|
||||
' End If
|
||||
' If Not Me.cbIncluirSupervisados.IsChecked Then
|
||||
' iemovs = (From mv In iemovs Where mv.Supervisado = False)
|
||||
' End If
|
||||
' movs = iemovs.ToList
|
||||
' For Each mc In movs
|
||||
' iNumeroApuntes += 1
|
||||
' m = New Apuntes
|
||||
' m.Caja = cajs.First(Function(x) x.idCaja = mc.idCaja).Descripcion
|
||||
' m.Descripcion = mc.Descripcion
|
||||
' m.Fecha = mc.Fecha.Value.Date
|
||||
' m.ImporteSalida = mc.ImporteSalida
|
||||
' m.ImporteEntrada = mc.ImporteEntrada
|
||||
' m.Tipo = mc.Tipo
|
||||
' 'Select Case mc.Tipo
|
||||
' ' Case "INGRESO"
|
||||
' ' m.Tipo = TipoMovimiento.INGRESO
|
||||
' ' Case "GASTO"
|
||||
' ' m.Tipo = TipoMovimiento.GASTO
|
||||
' ' Case "APERTURA"
|
||||
' ' m.Tipo = TipoMovimiento.APERTURA
|
||||
' ' Case "CIERRE"
|
||||
' ' m.Tipo = TipoMovimiento.CIERRE
|
||||
' ' Case "DEVOLUCION RECIBO"
|
||||
' ' m.Tipo = TipoMovimiento.DEVOLUCION_RECIBO
|
||||
' ' Case "TRASPASO"
|
||||
' ' m.Tipo = TipoMovimiento.TRASPASO
|
||||
' 'End Select
|
||||
' m.Usuario = mc.usuarios.Nombre
|
||||
' m.idApunte = iNumeroApuntes
|
||||
' ' m.Supervisado = mc.Supervisado
|
||||
' m.FechaSupervision = mc.FechaSupervision
|
||||
' m.idMovimientoORecibo = mc.idMovimiento
|
||||
' lm.Add(m)
|
||||
' Next
|
||||
' dIngresosp += movs.Sum(Function(x) x.ImporteEntrada)
|
||||
' dGastosp += movs.Sum(Function(x) x.ImporteSalida)
|
||||
' If idCajs.Count > 0 Then
|
||||
' recs = (From r In bd.recibos Where idCajs.Contains(r.idCaja) AndAlso r.idMovimientoCierre Is Nothing).ToList
|
||||
' Dim imprecs As Double? = recs.Sum(Function(r) r.Importe)
|
||||
' Dim recdevs = (From r In bd.recibos Where idCajs.Contains(r.idCaja) AndAlso r.idMovimientoCierreDevolucion Is Nothing AndAlso r.FechaDevolucion IsNot Nothing).ToList
|
||||
' Dim imprecdevs As Double? = recdevs.Sum(Function(r) r.Importe)
|
||||
' Dim mvs = (From mv In bd.movimientoscaja Where idCajs.Contains(mv.idCaja) AndAlso mv.idMovimientoCierre Is Nothing AndAlso mv.Tipo <> TipoMovimiento.CIERRE)
|
||||
' Dim dImporteMovEnt As Double? = mvs.Sum(Function(mv) mv.ImporteEntrada)
|
||||
' Dim dImporteMovSal As Double? = mvs.Sum(Function(mv) mv.ImporteSalida)
|
||||
' Dim dIngresos As Double = If(dImporteMovEnt, 0) + If(imprecs, 0)
|
||||
' Dim dGastos As Double = If(dImporteMovSal, 0) + If(imprecdevs, 0)
|
||||
' 'Me.teSaldoActual.EditValue = dIngresos - dGastos
|
||||
' 'Me.teIngresos.EditValue = dIngresosp
|
||||
' 'Me.teGastos.EditValue = dGastosp
|
||||
' Else
|
||||
' 'Me.teSaldoActual.EditValue = 0
|
||||
' 'Me.teIngresos.EditValue = 0
|
||||
' 'Me.teGastos.EditValue = 0
|
||||
' End If
|
||||
' lm = lm.OrderBy(Function(x) x.Fecha).ThenBy(Function(x) x.idApunte).ToList
|
||||
' Else
|
||||
' Throw New Exception("Seleccione primero la caja")
|
||||
' End If
|
||||
' Me.gc.ItemsSource = lm
|
||||
|
||||
|
||||
|
||||
' For i = 0 To Me.gc.VisibleRowCount - 1
|
||||
' Dim rw = gc.GetRowHandleByVisibleIndex(i)
|
||||
' MarcaSeleccionados(rw)
|
||||
' Next
|
||||
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' Throw New Exception(ex.Message, ex)
|
||||
' End Try
|
||||
' End Sub
|
||||
' Private Sub MarcaSeleccionados(rw As Integer)
|
||||
' If Not gc.IsGroupRowHandle(rw) Then
|
||||
' Dim ap As Apuntes = gc.GetRow(rw)
|
||||
' If ap.FechaSupervision.HasValue Then
|
||||
' gc.SelectItem(rw)
|
||||
' End If
|
||||
' Else
|
||||
' For i = 0 To gc.GetChildRowCount(rw) - 1
|
||||
' MarcaSeleccionados(gc.GetChildRowHandle(rw, i))
|
||||
' Next
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Sub teFechaInicial_EditValueChanged(sender As Object, e As DevExpress.Xpf.Editors.EditValueChangedEventArgs) Handles teFechaInicial.EditValueChanged
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
' Private Sub teFechaFinal_EditValueChanged(sender As Object, e As DevExpress.Xpf.Editors.EditValueChangedEventArgs) Handles teFechaFinal.EditValueChanged
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
|
||||
|
||||
' Private Sub cbIncluirSupervisados_Checked(sender As Object, e As RoutedEventArgs)
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
' Private Sub cbIncluirSupervisados_Unchecked(sender As Object, e As RoutedEventArgs)
|
||||
' ObtieneApuntes()
|
||||
' Me.DataContext = Me.gc.ItemsSource
|
||||
' End Sub
|
||||
|
||||
' Private Sub Guardar_ItemClick(sender As Object, e As DevExpress.Xpf.Bars.ItemClickEventArgs)
|
||||
' tv.CommitEditing()
|
||||
|
||||
' ' Dim aps As List(Of Apuntes) = Me.gc.ItemsSource
|
||||
' Dim ahora As DateTime = Comun.AhoraMysql(bd)
|
||||
' gc.FilterCriteria = Nothing
|
||||
|
||||
' For i = 0 To Me.gc.VisibleRowCount - 1
|
||||
' Dim rw = gc.GetRowHandleByVisibleIndex(i)
|
||||
' If Not gc.IsGroupRowHandle(rw) Then
|
||||
' EstableceConciliacion(rw, ahora)
|
||||
' Else
|
||||
' For j = 0 To gc.GetChildRowCount(rw) - 1
|
||||
' EstableceConciliacion(gc.GetChildRowHandle(rw, j), ahora)
|
||||
' Next
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
' bd.GuardarCambios()
|
||||
' EstableceDataContext(Me.DataContext)
|
||||
' End Sub
|
||||
|
||||
' Private Sub EstableceConciliacion(rw As Integer, ahora As DateTime)
|
||||
' Dim ap As Apuntes
|
||||
' Dim r As recibos
|
||||
' Dim m As movimientoscaja
|
||||
|
||||
' If Not gc.IsGroupRowHandle(rw) Then
|
||||
' ap = gc.GetRow(rw)
|
||||
' Select Case ap.Tipo
|
||||
' Case TipoMovimiento.RECIBO
|
||||
' r = bd.recibos.First(Function(x) x.idrecibo = ap.idMovimientoORecibo)
|
||||
' If Me.tv.IsRowSelected(rw) Then
|
||||
' If Not r.Supervisado Then
|
||||
' r.Supervisado = True
|
||||
' r.FechaSupervision = ahora
|
||||
' End If
|
||||
' Else
|
||||
' If r.Supervisado Then
|
||||
' r.Supervisado = False
|
||||
' r.FechaSupervision = Nothing
|
||||
' End If
|
||||
' End If
|
||||
' Case TipoMovimiento.DEVOLUCION_RECIBO
|
||||
' r = bd.recibos.First(Function(x) x.idrecibo = ap.idMovimientoORecibo)
|
||||
' If Me.tv.IsRowSelected(rw) Then
|
||||
' If Not r.DevolucionSupervisada Then
|
||||
' r.DevolucionSupervisada = True
|
||||
' r.FechaSupervisionDevolucion = ahora
|
||||
' End If
|
||||
' Else
|
||||
' If r.DevolucionSupervisada Then
|
||||
' r.DevolucionSupervisada = False
|
||||
' r.FechaSupervisionDevolucion = Nothing
|
||||
' End If
|
||||
' End If
|
||||
' Case Else
|
||||
' m = bd.movimientoscaja.First(Function(x) x.idMovimiento = ap.idMovimientoORecibo)
|
||||
' If Me.tv.IsRowSelected(rw) Then
|
||||
' If Not m.Supervisado Then
|
||||
' m.Supervisado = True
|
||||
' m.FechaSupervision = ahora
|
||||
' End If
|
||||
' Else
|
||||
' If m.Supervisado Then
|
||||
' m.Supervisado = False
|
||||
' m.FechaSupervision = Nothing
|
||||
' End If
|
||||
' End If
|
||||
' End Select
|
||||
|
||||
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
77
GestionGrupoSanchoToro/ucConciliacionesBancaria.xaml
Normal file
77
GestionGrupoSanchoToro/ucConciliacionesBancaria.xaml
Normal file
@@ -0,0 +1,77 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucConciliacionesBancarias"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Filtros" x:Name="lgFiltrosBusquedaRapida" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="800" HorizontalAlignment="Left">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicio:" Width="250">
|
||||
<dxe:DateEdit x:Name="deFechaInicio" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Fin:" Width="200">
|
||||
<dxe:DateEdit x:Name="deFechaFin" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Búsqueda:" FontWeight="Bold">
|
||||
<dxe:TextEdit x:Name="teBusqueda" TabIndex="0" x:FieldModifier="public" FontWeight="Normal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="BtBuscar_Click" IsDefault="True" TabIndex="1" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutItem Label="Campos de búsqueda:" x:Name="liCamposBusqueda">
|
||||
<Border BorderThickness="1" BorderBrush="Black">
|
||||
<TextBlock x:Name="tbCamposBusqueda" Text="Nº Conciliación, IBAN, Denominación Cuenta" />
|
||||
</Border>
|
||||
</dxlc:LayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="1">
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="true" ShowSearchPanelMode="Always" x:Name="tv" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="idConciliacion" Header="Nº Conciliación" Width="100" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaInicio" Width="90" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaFin" Width="90" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaConciliacion" Header="Fecha Conciliación" Width="120" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="idCajaNavigation.Descripcion" Header="Caja" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="idCajaNavigation.IBAN" Header="IBAN" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="TotalMovimientosBancarios" IsSmart="True" Width="180" HorizontalHeaderContentAlignment="Right">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="TotalMovimientosCaja" IsSmart="True" Width="180" HorizontalHeaderContentAlignment="Right">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
170
GestionGrupoSanchoToro/ucConciliacionesBancaria.xaml.vb
Normal file
170
GestionGrupoSanchoToro/ucConciliacionesBancaria.xaml.vb
Normal file
@@ -0,0 +1,170 @@
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core.ServerMode
|
||||
Imports bdGrupoSanchoToro.db
|
||||
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Linq.Dynamic.Core
|
||||
Public Class ucConciliacionesBancarias
|
||||
|
||||
Dim bd As tscGrupoSanchoToro
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Conciliaciones Bancarias"
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "ConciliacionesBancarias"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Conciliación Bancaria"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "conciliacionesbancarias"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.HabilitarRefresco = True
|
||||
deFechaInicio.EditValue = Now.AddMonths(-4)
|
||||
deFechaFin.EditValue = Now
|
||||
GridBusqueda = Me.gc
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
If Refrescar OrElse Background Then ObtieneConciliacionesAsync(bd, Background)
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
'Public Overrides Function ObtieneConexionBD() As BBDD
|
||||
' Return bdGrupoSanchoToro.db.tscGrupoSanchoToro.bdga
|
||||
'End Function
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
|
||||
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
Public Function ObtieneConciliaciones(ByRef DataContext As Object, BackGround As Boolean, TextoBusqueda As String, FechaInicio As DateOnly?, FechaFin As DateOnly?) As List(Of conciliacionesbancarias)
|
||||
Dim rs As IQueryable(Of conciliacionesbancarias)
|
||||
Dim iNumExc As Integer = 0
|
||||
|
||||
Do
|
||||
Try
|
||||
rs = bd.conciliacionesbancarias.Include(Function(x) x.idCajaNavigation).AsQueryable
|
||||
If TextoBusqueda <> "" Then
|
||||
Dim parametros(0) As Object
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, {"idConciliacion"}, {"idCajaNavigation.Descripcion", "idCajaNavigation.IBAN"}, Nothing)
|
||||
rs = rs.Where(ExpresionBusqueda)
|
||||
End If
|
||||
If FechaInicio.HasValue Then
|
||||
rs = rs.Where(Function(x) x.FechaFin >= FechaInicio.Value)
|
||||
End If
|
||||
If FechaFin.HasValue Then
|
||||
Dim ff As DateOnly = FechaFin.Value.AddDays(1)
|
||||
'Dim ff As DateTime = Now
|
||||
rs = rs.Where(Function(x) x.FechaInicio < ff)
|
||||
End If
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
iNumExc += 1
|
||||
If iNumExc > 3 Then
|
||||
rs = Nothing
|
||||
Exit Do
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
If rs IsNot Nothing Then
|
||||
Return rs.ToList
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Async Sub ObtieneConciliacionesAsync(bd As tscGrupoSanchoToro, Background As Boolean)
|
||||
Try
|
||||
|
||||
|
||||
Dim rs As New List(Of conciliacionesbancarias)
|
||||
Dim fi, ff As DateOnly?
|
||||
Dim Busqueda As String
|
||||
|
||||
Busqueda = Me.teBusqueda.Text.Trim
|
||||
fi = If(deFechaInicio.EditValue Is Nothing, Nothing, DateOnly.FromDateTime(deFechaInicio.EditValue))
|
||||
ff = If(deFechaFin.EditValue Is Nothing, Nothing, DateOnly.FromDateTime(deFechaFin.EditValue))
|
||||
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
rs = ObtieneConciliaciones(bd, Background, Busqueda, fi, ff)
|
||||
End Sub)
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando Extractos ...")
|
||||
rs = ObtieneConciliaciones(bd, Background, Busqueda, fi, ff)
|
||||
End If
|
||||
|
||||
gc.ItemsSource = rs
|
||||
DataContext = rs
|
||||
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
Me.ContenedorAplicacion.IsEnabled = True
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Nuevo() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucConciliacionBancaria, OtrosParametros)
|
||||
End Sub
|
||||
Private Sub ApLineas_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim id As Integer = DirectCast(Me.gc.CurrentItem, conciliacionesbancarias).idConciliacion
|
||||
FuncionesDinamicas.AbrirAP(New ucConciliacionBancaria(id), OtrosParametros)
|
||||
End Sub
|
||||
|
||||
Private Sub BtBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtieneConciliacionesAsync(bd, False)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
106
GestionGrupoSanchoToro/ucConfiguracion.xaml
Normal file
106
GestionGrupoSanchoToro/ucConfiguracion.xaml
Normal file
@@ -0,0 +1,106 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucConfiguracion"
|
||||
mc:Ignorable="d" d:DesignHeight="1024" d:DesignWidth="1280">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Configuración de valores por defecto" x:Name="lgDetalle" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<!--<dxlc:LayoutGroup dx:ScrollViewerTouchBehavior.IsEnabled="True" Serialization:SerializableItem.TypeName="LayoutGroup">
|
||||
<tsWPF:tsLayoutItem Label="Porcentaje IVA Defecto:" Width="200" x:Name="ilIVA">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="1" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding ValorNumerico1, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>-->
|
||||
<tsWPF:tsLayoutItem Label="Email Copia Oculta:" Width="600" HorizontalAlignment="Left" x:Name="liEmailCopiaOculta">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ValorAlfabeticoLargo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Email Asesoría Defecto:" Width="600" HorizontalAlignment="Left" x:Name="liEmailAsesoria">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ValorAlfabeticoLargo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Configuración de la cuenta de correo" x:Name="lgCuentaCorreo" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup dx:ScrollViewerTouchBehavior.IsEnabled="True" Serialization:SerializableItem.TypeName="LayoutGroup">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Servidor SMTP:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ServidorSMTP, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Cuenta Correo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding CuentaCorreo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Remitente:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Remitente, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Contraseña:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:PasswordBoxEdit TabIndex="7" EditValue="{Binding Password, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" ValidateOnTextInput="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Responder A:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ResponderA, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Puerto:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="8" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding Puerto, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Seguridad SSL:" Width="150">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding SSL, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="9" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
106
GestionGrupoSanchoToro/ucConfiguracion.xaml.bak
Normal file
106
GestionGrupoSanchoToro/ucConfiguracion.xaml.bak
Normal file
@@ -0,0 +1,106 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v22.2" x:Class="ucConfiguracion"
|
||||
mc:Ignorable="d" d:DesignHeight="1024" d:DesignWidth="1280">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Configuración de valores por defecto" x:Name="lgDetalle" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup dx:ScrollViewerTouchBehavior.IsEnabled="True" Serialization:SerializableItem.TypeName="LayoutGroup">
|
||||
<tsWPF:tsLayoutItem Label="Porcentaje IVA Defecto:" Width="200" x:Name="ilIVA">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="1" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding ValorNumerico1, Converter={StaticResource DoubleToDecimalConverter}, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Email Copia Oculta:" Width="600" HorizontalAlignment="Left" x:Name="liEmailCopiaOculta">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ValorAlfabeticoLargo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Email Asesoría Defecto:" Width="600" HorizontalAlignment="Left" x:Name="liEmailAsesoria">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ValorAlfabeticoLargo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Configuración de la cuenta de correo" x:Name="lgCuentaCorreo" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup dx:ScrollViewerTouchBehavior.IsEnabled="True" Serialization:SerializableItem.TypeName="LayoutGroup">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Servidor SMTP:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ServidorSMTP, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Cuenta Correo:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding CuentaCorreo, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Remitente:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Remitente, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Contraseña:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:PasswordBoxEdit TabIndex="7" EditValue="{Binding Password, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" ValidateOnTextInput="False" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="400">
|
||||
<tsWPF:tsLayoutItem Label="Responder A:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding ResponderA, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Puerto:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="8" Mask="N0" MaskType="Numeric" MaskUseAsDisplayFormat="True" EditValue="{Binding Puerto, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Seguridad SSL:" Width="150">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding SSL, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="9" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
90
GestionGrupoSanchoToro/ucConfiguracion.xaml.vb
Normal file
90
GestionGrupoSanchoToro/ucConfiguracion.xaml.vb
Normal file
@@ -0,0 +1,90 @@
|
||||
Imports tsWPFCore
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports System.Collections
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Bars
|
||||
|
||||
Public Class ucConfiguracion
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Public Overrides Sub Cargado()
|
||||
Dim kk As New ucConfiguracion
|
||||
End Sub
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Dim enIVA = bd.enumeraciones.First(Function(X) X.Codigo = "PIVA.DEFECTO")
|
||||
Dim enEAS = bd.enumeraciones.First(Function(x) x.Codigo = "CONF.EMAILASESORIA")
|
||||
Dim enECO = bd.enumeraciones.First(Function(x) x.Codigo = "CONF.EMAILCOPIAOCULTA")
|
||||
Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO" AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
'ilIVA.DataContext = enIVA
|
||||
liEmailAsesoria.DataContext = enEAS
|
||||
liEmailCopiaOculta.DataContext = enECO
|
||||
DataContext = cta
|
||||
Return tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
|
||||
Me.docpanel.Caption = "Configuración"
|
||||
Me.docpanel.Tag = "Configuración"
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "Configuracion"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "enumeraciones"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Configuración"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim per = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
per.Nuevos = False
|
||||
per.Exportar = False
|
||||
per.Eliminar = False
|
||||
per.Impresion = False
|
||||
Return per
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ucConfiguracion_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
' bdGrupoSanchoToro.db.Utilidades.PorcentajeIva = bd.enumeraciones.First(Function(x) x.Codigo = "PIVA.DEFECTO").ValorNumerico1.Value
|
||||
End Sub
|
||||
End Class
|
||||
95
GestionGrupoSanchoToro/ucCorreos.xaml
Normal file
95
GestionGrupoSanchoToro/ucCorreos.xaml
Normal file
@@ -0,0 +1,95 @@
|
||||
<tsWPF:tsUserControl
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" x:Class="ucCorreos"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Búsqueda Rápida" Orientation="Vertical" x:Name="BusquedaRapida">
|
||||
<dxlc:LayoutGroup Width="800" HorizontalAlignment="Left" >
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<dxlc:LayoutGroup>
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicio:" TabIndex="8" >
|
||||
<dxe:DateEdit x:Name="teFechaInicio" TabIndex="1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Fin:" TabIndex="1" >
|
||||
<dxe:DateEdit x:Name="teFechaFin" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Búsqueda:" FontWeight="Bold" >
|
||||
<dxe:TextEdit x:Name="teBusqueda" TabIndex="3" FontWeight="Normal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="BtBuscar_Click" IsDefault="True" TabIndex="4" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutItem Label="Campos de búsqueda:">
|
||||
<Border BorderThickness="1" BorderBrush="Black" >
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Destinatario, Asunto, Cuerpo"/>
|
||||
<TextBlock Margin="20,0,0,0" Text="(En Blanco Muestra Todos)" FontWeight="Bold" ></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</dxlc:LayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gcCorreos" TabIndex="26">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<!--<dxg:GridColumn FieldName="cuentascorreo.CuentaCorreo" Width="300" IsSmart="True"/>-->
|
||||
<dxg:GridColumn FieldName="Remitente" Width="200" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Destinatario" Width="200" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Asunto" Width="300" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Cuerpo" Width="300" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="FicheroAdjunto" Header="Fichero Adjunto" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaCreacion" Header="Fecha Creación" Width="120" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaEnvio" Header="Fecha Envío" Width="140" IsSmart="True" FilterPopupMode="CheckedList">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaUltimoIntento" Header="Fecha Último Intento" Width="150" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaAnulacion" Header="Fecha Anulación" Width="120" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaAvisoError" Width="120" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="MensajeError" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="usuarios.Usuario" Width="150" Header="Usuario" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
202
GestionGrupoSanchoToro/ucCorreos.xaml.vb
Normal file
202
GestionGrupoSanchoToro/ucCorreos.xaml.vb
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports System.Collections
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Linq.Dynamic
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
|
||||
|
||||
Public Class ucCorreos
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
|
||||
|
||||
|
||||
|
||||
'Public Sub New(ListadoFiltrado As List(Of v_albaranesextendido), TextoBusqueda As String, TituloCamposBusqueda As String, CamposBusquedaAlfabeticos() As String, CamposBusquedaNumericos() As String)
|
||||
|
||||
' InitializeComponent()
|
||||
' _ListadoFiltrado = ListadoFiltrado
|
||||
' Me.BusquedaRapida.Visibility = Visibility.Visible
|
||||
' 'Me.FiltrosAvanzados.Visibility = Visibility.Collapsed
|
||||
' Me.teBusqueda.Text = TextoBusqueda
|
||||
' Me.tbCamposBusqueda.Text = TituloCamposBusqueda
|
||||
' _CamposBusquedaAlfabeticos = CamposBusquedaAlfabeticos
|
||||
' _CamposBusquedaNumericos = CamposBusquedaNumericos
|
||||
' _TextoBusqueda = TextoBusqueda
|
||||
|
||||
'End Sub
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
' Me.BusquedaRapida.Visibility = Visibility.Collapsed
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
ContenedorAplicacion.btGuardar.IsVisible = False
|
||||
ContenedorAplicacion.siEstado.IsVisible = False
|
||||
GridBusqueda = Me.gcCorreos
|
||||
'Dim Hoy = Date.Today
|
||||
'teFechaFin.EditValue = Hoy
|
||||
'teFechaInicio.EditValue = New Date(Hoy.Year, 1, 1)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
Try
|
||||
If Background OrElse Refrescar Then ObtieneCorreosAsync(bd, Background)
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Correos"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "Correos"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "correos"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "correos"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim ra = DirectCast(Me.gcCorreos.CurrentItem, correos)
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "ficheroadjunto"
|
||||
Dim co As correos = gcCorreos.CurrentItem
|
||||
Dim b() = co.idFicheroAdjuntoNavigation.Fichero
|
||||
Dim nf = tsUtilidades.Utilidades.ObtieneFicheroAleatorio(IO.Path.GetExtension(co.idFicheroAdjuntoNavigation.NombreFichero))
|
||||
IO.File.WriteAllBytes(nf, b)
|
||||
tsUtilidades.Sistema.EjecutaFichero(nf)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Public Function ObtieneCorreos(ByRef DataContext As Object, TextoBusqueda As String, FechaInicio As Date?, FechaFin As Date?) As List(Of correos)
|
||||
Dim rs As IQueryable(Of correos)
|
||||
Dim la As New List(Of correos)
|
||||
Dim iNumExc As Integer = 0
|
||||
Do
|
||||
Try
|
||||
If TextoBusqueda <> "" Then
|
||||
Dim parametros(0) As Object
|
||||
Dim CamposBusquedaAlfabeticos() As String = {"Destinatario", "Asunto", "Cuerpo"}
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Nothing, CamposBusquedaAlfabeticos, Nothing)
|
||||
rs = bd.correos.Where(ExpresionBusqueda)
|
||||
Else
|
||||
rs = bd.correos.AsQueryable
|
||||
End If
|
||||
|
||||
If FechaInicio.HasValue Then
|
||||
rs = rs.Where(Function(x) x.FechaCreacion >= FechaInicio.Value)
|
||||
End If
|
||||
If FechaFin.HasValue Then
|
||||
FechaFin = FechaFin.Value.AddDays(1)
|
||||
rs = rs.Where(Function(x) x.FechaCreacion < FechaFin.Value)
|
||||
End If
|
||||
la = rs.Include(Function(x) x.idUsuarioNavigation).OrderByDescending(Function(x) x.FechaCreacion).ToList
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
iNumExc += 1
|
||||
If iNumExc > 3 Then
|
||||
rs = Nothing
|
||||
Exit Do
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
Return la
|
||||
End Function
|
||||
|
||||
Public Async Sub ObtieneCorreosAsync(bd As tscGrupoSanchoToro, Background As Boolean)
|
||||
Try
|
||||
Dim rs As New List(Of correos)
|
||||
Dim Busqueda = tsEFCore8.Extensiones.ObjetoNothingAVacio(Me.teBusqueda.EditValue)
|
||||
Dim fi As Date? = teFechaInicio.EditValue
|
||||
Dim ff As Date? = teFechaFin.EditValue
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
rs = ObtieneCorreos(bd, Busqueda, fi, ff)
|
||||
End Sub)
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando Correos ...")
|
||||
rs = ObtieneCorreos(bd, Busqueda, fi, ff)
|
||||
End If
|
||||
|
||||
gcCorreos.ItemsSource = rs
|
||||
DataContext = rs
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
Me.ContenedorAplicacion.IsEnabled = True
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BtBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtieneCorreosAsync(bd, False)
|
||||
End Sub
|
||||
|
||||
Private Sub ucalbaranes_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
teBusqueda.SelectAll()
|
||||
End Sub
|
||||
|
||||
Private Sub cbIncluirTodos_Checked(sender As Object, e As RoutedEventArgs)
|
||||
Dim Hoy = Date.Today
|
||||
If teFechaFin.EditValue Is Nothing Then teFechaFin.EditValue = Hoy
|
||||
If teFechaInicio.EditValue Is Nothing Then teFechaInicio.EditValue = New Date(Hoy.Year, 1, 1)
|
||||
End Sub
|
||||
|
||||
'Private Sub ap_ImprimirPlantilla(sender As Object, e As ItemClickEventArgs, idPlantilla As Integer) Handles ImprimirPlantilla
|
||||
' Dim ds As List(Of albaranes)
|
||||
' Dim pl As plantillas = (From p In bd.plantillas Where p.idPlantilla = idPlantilla).First
|
||||
' Dim sTipo As String = pl.enumeraciones.Codigo
|
||||
' Dim al As albaranes = Me.DataContext
|
||||
' ds = New List(Of albaranes)
|
||||
' ds.Add(al)
|
||||
' Select Case sTipo
|
||||
' Case "GRUPLA.AV-ALBARANES"
|
||||
' Informes.ImprimirPlantilla(bd, idPlantilla, ds, False)
|
||||
' End Select
|
||||
'End Sub
|
||||
End Class
|
||||
400
GestionGrupoSanchoToro/ucEntidad.xaml
Normal file
400
GestionGrupoSanchoToro/ucEntidad.xaml
Normal file
@@ -0,0 +1,400 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucEntidad"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos Entidad" x:Name="lgDetalle" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="300" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="CIF:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding NIF, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Email 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Email, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup ItemLabelsAlignment="Local" Width="550" Orientation="Vertical" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="Razón Social (Apellidos, Nombre):">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit x:Name="teRazonSocial" EditValue="{Binding RazonSocial, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup dx:ScrollViewerTouchBehavior.IsEnabled="True" Serialization:SerializableItem.TypeName="LayoutGroup">
|
||||
<tsWPF:tsLayoutItem Label="Email 2:" Width="472">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Email2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Es Cliente:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding EsCliente, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="7" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="450">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Telefono1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Telefono2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Es Proveedor:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding EsProveedor, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="8" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Imprimir Albaran:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding ImprimirAlbaran, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="9" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Observaciones:" Width="1075" HorizontalAlignment="Left">
|
||||
<dxe:TextEdit EditValue="{Binding Observaciones, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="10" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Alta:" Width="230" HorizontalAlignment="Left">
|
||||
<dxe:DateEdit EditValue="{Binding FechaAlta, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="11" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Dirección" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<tsWPF:tsLayoutItem Label="Direccion:" Width="400">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Direccion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="13" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Código Postal:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ButtonEdit x:Name="beCodigoPostal" EditValue="{Binding CodigoPostal, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" DefaultButtonClick="BeCodigoPostal_DefaultButtonClick">
|
||||
<dxe:ButtonInfo GlyphKind="Cancel" x:Name="btCancelarCodigoPostal" Click="BtCancelarCodigoPostal_Click" />
|
||||
</dxe:ButtonEdit>
|
||||
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Población:" x:Name="Poblacion" Width="350">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Poblacion, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="15" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Provincia:" Width="350">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Provincia, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="16" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Datos Económicos" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Tipo de Pago:" Width="400" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipoPago" ValueMember="idEnumeracion" DisplayMember="Descripcion" EditValue="{Binding idTipoPago, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="17" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="IBAN:" Width="400">
|
||||
<dxe:TextEdit EditValue="{Binding IBAN, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" ValidateOnTextInput="False" TabIndex="18" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem Width="280" Label="Fianza Pendiente Devolución:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="20" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding FianzasPendientesDevolucion, Mode=OneWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<dx:DXTabControl Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Facturas Emitidas">
|
||||
<tsWPF:tsGridControl x:Name="gcFacturasEmitidas" TabIndex="21" SeleccionMultiple="True">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="True" ShowSearchPanelMode="Always" x:Name="tvFacturasEmitidas" ShowTotalSummary="True" ShowCheckBoxSelectorColumn="True" TabIndex="19">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="IsNull([FechaPago])" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsGridColumn FieldName="NumeroFactura" Header="Nº Factura" IsSmart="True" Width="100" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaFactura" IsSmart="True" Width="90">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="TotalBaseImponible" IsSmart="True" Width="100" Header="Base Imponible">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="TotalIVA" Header="I.V.A." IsSmart="True" Width="100">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="TotalFactura" IsSmart="True" Width="90">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaPago" IsSmart="True" Width="90">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="ImportePagado" IsSmart="True" Width="120">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="ImportePendiente" IsSmart="True" Width="120">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalIVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalIVA" SummaryType="Sum" ShowInGroupColumnFooter="TotalIVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
|
||||
|
||||
<dx:DXTabItem Header="Expediente">
|
||||
<tsWPF:tsGridControl x:Name="gcExpediente" NombreTablaBase="expedientesentidades" TabIndex="24">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<!--<tsWPF:tsTableView Name="tvExpedientes" ShowTotalSummary="False" AllowGrouping="False" ShowGroupPanel="False" CellValueChanged="valorcambiado"/>-->
|
||||
<tsWPF:tsTableView x:Name="tvExpediente" ShowTotalSummary="False" AllowGrouping="False" ShowGroupPanel="False" AutoWidth="False" NewItemRowPosition="Bottom" PreviewKeyDown="TvExpediente_PreviewKeyDown" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsGridColumn FieldName="Descripcion" Header="Descripción" Width="500">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="EsAdvertencia" Header="Mostrar en Advertencias" Width="160">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings AllowNullInput="False" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="idFicheroNavigation.NombreFichero" Header="Fichero" Width="300" x:Name="gcNombreFichero">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:ButtonEditSettings x:Name="btFichero" IsTextEditable="False">
|
||||
<dxe:ButtonEditSettings.Buttons>
|
||||
<dxe:ButtonInfo GlyphKind="Search" Click="VerDocumento" />
|
||||
</dxe:ButtonEditSettings.Buttons>
|
||||
</dxe:ButtonEditSettings>
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Fecha" Header="Fecha" Width="120" SoloLectura="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Facturas Recibidas">
|
||||
<tsWPF:tsGridControl x:Name="gcFacturasRecibidas" TabIndex="25">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="True" ShowSearchPanelMode="Always" x:Name="tvFacturasRecibidas" ShowTotalSummary="True" TabIndex="22">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="IsNull([FechaPago])" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="idFactura" Width="120" IsSmart="True" Header="Nº Registro" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="NumeroFactura" Width="150" IsSmart="True" Header="Nº Factura Proveedor" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaFactura" Header="Fecha Factura" IsSmart="True" Width="100">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="TotalFactura" HorizontalHeaderContentAlignment="Right" Width="100">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="ImportePagado" HorizontalHeaderContentAlignment="Right" Width="100">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaPago" Header="Fecha Pago" IsSmart="True" Width="100">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="ImportePendiente" HorizontalHeaderContentAlignment="Right" Width="120">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Observaciones" Width="400" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Correos">
|
||||
<tsWPF:tsGridControl x:Name="gcCorreos" TabIndex="28">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<!--<tsWPF:tsGridColumn FieldName="cuentascorreo.CuentaCorreo" Width="300" IsSmart="True"/>-->
|
||||
<tsWPF:tsGridColumn FieldName="Remitente" Width="200" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Destinatario" Width="200" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Asunto" Width="300" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="Cuerpo" Width="300" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="FicheroAdjunto" Header="Fichero Adjunto" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaCreacion" Header="Fecha Creación" Width="120" IsSmart="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaEnvio" Header="Fecha Envío" Width="140" IsSmart="True" FilterPopupMode="CheckedList">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaUltimoIntento" Header="Fecha Último Intento" Width="150" IsSmart="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaAnulacion" Header="Fecha Anulación" Width="120" IsSmart="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="FechaAvisoError" Width="120" IsSmart="True">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="MensajeError" Width="400" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="usuarios.Usuario" Width="150" Header="Usuario" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Registro de cambios">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="29">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" TabIndex="25" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridColumn FieldName="FechaHora" Header="Fecha Hora Cambio">
|
||||
<tsWPF:tsGridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</tsWPF:tsGridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Usuario" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
</dx:DXTabControl>
|
||||
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
564
GestionGrupoSanchoToro/ucEntidad.xaml.bak
Normal file
564
GestionGrupoSanchoToro/ucEntidad.xaml.bak
Normal file
@@ -0,0 +1,564 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v22.2" x:Class="ucEntidad"
|
||||
mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="RejillaAnidadaStyle" TargetType="{x:Type dxg:RowControl}">
|
||||
<Setter Property="Background" Value="#B0E0E6" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid x:Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl x:Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos Entidad" x:Name="lgDetalle" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="300" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="CIF:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" Unico="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding NIF, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="1" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Email 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Email, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup ItemLabelsAlignment="Local" Width="550" Orientation="Vertical" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="Razón Social (Apellidos, Nombre):">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit x:Name="teRazonSocial" EditValue="{Binding RazonSocial, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup dx:ScrollViewerTouchBehavior.IsEnabled="True" Serialization:SerializableItem.TypeName="LayoutGroup">
|
||||
<tsWPF:tsLayoutItem Label="Email 2:" Width="472">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Email2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Es Cliente:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding EsCliente, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="7" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" HorizontalAlignment="Left" Width="450">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 1:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Telefono1, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Teléfono 2:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Telefono2, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Es Proveedor:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding EsProveedor, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="8" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Imprimir Albaran:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:CheckEdit EditValue="{Binding ImprimirAlbaran, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="9" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Observaciones:" Width="1075" HorizontalAlignment="Left">
|
||||
<dxe:TextEdit EditValue="{Binding Observaciones, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="10" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Alta:" Width="230" HorizontalAlignment="Left">
|
||||
<dxe:DateEdit EditValue="{Binding FechaAlta, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="11" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Dirección" View="GroupBox" ItemLabelsAlignment="Default" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<tsWPF:tsLayoutItem Label="Direccion:" Width="400">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Direccion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="13" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Código Postal:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Obligatorio="True" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ButtonEdit x:Name="beCodigoPostal" EditValue="{Binding CodigoPostal, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="14" DefaultButtonClick="BeCodigoPostal_DefaultButtonClick">
|
||||
<dxe:ButtonInfo GlyphKind="Cancel" x:Name="btCancelarCodigoPostal" Click="BtCancelarCodigoPostal_Click" />
|
||||
</dxe:ButtonEdit>
|
||||
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Población:" x:Name="Poblacion" Width="350">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Poblacion, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="15" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Provincia:" Width="350">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding Provincia, Mode=OneWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="16" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Header="Datos Económicos" View="GroupBox" IsLocked="True" Width="Auto" HorizontalAlignment="Stretch">
|
||||
|
||||
<tsWPF:tsLayoutItem Label="Tipo de Pago:" Width="400" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:ComboBoxEdit x:Name="cbTipoPago" ValueMember="idEnumeracion" DisplayMember="Descripcion" EditValue="{Binding idTipoPago, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" TabIndex="17" AutoComplete="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="IBAN:" Width="400">
|
||||
<dxe:TextEdit EditValue="{Binding IBAN, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" ValidateOnTextInput="False" TabIndex="18" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsLayoutItem Width="280" Label="Fianza Pendiente Devolución:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="20" Mask="c2" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True" EditValue="{Binding FianzasPendientesDevolucion, Mode=OneWay , NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
|
||||
<dx:DXTabControl Width="Auto" HorizontalAlignment="Stretch">
|
||||
<dx:DXTabControl.View>
|
||||
<dx:TabControlScrollView />
|
||||
</dx:DXTabControl.View>
|
||||
<dx:DXTabItem Header="Facturas Emitidas">
|
||||
<tsWPF:tsGridControl x:Name="gcFacturasEmitidas" TabIndex="21" SeleccionMultiple="True">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="True" ShowSearchPanelMode="Always" x:Name="tvFacturasEmitidas" ShowTotalSummary="True" ShowCheckBoxSelectorColumn="True" TabIndex="19">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="IsNull([FechaPago])" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="NumeroFactura" Header="Nº Factura" IsSmart="True" Width="100" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="Fecha" IsSmart="True" Width="90">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="DireccionEvento" Header="Dirección Obra" Width="350" />
|
||||
<dxg:GridColumn FieldName="PoblacionEvento" Header="Población Obra" IsSmart="True" Width="300" />
|
||||
<dxg:GridColumn FieldName="ProvinciaEvento" Header="Provincia Obra" IsSmart="True" Width="150" />
|
||||
<dxg:GridColumn FieldName="TotalBaseImponible" IsSmart="True" Width="100" Header="Base Imponible">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="IVA" Header="I.V.A." IsSmart="True" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="TotalFactura" IsSmart="True" Width="90">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaPago" IsSmart="True" Width="90">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="ImportePagado" IsSmart="True" Width="120">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="ImportePendiente" IsSmart="True" Width="120">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem SummaryType="Count" DisplayFormat="Nº Facturas: {0:n0}" ShowInGroupColumnFooter="eventos.Direccion" />
|
||||
<dxg:GridSummaryItem FieldName="TotalBaseImponible" SummaryType="Sum" ShowInGroupColumnFooter="TotalBaseImponible" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="IVA" SummaryType="Sum" ShowInGroupColumnFooter="IVA" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
|
||||
<dx:DXTabItem Header="Fianzas">
|
||||
<tsWPF:tsGridControl x:Name="gcFianzas" TabIndex="22">
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idMovimiento" Width="120" IsSmart="True" Header="Nº Movimiento" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="Fecha" Header="Fecha" IsSmart="True" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="cajas.Descripcion" Width="150" IsSmart="True" Header="Caja" />
|
||||
<dxg:GridColumn FieldName="albaranes.NumeroAlbaran" Width="150" IsSmart="True" Header="Nº Albarán" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranes.Fecha" Header="Fecha Albarán" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Importe" HorizontalHeaderContentAlignment="Right" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" Width="400" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="usuarios.Usuario" Header="Usuario" Width="200" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvFianzas" ShowSearchPanelMode="Always" AllowEditing="False" ShowGroupPanel="True" ShowTotalSummary="True" ShowGroupFooters="True">
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInColumn="Importe" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInColumn="RazonSocial" DisplayFormat="Nº Movimientos: {0:n0}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInGroupColumnFooter="Importe" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" ShowInGroupColumnFooter="RazonSocial" DisplayFormat="Nº Movimientos: {0:n0}" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Obras">
|
||||
<tsWPF:tsGridControl x:Name="gcObras" NombreTablaBase="eventos" TabIndex="23">
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="True" ShowSearchPanelMode="Always" NewItemRowPosition="Bottom" x:Name="tvObras" TabIndex="20">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="Not IsNull([FechaBaja])" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="Direccion" Header="Dirección" IsSmart="True" Width="400" />
|
||||
<dxg:GridColumn FieldName="CodigoPostal" Header="Código Postal" Width="120" x:Name="gcCodigoPostal" Validate="GcCodigoPostal_Validate">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ButtonEditSettings x:Name="btCodigoPostalObra" DefaultButtonClick="BtCodigoPostalObra_DefaultButtonClick">
|
||||
</dxe:ButtonEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="CodigoMunicipio" Header="Población" IsSmart="True" Width="400">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ComboBoxEditSettings x:Name="cbPoblacionObra" ValueMember="CodigoMunicipio" DisplayMember="PoblacionYProvincia" AllowDefaultButton="False" AutoComplete="True" AllowNullInput="True">
|
||||
<dxe:ComboBoxEditSettings.Buttons>
|
||||
<dxe:ButtonInfo x:Name="biBuscarPoblacion" GlyphKind="Search" IsDefaultButton="False" Click="biBuscarPoblacion_Click" />
|
||||
</dxe:ComboBoxEditSettings.Buttons>
|
||||
</dxe:ComboBoxEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<dxg:GridColumn FieldName="PersonaContacto" IsSmart="True" Width="200" />
|
||||
<dxg:GridColumn FieldName="Telefono1" Header="Telefono 1" IsSmart="True" Width="100" />
|
||||
<dxg:GridColumn FieldName="Telefono2" Header="Telefono 2" IsSmart="True" Width="100" />
|
||||
<dxg:GridColumn FieldName="FechaAlta" IsSmart="True" Width="130" ReadOnly="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaBaja" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" IsSmart="True" Width="400" />
|
||||
<tsWPF:tsGridColumn FieldName="idDestino" Header="Nº Obra" IsSmart="True" Width="100" SoloLectura="True" />
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Expediente">
|
||||
<tsWPF:tsGridControl AutoPopulateColumns="False" x:Name="gcExpediente" NombreTablaBase="expedientesentidades" TabIndex="24">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS UsualCorreccion="True" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<!--<tsWPF:tsTableView Name="tvExpedientes" ShowTotalSummary="False" AllowGrouping="False" ShowGroupPanel="False" CellValueChanged="valorcambiado"/>-->
|
||||
<tsWPF:tsTableView x:Name="tvExpediente" ShowTotalSummary="False" AllowGrouping="False" ShowGroupPanel="False" AutoWidth="False" NewItemRowPosition="Bottom" PreviewKeyDown="TvExpediente_PreviewKeyDown" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="Descripcion" Header="Descripción" Width="500">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="EsAdvertencia" Header="Mostrar en Advertencias" Width="160">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings AllowNullInput="False" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<tsWPF:tsGridColumn FieldName="ficheros.NombreFichero" Header="Fichero" Width="300" x:Name="gcNombreFichero">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ButtonEditSettings x:Name="btFichero" IsTextEditable="False">
|
||||
<dxe:ButtonEditSettings.Buttons>
|
||||
<dxe:ButtonInfo GlyphKind="Search" Click="VerDocumento" />
|
||||
</dxe:ButtonEditSettings.Buttons>
|
||||
</dxe:ButtonEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="Fecha" Header="Fecha" Width="120" SoloLectura="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Facturas Recibidas">
|
||||
<tsWPF:tsGridControl x:Name="gcFacturasRecibidas" TabIndex="25">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="True" ShowSearchPanelMode="Always" x:Name="tvFacturasRecibidas" ShowTotalSummary="True" TabIndex="22">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="IsNull([FechaPago])" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idFactura" Width="120" IsSmart="True" Header="Nº Registro" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="NumeroFactura" Width="150" IsSmart="True" Header="Nº Factura Proveedor" />
|
||||
<dxg:GridColumn FieldName="FechaFactura" Header="Fecha Factura" IsSmart="True" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaCalculoDias" Header="Fecha Cálculo Días" IsSmart="True" Width="130" />
|
||||
|
||||
<dxg:GridColumn FieldName="TotalFactura" HorizontalHeaderContentAlignment="Right" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="ImportePagado" HorizontalHeaderContentAlignment="Right" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaPago" Header="Fecha Pago" IsSmart="True" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<dxg:GridColumn FieldName="ImportePendiente" HorizontalHeaderContentAlignment="Right" Width="120">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="c2" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Observaciones" Width="400" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalFactura" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactura" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePagado" SummaryType="Sum" ShowInGroupColumnFooter="ImportePagado" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="ImportePendiente" SummaryType="Sum" ShowInGroupColumnFooter="ImportePendiente" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem SummaryType="Count" Alignment="Right" />
|
||||
</dxg:GridControl.GroupSummary>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Productos Alquilados / Vendidos">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsLayoutItem Label="Mostrar solo Productos Alquilados Pendientes de Entrega:" FontWeight="SemiBold">
|
||||
<dxe:CheckEdit x:Name="cbSoloProductosPE" TabIndex="26" EditValueChanged="CbSoloProductosPE_EditValueChanged" IsChecked="True" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
|
||||
<tsWPF:tsGridControl x:Name="gcProductosAoV" TabIndex="27">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowSearchPanelMode="Always" ShowTotalSummary="True" x:Name="tvProductosAoV" ShowGroupFooters="True" TabIndex="23">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="Not IsNull([FechaCancelacion])" FieldName="{x:Null}">
|
||||
<dxg:Format TextDecorations="Strikethrough" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</tsWPF:tsGridControl.View>
|
||||
|
||||
<dxg:GridColumn FieldName="productos.Descripcion" Header="Producto" IsSmart="True" Width="350" CellTemplate="{DynamicResource VerDetalleTemplate}" GroupIndex="1" />
|
||||
<dxg:GridColumn FieldName="articulos.CodigoArticulo" Header="Nº Articulo" IsSmart="True" Width="100" />
|
||||
<dxg:GridColumn FieldName="Cantidad" Header="Cantidad" IsSmart="True" Width="70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="n0" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Precio" IsSmart="True" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="albaranes.NumeroAlbaran" Header="Nº Albaran Entrega" IsSmart="True" Width="120" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="albaranesrecogida.NumeroAlbaran" Header="Nº Albaran Recogida" IsSmart="True" Width="130" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="facturas.NumeroFactura" Header="Nº Ultima Factura" IsSmart="True" Width="130" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="facturas.Fecha" Header="Fecha Ultima Factura" IsSmart="True" Width="150">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="albaranes.Obra" Header="Obra" Width="400" />
|
||||
<dxg:GridColumn FieldName="EsVenta" IsSmart="True" Width="100">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="PendienteFacturarHoy" Header="Pendiente Facturar Hoy" IsSmart="True" Width="160">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="TotalFacturado" Header="TotalFacturado" IsSmart="True" Width="160">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaCancelacion" Header="Fecha Anulación" IsSmart="True" Width="130">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="Cantidad" SummaryType="Sum" ShowInGroupColumnFooter="Cantidad" DisplayFormat=" {0:n0}" />
|
||||
<dxg:GridSummaryItem FieldName="PendienteFacturarHoy" SummaryType="Sum" ShowInGroupColumnFooter="PendienteFacturarHoy" DisplayFormat=" {0:c2}" />
|
||||
<dxg:GridSummaryItem FieldName="TotalFacturado" SummaryType="Sum" ShowInGroupColumnFooter="TotalFactturado" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="TotalFacturado" SummaryType="Sum" ShowInGroupColumnFooter="TotalFacturado" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Correos">
|
||||
<tsWPF:tsGridControl x:Name="gcCorreos" TabIndex="28">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<!--<dxg:GridColumn FieldName="cuentascorreo.CuentaCorreo" Width="300" IsSmart="True"/>-->
|
||||
<dxg:GridColumn FieldName="Remitente" Width="200" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Destinatario" Width="200" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Asunto" Width="300" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Cuerpo" Width="300" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="FicheroAdjunto" Header="Fichero Adjunto" Width="300" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaCreacion" Header="Fecha Creación" Width="120" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaEnvio" Header="Fecha Envío" Width="140" IsSmart="True" FilterPopupMode="CheckedList">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaUltimoIntento" Header="Fecha Último Intento" Width="150" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaAnulacion" Header="Fecha Anulación" Width="120" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaAvisoError" Width="120" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="MensajeError" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="usuarios.Usuario" Width="150" Header="Usuario" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
<dx:DXTabItem Header="Registro de cambios">
|
||||
<dxlc:LayoutGroup Orientation="Vertical">
|
||||
<tsWPF:tsGridControl x:Name="gcLogs" TabIndex="29">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tvLogs" ShowSearchPanelMode="Default" ShowGroupPanel="False" TabIndex="25" />
|
||||
</dxg:GridControl.View>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="idLog" Header="Nº Cambio" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaHora" Header="Fecha Hora Cambio">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="DateTime" MaskUseAsDisplayFormat="True" Mask="dd/MM/yyyy HH:mm" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Usuario" Header="Usuario" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ip" Header="Dirección IP" IsSmart="True" Width="150" />
|
||||
</dxg:GridControl.Columns>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutGroup>
|
||||
</dx:DXTabItem>
|
||||
</dx:DXTabControl>
|
||||
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
684
GestionGrupoSanchoToro/ucEntidad.xaml.vb
Normal file
684
GestionGrupoSanchoToro/ucEntidad.xaml.vb
Normal file
@@ -0,0 +1,684 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.LayoutControl
|
||||
Imports tsWPFCore
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Editors.Validation
|
||||
Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports tsUtilidades.Datos
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports System.Collections
|
||||
Imports Microsoft.Win32
|
||||
Imports System.IO
|
||||
|
||||
Imports tsEFCore8.Extensiones
|
||||
Imports DevExpress.Spreadsheet
|
||||
Imports tsUtilidades.Enumeraciones
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports tsUtilidades
|
||||
|
||||
Public Class ucEntidad
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idEntidad As Nullable(Of Integer)
|
||||
|
||||
Friend idLog As Integer?
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucEntidades)
|
||||
End Sub
|
||||
|
||||
|
||||
Dim ra As entidades
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
|
||||
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
|
||||
If idLog.HasValue Then
|
||||
Try
|
||||
Dim log = bd.logs.First(Function(x) x.idLog = idLog)
|
||||
ra = tsUtilidades.Utilidades.DeserializarSinErrores(log.Log, GetType(entidades))
|
||||
If ra.idUsuarioCreador.HasValue Then ra.idUsuarioCreadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioCreador.Value)
|
||||
If ra.idUsuarioModificador.HasValue Then ra.idUsuarioModificadorNavigation = bd.usuarios.FirstOrDefault(Function(x) x.idUsuario = ra.idUsuarioModificador.Value)
|
||||
If bd.logs.Any(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "OBRAS") Then
|
||||
Dim entspol = bd.logs.First(Function(x) x.idRelacionado = log.idLog AndAlso x.Aplicacion = "OBRAS")
|
||||
Dim ld = tsUtilidades.Utilidades.deserializarsinerrores(entspol.Log, GetType(List(Of eventos)))
|
||||
For Each d In ld
|
||||
ra.eventos.Add(d)
|
||||
Next
|
||||
End If
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
Catch EX As Exception
|
||||
Throw New Exception("No ha sido posible mostrar el registro del cambio (id " & idLog.Value.ToString & ").", EX)
|
||||
End Try
|
||||
Else
|
||||
If FuerzaNuevo OrElse _idEntidad Is Nothing Then
|
||||
ra = New entidades
|
||||
ra.idEmpresa = db.Utilidades.EmpresaActual.idEmpresa
|
||||
ra.FechaAlta = DateOnly.FromDateTime(Now)
|
||||
_idEntidad = Nothing
|
||||
' ra.EsCliente = True
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.entidades.First(Function(x) x.idEntidad = _idEntidad)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
End If
|
||||
|
||||
gcFacturasEmitidas.ItemsSource = bd.facturas.Include(Function(x) x.idEventoNavigation.CodigoMunicipioNavigation.CodigoProvinciaNavigation).Include(Function(x) x.movimientoscaja).Where(Function(x) x.idCliente = ra.idEntidad).OrderByDescending(Function(x) x.FechaFactura).ThenByDescending(Function(x) x.NumeroFactura).ToList
|
||||
gcFacturasRecibidas.ItemsSource = bd.facturasrecibidas.Where(Function(x) x.idProveedor = ra.idEntidad).OrderByDescending(Function(x) x.FechaFactura).ToList
|
||||
gcExpediente.ItemsSource = ra.expedientesentidades
|
||||
Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idEntidad AndAlso x.Aplicacion = "ENTIDADES" AndAlso x.idRelacionado Is Nothing).OrderByDescending(Function(x) x.idLog).ToList
|
||||
Me.gcCorreos.ItemsSource = bd.correos.Where(Function(x) x.idEntidad = ra.idEntidad).OrderByDescending(Function(x) x.FechaCreacion).ToList
|
||||
Me.DataContext = ra
|
||||
EstableceItemsSourceProductos()
|
||||
Return NuevoEstado
|
||||
End Function
|
||||
|
||||
Private Sub EstableceItemsSourceProductos()
|
||||
'Try
|
||||
' Dim ra As entidades = Me.DataContext
|
||||
' Dim iqda = bd.detallesalbaranes.Include("productos").Include("albaranes").Include("facturas").Include("articulos").Include("albaranesrecogida").Where(Function(x) x.albaranes.idCliente = ra.idEntidad)
|
||||
' If cbSoloProductosPE.IsChecked Then
|
||||
' iqda = iqda.Where(Function(x) x.EsVenta = False AndAlso x.idAlbaranRecogida Is Nothing AndAlso x.FechaCancelacion.HasValue = False)
|
||||
' End If
|
||||
|
||||
' Dim ld = iqda.OrderByDescending(Function(x) x.albaranes.Fecha).ToList
|
||||
' gcProductosAoV.ItemsSource = ld
|
||||
' gcProductosAoV.ExpandAllGroups()
|
||||
'Catch ex As Exception
|
||||
' FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
' If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
' DXMessageBox.Show(ex.Message, "Error")
|
||||
'End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtieneBD() As ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "entidades"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
'Public Overrides ReadOnly Property CampoIndice As String
|
||||
' Get
|
||||
' Return "idEntidad"
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
'Private ReadOnly Property IAplicacion_Titulo As String Implements IAplicacion.Titulo
|
||||
' Get
|
||||
' Return "Entidad"
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If idLog.HasValue Then
|
||||
Return "Entidad. R.C.:" & idLog.ToString
|
||||
Else
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "Entidad.Nuevo"
|
||||
Else
|
||||
Return "Entidad." & DirectCast(Me.DataContext, entidades).idEntidad.ToString
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Cliente/Proveedor"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idEntidad As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idEntidad = idEntidad
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Try
|
||||
Me.cbTipoPago.ItemsSource = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "TIPP").ToList
|
||||
Dim tipdir = bd.enumeraciones.Where(Function(x) x.idGrupoEnumeracionNavigation.Grupo = "TIPDIR").ToList
|
||||
'Me.cbTarifa.ItemsSource = tsUtilidades.DescripcionValor.EnumADescripcionValor(GetType(Enums.TarifasEnum))
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "ENVIA FACTURAS SELECCIONADAS Y SUS ALBARANES POR EMAIL"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 2,
|
||||
.Descripcion = "ENVIA FACTURAS SELECCIONADAS POR EMAIL"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 3,
|
||||
.Descripcion = "GENERA EXCEL DE FACTURAS SELECCIONADAS"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 4,
|
||||
.Descripcion = "ENVIA EXCEL DE FACTURAS SELECCIONADAS POR EMAIL"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 5,
|
||||
.Descripcion = "GENERA UN PDF DE FACTURAS SELECCIONADAS"})
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 6,
|
||||
.Descripcion = "GENERA FACTURAS SELECCIONADAS Y SUS ALBARANES EN PDF"})
|
||||
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
'If Me.docpanel Is Nothing Then
|
||||
' Dim w As dxwGenerica = Window.GetWindow(Me)
|
||||
' w.Title = "Agregar nuevo Cliente/Proveedor"
|
||||
'Else
|
||||
If idLog.HasValue Then
|
||||
Dim ent As entidades = Me.DataContext
|
||||
Me.docpanel.Caption = "R.C. Cliente/Proveedor " & ent.RazonSocial
|
||||
Else
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim ent As entidades = Me.DataContext
|
||||
Me.docpanel.Caption = "Cliente/Proveedor " & ent.RazonSocial
|
||||
Me.docpanel.Tag = "Entidad." & ent.idEntidad
|
||||
Else
|
||||
Me.docpanel.Caption = "Cliente/Proveedor Nuevo"
|
||||
Me.docpanel.Tag = "Entidad.Nueva"
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub ap_ValidarControl(sender As Object, e As ValidationEventArgs, ByRef ev As ErrorValidacion, ByRef ValorOriginalCambiado As Object) Handles Me.ValidarControl
|
||||
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
Try
|
||||
If Not pts Is Nothing Then
|
||||
ErroresValidacion.EliminaError("validando-" & pts.NombreCampo)
|
||||
Dim ra As entidades = Me.DataContext
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "email"
|
||||
If e.Value IsNot Nothing AndAlso e.Value.ToString <> "" Then
|
||||
If Not e.Value.ToString.Trim.ToLower.EsEmailValido Then Throw New Exception("El email es incorrecto")
|
||||
End If
|
||||
Case "email2"
|
||||
If e.Value IsNot Nothing AndAlso e.Value.ToString <> "" Then
|
||||
If Not e.Value.ToString.Trim.ToLower.EsEmailValido Then Throw New Exception("El email es incorrecto")
|
||||
End If
|
||||
Case "nif"
|
||||
'If Not e.Value Is Nothing Then
|
||||
' Dim sDNI As String = tsUtilidades.Utilidades.CalculoLetraCif(e.Value) ' tsUtilidades.Utilidades.RecalculaNIF(e.Value)
|
||||
' If sDNI <> e.Value.ToString.ToUpper Then
|
||||
' ra.NIF = sDNI
|
||||
' ValorOriginalCambiado = sDNI
|
||||
' End If
|
||||
'End If
|
||||
Case "codigopostal"
|
||||
If Not e.Value Is Nothing AndAlso e.Value.ToString <> "" AndAlso e.Value.ToString <> ra.CodigoPostal Then
|
||||
|
||||
Dim sCpo As String = e.Value.ToString
|
||||
If sCpo.Length <> 5 Then Throw New Exception("El código postal no es correcto")
|
||||
Dim sCodigoprovincia As String = sCpo.Substring(0, 2)
|
||||
If Not bd.provincias.Any(Function(x) x.CodigoProvincia = sCodigoprovincia) Then Throw New Exception("El código postal no es correcto")
|
||||
Select Case bd.codigospostales.Where(Function(x) x.CodigoPostal = sCpo).Count
|
||||
Case 0
|
||||
Dim vncp As New dxwAgregarNuevoCodigoPostal(sCpo, bd)
|
||||
If vncp.ShowDialog Then
|
||||
Dim pob = bd.codigospostales.First(Function(x) x.CodigoPostal = sCpo)
|
||||
ra.CodigoMunicipio = pob.CodigoMunicipio
|
||||
Else
|
||||
Throw New Exception("El código postal no es correcto")
|
||||
End If
|
||||
Case 1
|
||||
Dim pob = bd.codigospostales.First(Function(x) x.CodigoPostal = sCpo)
|
||||
ra.CodigoMunicipio = pob.CodigoMunicipio
|
||||
|
||||
Case Else
|
||||
Dim wMunicipios As New dxwCodigosPostales(bd, sCpo)
|
||||
If wMunicipios.ShowDialog Then
|
||||
ra.CodigoMunicipio = wMunicipios.CodigoMunicipio
|
||||
Else
|
||||
Throw New Exception("El código postal no es correcto")
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
|
||||
Case "iban"
|
||||
' Me.ErroresValidacion.EliminaError("iban")
|
||||
If Not e.Value Is Nothing AndAlso e.Value <> "" Then
|
||||
Dim sIBAN As String = e.Value
|
||||
If sIBAN <> "" Then
|
||||
If sIBAN.Length <> 24 Then
|
||||
' e.IsValid = False
|
||||
If sIBAN.Length <> 20 Then
|
||||
Throw New Exception("La longitud del codigo IBAN debe ser 24 caracteres (o 20 y se calculará el IBAN).")
|
||||
Else
|
||||
Dim sDC As String = tsUtilidades.Bancos.Genericas.CalcularDigitoControlBancario(sIBAN.Substring(0, 4), sIBAN.Substring(4, 4), sIBAN.Substring(10, 10))
|
||||
If sDC <> sIBAN.Substring(8, 2) Then
|
||||
Throw New Exception("El dígito de control bancario es erroneo.")
|
||||
Else
|
||||
Dim sIBANCalculado As String = tsUtilidades.Bancos.Genericas.CalcularIBAN("ES", sIBAN.Substring(0, 4), sIBAN.Substring(4, 4), sIBAN.Substring(8, 2), sIBAN.Substring(10, 10))
|
||||
ra.IBAN = sIBANCalculado
|
||||
ValorOriginalCambiado = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Dim sDC As String = tsUtilidades.Bancos.Genericas.CalcularDigitoControlBancario(sIBAN.Substring(4, 4), sIBAN.Substring(8, 4), sIBAN.Substring(14, 10))
|
||||
If sDC <> sIBAN.Substring(12, 2) Then
|
||||
Throw New Exception("El dígito de control bancario es erroneo.")
|
||||
Else
|
||||
Dim sIBANCalculado As String = tsUtilidades.Bancos.Genericas.CalcularIBAN(sIBAN.Substring(0, 2), sIBAN.Substring(4, 4), sIBAN.Substring(8, 4), sIBAN.Substring(12, 2), sIBAN.Substring(14, 10))
|
||||
If sIBANCalculado.Substring(2, 2) <> sIBAN.Substring(2, 2) Then
|
||||
' e.IsValid = False
|
||||
Throw New Exception("Los digitos bancarios no son válidos.")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'Case "telefono1", "telefono2"
|
||||
' If e.Value IsNot Nothing AndAlso e.Value.ToString <> "" Then
|
||||
' Dim tlf = e.Value.ToString
|
||||
' If tlf.Length <> 9 AndAlso tlf.Length <> 11 AndAlso tlf.Length <> 12 Then
|
||||
' Throw New Exception("Nº de teléfono incorrecto")
|
||||
' Else
|
||||
' If tlf.Length = 12 AndAlso tlf.StartsWith("+") = False Then
|
||||
' Throw New Exception("Nº de teléfono incorrecto")
|
||||
' End If
|
||||
' tlf = tlf.TrimStart("+")
|
||||
' For i = 0 To tlf.Length - 1
|
||||
' If "0123456789".Contains(tlf.Substring(i, 1)) = False Then Throw New Exception("Nº de teléfono incorrecto")
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Dim sCodigoError As String = "validando-"
|
||||
If pts IsNot Nothing Then
|
||||
sCodigoError &= pts.NombreCampo
|
||||
End If
|
||||
ev = New ErrorValidacion(sCodigoError, sender, ex.Message, ex, DevExpress.XtraEditors.DXErrorProvider.ErrorType.Critical)
|
||||
e.IsValid = False
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ap_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
_idEntidad = DirectCast(Me.DataContext, entidades).idEntidad
|
||||
If docpanel IsNot Nothing Then
|
||||
'If Refrescar Then ap.RefrescaUC()
|
||||
'Refrescar = False
|
||||
Dim ra As entidades = Me.DataContext
|
||||
Me.gcLogs.ItemsSource = bd.logs.Where(Function(x) x.id = ra.idEntidad AndAlso x.Aplicacion = "ENTIDADES" AndAlso x.idRelacionado Is Nothing).OrderByDescending(Function(x) x.idLog).ToList
|
||||
Else
|
||||
Dim w = Window.GetWindow(Me)
|
||||
w.DialogResult = True
|
||||
w.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ap_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim ra As entidades = Me.DataContext
|
||||
Select Case Celda.View.Name.ToLower
|
||||
Case Else
|
||||
Select Case Celda.Column.FieldName.ToLower
|
||||
Case "idlog"
|
||||
Dim log As logs = gcLogs.CurrentItem
|
||||
Dim id As Integer = log.idLog
|
||||
Dim uc As New ucEntidad()
|
||||
uc.idLog = log.idLog
|
||||
FuncionesDinamicas.AbrirAP(uc, OtrosParametros)
|
||||
|
||||
Case "contineficheroadjunto"
|
||||
Dim correo As correos = gcCorreos.CurrentItem
|
||||
Dim sDirAleatorio As String = tsUtilidades.Utilidades.ObtieneDirectorioAleatorio("GrupoSanchoToro")
|
||||
Dim sftmp As String = sDirAleatorio & "\" & correo.idFicheroAdjuntoNavigation.NombreFichero
|
||||
tsUtilidades.Utilidades.ByteArrayAFichero(correo.idFicheroAdjuntoNavigation.Fichero, sftmp, True)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sftmp)
|
||||
Case "numerofactura"
|
||||
Dim fe As facturas = gcFacturasEmitidas.CurrentItem
|
||||
Dim id As Integer = fe.idFactura
|
||||
' Dim uc As New ucFacturaEmitida(id)
|
||||
' FuncionesDinamicas.AbrirAP(uc, OtrosParametros)
|
||||
Case "idfactura"
|
||||
Dim fe As facturasrecibidas = gcFacturasRecibidas.CurrentItem
|
||||
Dim id As Integer = fe.idFactura
|
||||
Dim uc As New ucFacturaRecibida(id)
|
||||
FuncionesDinamicas.AbrirAP(uc, OtrosParametros)
|
||||
|
||||
Case "ficheroadjunto"
|
||||
Dim co As correos = gcCorreos.CurrentItem
|
||||
Dim b() = co.idFicheroAdjuntoNavigation.Fichero
|
||||
Dim nf = tsUtilidades.Utilidades.ObtieneFicheroAleatorio(IO.Path.GetExtension(co.idFicheroAdjuntoNavigation.NombreFichero))
|
||||
IO.File.WriteAllBytes(nf, b)
|
||||
tsUtilidades.Sistema.EjecutaFichero(nf)
|
||||
End Select
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub BeCodigoPostal_DefaultButtonClick(sender As Object, e As RoutedEventArgs)
|
||||
Dim ra As entidades = Me.DataContext
|
||||
Dim dxw As New dxwCodigosPostales(bd, "")
|
||||
If dxw.ShowDialog Then
|
||||
ra.CodigoMunicipio = dxw.CodigoMunicipio
|
||||
ra.CodigoPostal = dxw.CodigoPostal
|
||||
ra.RefrescaCamposSoloLectura()
|
||||
beCodigoPostal.Text = ra.CodigoPostal
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtCancelarCodigoPostal_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim ra As entidades = Me.DataContext
|
||||
ra.CodigoMunicipio = ""
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub ap_EstadoCambiado(EstadoAnterior As tsUtilidades.EstadosAplicacion, EstadoNuevo As tsUtilidades.EstadosAplicacion) Handles Me.EstadoCambiado
|
||||
Select Case EstadoNuevo
|
||||
Case EstadosAplicacion.ModificandoRegistro
|
||||
If Me.idLog.HasValue Then
|
||||
Me.EstableceSoloLectura()
|
||||
Else
|
||||
Dim ra As entidades = Me.DataContext
|
||||
If ra.facturas.Any OrElse ra.facturasrecibidas.Any OrElse ra.presupuestos.Any Then
|
||||
Me.ContenedorAplicacion.btEliminar.IsEnabled = False
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
If idLog.HasValue Then EstableceSoloLectura()
|
||||
End Sub
|
||||
|
||||
Private Sub CbSoloProductosPE_EditValueChanged(sender As Object, e As EditValueChangedEventArgs)
|
||||
EstableceItemsSourceProductos()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub tvExpediente_ValidateRow(sender As Object, e As GridRowValidationEventArgs) Handles tvExpediente.ValidateRow
|
||||
Dim ges As expedientesentidades = gcExpediente.CurrentItem
|
||||
If ges.idUsuario.HasValue = False Then
|
||||
ges.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
End If
|
||||
End Sub
|
||||
Private Sub VerDocumento(sender As System.Object, e As System.Windows.RoutedEventArgs)
|
||||
Try
|
||||
Dim exp As expedientesentidades = gcExpediente.CurrentItem
|
||||
If exp IsNot Nothing AndAlso exp.idFicheroNavigation IsNot Nothing AndAlso exp.idFicheroNavigation.NombreFichero IsNot Nothing AndAlso exp.idFicheroNavigation.Fichero IsNot Nothing Then
|
||||
Dim sftmp As String = tsUtilidades.Utilidades.ObtieneDirectorioAleatorio("GrupoSanchoToro") & "\" & exp.idFicheroNavigation.NombreFichero
|
||||
tsUtilidades.Utilidades.ByteArrayAFichero(exp.idFicheroNavigation.Fichero, sftmp, True)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sftmp)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub Examinar(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btFichero.DefaultButtonClick
|
||||
Try
|
||||
If gcExpediente.CurrentItem Is Nothing Then tvExpediente.AddNewRow()
|
||||
Dim exp As expedientesentidades = gcExpediente.CurrentItem
|
||||
Dim ofd As New OpenFileDialog
|
||||
If ofd.ShowDialog() Then
|
||||
Dim fin As New FileInfo(ofd.FileName)
|
||||
If fin.Length > 1024 * 1024 * 50 Then
|
||||
DXMessageBox.Show("El fichero no puede ser mayor de 50 Mb", "Atención")
|
||||
Else
|
||||
Dim f() As Byte = IO.File.ReadAllBytes(ofd.FileName)
|
||||
Dim idTipoDocumentoExp = bd.enumeraciones.First(Function(x) x.Codigo = "TIPFIC.EXPENT").idEnumeracion
|
||||
If exp.idFicheroNavigation Is Nothing Then
|
||||
Dim fi As New db.ficheros
|
||||
exp.idFicheroNavigation = fi
|
||||
End If
|
||||
exp.idFicheroNavigation.NombreFichero = IO.Path.GetFileName(ofd.FileName)
|
||||
exp.idFicheroNavigation.Fichero = f
|
||||
exp.idFicheroNavigation.Fecha = Now
|
||||
exp.idFicheroNavigation.Descripcion = exp.Descripcion.Acortar(80)
|
||||
exp.idFicheroNavigation.idTipo = idTipoDocumentoExp
|
||||
exp.Fecha = Now
|
||||
Dim usu = bd.usuarios.First(Function(x) x.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
exp.idUsuario = bdGrupoSanchoToro.db.Utilidades.idUsuario
|
||||
exp.idUsuarioNavigation = usu
|
||||
tvExpediente.MoveNextCell()
|
||||
gcExpediente.RefreshRow(tvExpediente.FocusedRowHandle)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub TvExpediente_PreviewKeyDown(sender As Object, e As KeyEventArgs)
|
||||
If e.Key = Key.F6 AndAlso gcExpediente.CurrentColumn.FieldName.ToLower = "ficheros.nombrefichero" Then
|
||||
Examinar(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub tvExpediente_InitNewRow(sender As Object, e As InitNewRowEventArgs) Handles tvExpediente.InitNewRow
|
||||
gcExpediente.SetCellValue(e.RowHandle, "Fecha", Date.Today)
|
||||
End Sub
|
||||
|
||||
Private Sub ucEntidad_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
Try
|
||||
Dim ra As entidades = Me.DataContext
|
||||
Dim fras = gcFacturasEmitidas.ElementosSeleccionados.Cast(Of facturas).ToList
|
||||
If fras.Count = 0 Then
|
||||
DXMessageBox.Show("Antes debe seleccionar alguna factura emitida", "Atención")
|
||||
Else
|
||||
If fras.Any(Function(x) x.TotalIVA = 0) Then
|
||||
DXMessageBox.Show("Atención alguna de las facturas seleccionadas no tienen IVA", "Atención")
|
||||
End If
|
||||
Select Case idAccion
|
||||
Case 1, 2
|
||||
If Not Guardar(Nothing, Nothing) Then
|
||||
Dim sFacturas As String = ""
|
||||
For Each f In fras
|
||||
sFacturas &= f.NumeroFactura & vbCrLf
|
||||
Next
|
||||
Dim dxnc As dxwEnvioCorreo
|
||||
If idAccion = 2 Then
|
||||
dxnc = New dxwEnvioCorreo(ra.Email, ra.Email2.NothingAVacio, "", EmpresaActual.RazonSocial & " - Adjunto le remitimos facturas solicitadas", "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos las siguientes facturas:" & vbNewLine & sFacturas, "Facturas.zip")
|
||||
Else
|
||||
dxnc = New dxwEnvioCorreo(ra.Email, ra.Email2.NothingAVacio, "", EmpresaActual.RazonSocial & " - Adjunto le remitimos facturas y albaranes solicitados", "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos las siguientes facturas y sus albaranes relacionados:" & vbNewLine & sFacturas, "Facturas.zip")
|
||||
End If
|
||||
If dxnc.ShowDialog Then
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Generando correo, por favor espere ...")
|
||||
Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO" AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
Dim dArchivos As Dictionary(Of String, Byte()) = Nothing
|
||||
For Each fe In fras
|
||||
DXSplashScreen.SetState("Generando archivos de la factura " & fe.NumeroFactura & ", por favor espere ...")
|
||||
' ucFacturaEmitida.GeneraPdfFacturasYAlbaranes(bd, fe, idAccion = 1, dArchivos, True)
|
||||
Next
|
||||
DXSplashScreen.SetState("Comprimiendo Archivos, por favor espere ...")
|
||||
Dim bzip = tsUtilidades.zip.ComprimirArchivos(dArchivos)
|
||||
correos.GeneraRegistroCorreon(bd, dxnc._Asunto, dxnc._Cuerpo, cta, dxnc._Destinatarios, dxnc._CC, dxnc._BCC, bzip, dxnc._Adjunto, ra.idEntidad, "ENTIDAD", ra.idEntidad)
|
||||
End If
|
||||
End If
|
||||
Case 3
|
||||
Try
|
||||
Dim sfd As New SaveFileDialog
|
||||
sfd.FileName = IO.Path.GetDirectoryName("Exportacion") & ("Facturas.xlsx").Trim
|
||||
sfd.Filter = "Fichero Excel (*.xls, *.xlsx, *.csv)|*.xls;*.xlsx;*.csv"
|
||||
sfd.DefaultExt = ".xlsx"
|
||||
If sfd.ShowDialog Then
|
||||
gcFacturasEmitidas.ItemsSource = fras
|
||||
Dim ms As New MemoryStream
|
||||
Dim bFacturas As Byte() = Nothing
|
||||
Select Case IO.Path.GetExtension(sfd.FileName).ToLower
|
||||
Case ".xls"
|
||||
tvFacturasEmitidas.ExportToXls(ms)
|
||||
bFacturas = InsertaLogoEnXLSX(ms, DevExpress.Spreadsheet.DocumentFormat.Xls)
|
||||
Case ".xlsx"
|
||||
tvFacturasEmitidas.ExportToXlsx(ms)
|
||||
bFacturas = InsertaLogoEnXLSX(ms, DevExpress.Spreadsheet.DocumentFormat.Xlsx)
|
||||
Case ".csv"
|
||||
tvFacturasEmitidas.ExportToCsv(ms)
|
||||
bFacturas = InsertaLogoEnXLSX(ms, DevExpress.Spreadsheet.DocumentFormat.Csv)
|
||||
Case Else
|
||||
Throw New Exception("Formato no soportado")
|
||||
End Select
|
||||
IO.File.WriteAllBytes(sfd.FileName, bFacturas)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
Finally
|
||||
gcFacturasEmitidas.ItemsSource = ra.facturas.OrderByDescending(Function(x) x.FechaFactura).ToList
|
||||
End Try
|
||||
Case 4
|
||||
If Not Guardar(Nothing, Nothing) Then
|
||||
Try
|
||||
Dim dxnc = New dxwEnvioCorreo(ra.Email, ra.Email2.NothingAVacio, "", EmpresaActual.RazonSocial & " - Adjunto le remitimos listado de facturas solicitadas", "Distinguidos Sres., " & vbCrLf & "Adjunto le remitimos listado de facturas solicitadas", "Facturas.xlsx")
|
||||
If dxnc.ShowDialog Then
|
||||
Dim cta = bd.cuentascorreo.First(Function(x) x.Codigo = "DEFECTO" AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
gcFacturasEmitidas.ItemsSource = fras
|
||||
Dim ms As New MemoryStream
|
||||
tvFacturasEmitidas.ExportToXlsx(ms)
|
||||
Dim bFacturas = InsertaLogoEnXLSX(ms, DevExpress.Spreadsheet.DocumentFormat.Xlsx)
|
||||
gcFacturasEmitidas.ItemsSource = ra.facturas.OrderByDescending(Function(x) x.FechaFactura).ToList
|
||||
bdGrupoSanchoToro.db.correos.GeneraRegistroCorreon(bd, dxnc._Asunto, dxnc._Cuerpo, cta, dxnc._Destinatarios, dxnc._CC, dxnc._BCC, bFacturas, dxnc._Adjunto, ra.idEntidad, "ENTIDAD", ra.idEntidad)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message, ex)
|
||||
Finally
|
||||
gcFacturasEmitidas.ItemsSource = ra.facturas.OrderByDescending(Function(x) x.FechaFactura).ToList
|
||||
End Try
|
||||
End If
|
||||
Case 5
|
||||
Dim sfd As New SaveFileDialog
|
||||
sfd.FileName = "Facturas " & ra.RazonSocial.Trim & ".pdf"
|
||||
sfd.Filter = "Fichero PDF (*.pdf)|*.pdf"
|
||||
sfd.DefaultExt = ".pdf"
|
||||
If sfd.ShowDialog Then
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Generando PDF, por favor espere ...")
|
||||
Dim lfras As New List(Of Byte())
|
||||
For Each factura In fras.OrderBy(Function(x) x.NumeroFactura).ToList
|
||||
DXSplashScreen.SetState("Procesando factura " & factura.NumeroFactura & ", por favor espere ...")
|
||||
Dim ds = New List(Of facturas)
|
||||
Dim idpl As Integer
|
||||
If factura.PorcentajeIVA1 > 0 Then
|
||||
idpl = bd.plantillas.First(Function(x) x.Codigo = "FACEMI").idPlantilla
|
||||
Else
|
||||
idpl = bd.plantillas.First(Function(x) x.Codigo = "NOTENT").idPlantilla
|
||||
End If
|
||||
ds.Add(factura)
|
||||
lfras.Add(Informes.GuardaInformeEnPdf(bd, idpl, ds))
|
||||
Next
|
||||
Dim lista = lfras.Select(Function(x) New MemoryStream(x)).ToArray
|
||||
TSpdfUtils.pdf.UnePdfs(lista, sfd.FileName)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
|
||||
Case 6
|
||||
Dim sfd As New SaveFileDialog
|
||||
sfd.FileName = "Facturas y Albaranes " & ra.RazonSocial.Trim & ".pdf"
|
||||
sfd.Filter = "Fichero Pdf (*.pdf|*.pdf"
|
||||
sfd.DefaultExt = ".pdf"
|
||||
If sfd.ShowDialog Then
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Generando PDF, por favor espere ...")
|
||||
Dim dArchivos As Dictionary(Of String, Byte()) = Nothing
|
||||
For Each fe In fras
|
||||
DXSplashScreen.SetState("Generando archivos de la factura " & fe.NumeroFactura & ", por favor espere ...")
|
||||
' ucFacturaEmitida.GeneraPdfFacturasYAlbaranes(bd, fe, True, dArchivos, True)
|
||||
Next
|
||||
Dim aArchivos = dArchivos.Select(Function(x) x.Value).ToArray
|
||||
Dim lista = aArchivos.Select(Function(x) New MemoryStream(x)).ToArray
|
||||
TSpdfUtils.pdf.UnePdfs(lista, sfd.FileName)
|
||||
tsUtilidades.Sistema.EjecutaFichero(sfd.FileName)
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show("Error " & ex.Message, "Error")
|
||||
Finally
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
Private Function InsertaLogoEnXLSX(ms As MemoryStream, Formato As DevExpress.Spreadsheet.DocumentFormat) As Byte()
|
||||
ms.Position = 0
|
||||
Dim wb As New Workbook
|
||||
wb.LoadDocument(ms, Formato)
|
||||
If Formato <> DevExpress.Spreadsheet.DocumentFormat.Csv Then
|
||||
wb.Worksheets(0).Rows.Insert(0, 6)
|
||||
wb.Worksheets(0).MergeCells(wb.Worksheets(0).Range("A1:C4"))
|
||||
Dim memStream As System.IO.MemoryStream = New MemoryStream(bd.ficherosconfiguracion.First(Function(X) X.Codigo = "LOGO").Configuracion)
|
||||
Dim chartControl1ImageSource = SpreadsheetImageSource.FromStream(memStream)
|
||||
wb.Worksheets(0).Pictures.AddPicture(chartControl1ImageSource, wb.Worksheets(0).Range("A1:C4"), True)
|
||||
wb.Worksheets(0).Cells("A5").Value = "IBAN: "
|
||||
wb.Worksheets(0).Cells("A5").FillColor = System.Drawing.Color.LightGray
|
||||
wb.Worksheets(0).Cells("A5").Font.Bold = True
|
||||
wb.Worksheets(0).Cells("B5").Value = bd.cajas.FirstOrDefault(Function(X) X.FechaBaja.HasValue = False AndAlso (X.IBAN IsNot Nothing AndAlso X.IBAN <> "")).IBAN
|
||||
wb.Worksheets(0).Cells("B5").Font.Color = System.Drawing.Color.Orange
|
||||
End If
|
||||
Dim b = wb.SaveDocument(Formato)
|
||||
Return b
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub ucEntidad_CampoActualizado(sender As Object, e As DataTransferEventArgs) Handles Me.CampoActualizado
|
||||
Dim pts As PropiedadesTS = sender.parent.propiedadests
|
||||
If Not pts Is Nothing Then
|
||||
Select Case pts.NombreCampo.ToLower
|
||||
Case "codigopostal"
|
||||
ra.RefrescaCamposSoloLectura()
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ucEntidad_AntesGuardar(sender As Object, e As ItemClickEventArgs, ByRef Cancelar As Boolean, ByRef MensajesError As Hashtable, EliminacionManual As Integer) Handles Me.AntesGuardar
|
||||
Dim hte As New Hashtable
|
||||
If ra.EsCliente = False AndAlso ra.EsProveedor = False Then
|
||||
hte.Add("ALMACENAR-CLIENTE_O_PROVEEDOR_OBLIGATORIO", "Debe seleccionar al menos alguna opción de si es cliente o proveedor")
|
||||
End If
|
||||
Dim vd = New tsUtilidades.ValidarDocumentoIdentidad(ra.NIF)
|
||||
If vd.EsCorrecto = False Then
|
||||
hte.Add("ALMACENAR-NIF INCORRECTO", "El documento de identidad es inválido")
|
||||
Else
|
||||
ra.NIF = vd.ToString
|
||||
End If
|
||||
If hte.Count = 0 Then
|
||||
Dim cifexi = bd.entidades.FirstOrDefault(Function(x) x.idEntidad <> ra.idEntidad AndAlso x.NIF = ra.NIF AndAlso x.idEmpresa = EmpresaActual.idEmpresa)
|
||||
If cifexi IsNot Nothing AndAlso cifexi.RazonSocial = ra.RazonSocial Then
|
||||
hte.Add("ALMACENAR-ENTIDAD_DUPLICADA", "Entidad Duplicada")
|
||||
ElseIf cifexi IsNot Nothing Then
|
||||
If DXMessageBox.Show("Ya existe una entidad con el mismo NIF (" & cifexi.RazonSocial & ") ¿Desea añadir de todas formas ya que es una sucursal?", "Atención", MessageBoxButton.YesNo) = MessageBoxResult.No Then
|
||||
hte.Add("ALMACENAR-ENTIDAD_DUPLICADA", "Entidad Duplicada")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If hte.Count > 0 Then
|
||||
MensajesError = hte
|
||||
Cancelar = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
105
GestionGrupoSanchoToro/ucEntidades.xaml
Normal file
105
GestionGrupoSanchoToro/ucEntidades.xaml
Normal file
@@ -0,0 +1,105 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:bdGrupoSanchoToro="clr-namespace:bdGrupoSanchoToro;assembly=bdGrupoSanchoToro" x:Class="ucEntidades"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Búsqueda Rápida" Orientation="Vertical" x:Name="BusquedaRapida">
|
||||
<dxlc:LayoutGroup Width="600" HorizontalAlignment="Left">
|
||||
<tsWPF:tsLayoutItem Label="Búsqueda:" FontWeight="Bold">
|
||||
<dxe:TextEdit x:Name="teBusqueda" TabIndex="0" FontWeight="Normal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="BtBuscar_Click" IsDefault="True" TabIndex="1" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutItem Label="Campos de búsqueda:">
|
||||
<Border BorderThickness="1" BorderBrush="Black">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock x:Name="tbCamposBusqueda" Text="Razón Social, NIF, Telefono1, Telefono2, Email, Código Entidad." />
|
||||
<TextBlock Margin="20,0,0,0" Text="(En Blanco Muestra Todos)" FontWeight="Bold"></TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</dxlc:LayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="2" >
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" MayusculasMinusculas="Normal" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<tsWPF:PropiedadesTSGC />
|
||||
</tsWPF:tsGridControl.PropiedadesTSGC>
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="RazonSocial" Header="Razón Social" Width="400" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="NIF" Header="NIF" Width="90" IsSmart="True" />
|
||||
<tsWPF:tsGridColumn FieldName="EsCliente" Width="85" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<tsWPF:tsGridColumn FieldName="EsProveedor" Width="80" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:CheckEditSettings IsThreeState="False">
|
||||
</dxe:CheckEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</tsWPF:tsGridColumn>
|
||||
<dxg:GridColumn FieldName="Telefono1" Header="Teléfono 1" Width="90" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Telefono2" Header="Teléfono 2" Width="90" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Email" Header="Email" Width="200" IsSmart="True" CellTemplate="{DynamicResource eMailTemplate}" />
|
||||
<dxg:GridColumn FieldName="Direccion" Header="Dirección" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="CodigoPostal" Header="Código Postal" Width="120" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="CodigoMunicipioNavigation.Nombre" Header="Población" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="CodigoMunicipioNavigation.CodigoProvinciaNavigation.Nombre" Header="Provincia" Width="350" IsSmart="True" />
|
||||
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView x:Name="tv" ShowSearchPanelMode="Always">
|
||||
<tsWPF:tsTableView.FormatConditions>
|
||||
<dxg:FormatCondition Expression="Not IsNull([FechaBaja])" FieldName="{x:Null}">
|
||||
<dx:Format Foreground="Red" />
|
||||
</dxg:FormatCondition>
|
||||
</tsWPF:tsTableView.FormatConditions>
|
||||
</tsWPF:tsTableView>
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
|
||||
<!--<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:bdGrupoSanchoToro="clr-namespace:bdGrupoSanchoToro;assembly=bdGrupoSanchoToro" x:Class="ucEntidades" mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<tsWPF:tsGridControl x:Name="gc" >
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="RazonSocial" Header="Razón Social" Width="400" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}"/>
|
||||
<dxg:GridColumn FieldName="NIF" Header="N.I.F." Width="90" IsSmart="True"/>
|
||||
<dxg:GridColumn FieldName="Telefono1" Header="Teléfono" Width="90" IsSmart="True"/>
|
||||
<dxg:GridColumn FieldName="Email" Header="Email" Width="200" IsSmart="True"/>
|
||||
<dxg:GridColumn FieldName="direcciones1.Direccion" Header="Dirección" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="direcciones1.CodigoPostal" Header="Código Postal" Width="120" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="direcciones1.municipios.Nombre" Header="Población" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="direcciones1.municipios.provincias.Nombre" Header="Provincia" Width="350" IsSmart="True" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<tsWPF:tsTableView AllowEditing="False" SearchPanelFindMode="Always" ShowSearchPanelCloseButton="False" />
|
||||
</dxg:GridControl.View>
|
||||
</tsWPF:tsGridControl>
|
||||
</Grid>
|
||||
-->
|
||||
157
GestionGrupoSanchoToro/ucEntidades.xaml.vb
Normal file
157
GestionGrupoSanchoToro/ucEntidades.xaml.vb
Normal file
@@ -0,0 +1,157 @@
|
||||
|
||||
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro
|
||||
Imports tsUtilidades
|
||||
Imports System.Linq.Dynamic.Core
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
|
||||
Public Class ucEntidades
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Private _CamposBusquedaNumericos() As String = {"idEntidad"}
|
||||
Private _CamposBusquedaAlfabeticos() As String = {"RazonSocial", "NIF", "Telefono1", "Telefono2", "Email"}
|
||||
' Private _TextoBusqueda As String
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
ContenedorAplicacion.btGuardar.IsVisible = False
|
||||
ContenedorAplicacion.siEstado.IsVisible = False
|
||||
Me.GridSeleccion = Me.gc
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
If Background Then ObtieneEntidadesAsync(bd, Background)
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Clientes/Proveedores"
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "Entidades"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "entidades"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Clientes / Proveedores"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Function ObtieneBD() As ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Return Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", bdGrupoSanchoToro.db.Utilidades.idUsuario)
|
||||
End Function
|
||||
|
||||
Private Sub Nuevo() Handles Me.BotonNuevoPulsado
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad, OtrosParametros)
|
||||
End Sub
|
||||
|
||||
Private Sub ap_Enlazar(Celda As DevExpress.Xpf.Grid.EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
If Defecto = False AndAlso Celda.Column.FieldName.ToLower = "email" Then
|
||||
tsUtilidades.Sistema.EjecutaFichero("mailto:" & DirectCast(Me.gc.CurrentItem, entidades).Email)
|
||||
Else
|
||||
Dim id As Integer = DirectCast(Me.gc.CurrentItem, entidades).idEntidad
|
||||
FuncionesDinamicas.AbrirAP(New ucEntidad(id), OtrosParametros)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function ObtieneEntidades(ByRef DataContext As Object, BackGround As Boolean, TextoBusqueda As String) As List(Of entidades)
|
||||
Dim rs As New List(Of entidades)
|
||||
Dim iqent = bd.entidades.Where(Function(x) x.idEmpresa = EmpresaActual.idEmpresa AndAlso x.NIF IsNot Nothing AndAlso x.NIF <> "").Include(Function(x) x.CodigoMunicipioNavigation.CodigoProvinciaNavigation).AsQueryable
|
||||
If TextoBusqueda <> "" Then
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, Me._CamposBusquedaNumericos, Me._CamposBusquedaAlfabeticos, Nothing)
|
||||
iqent = iqent.Where(ExpresionBusqueda).ToList.OrderBy(Function(x) x.RazonSocial).AsQueryable
|
||||
End If
|
||||
|
||||
Dim inumExc As Integer = 0
|
||||
Do
|
||||
|
||||
Try
|
||||
rs = iqent.ToList
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
iNumExc += 1
|
||||
If iNumExc > 3 Then
|
||||
rs = Nothing
|
||||
Exit Do
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
Return rs
|
||||
End Function
|
||||
|
||||
Public Async Sub ObtieneEntidadesAsync(bd As tscGrupoSanchoToro, Background As Boolean)
|
||||
Try
|
||||
Dim rs As New List(Of entidades)
|
||||
Dim Busqueda = tsEFCore8.Extensiones.ObjetoNothingAVacio(Me.teBusqueda.EditValue)
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
rs = ObtieneEntidades(bd, Background, Busqueda)
|
||||
End Sub)
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando Entidades ...")
|
||||
rs = ObtieneEntidades(bd, Background, Busqueda)
|
||||
End If
|
||||
|
||||
gc.ItemsSource = rs
|
||||
DataContext = rs
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
Me.ContenedorAplicacion.IsEnabled = True
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BtBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtieneEntidadesAsync(bd, False)
|
||||
End Sub
|
||||
|
||||
Private Sub ucEntidades_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
teBusqueda.SelectAll()
|
||||
End Sub
|
||||
|
||||
Private Sub gc_KeyDown(sender As Object, e As KeyEventArgs) Handles gc.KeyDown
|
||||
Select Case e.Key
|
||||
Case Key.Enter, Key.Space
|
||||
If gc.CurrentItem IsNot Nothing Then ap_Enlazar(Nothing, True)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
117
GestionGrupoSanchoToro/ucExtractoBancario.xaml
Normal file
117
GestionGrupoSanchoToro/ucExtractoBancario.xaml
Normal file
@@ -0,0 +1,117 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:bdGrupoSanchoToro="clr-namespace:bdGrupoSanchoToro;assembly=bdGrupoSanchoToro" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucExtractoBancario"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid Name="contenido" HorizontalAlignment="Stretch" Width="Auto">
|
||||
<dxlc:LayoutControl Name="LayoutControl1" Orientation="Vertical">
|
||||
<dxlc:LayoutGroup Header="Datos del Extracto" x:Name="lgDatos" View="GroupBox" IsLocked="True" Orientation="Horizontal" Width="Auto" HorizontalAlignment="Stretch">
|
||||
<tsWPF:tsLayoutItem Label="Nº Extracto:" Width="200">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
|
||||
<dxe:TextEdit TabIndex="1" EditValue="{Binding idExtracto, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="340">
|
||||
<tsWPF:tsLayoutItem Label="Caja:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="2" EditValue="{Binding idCajaNavigation.Descripcion, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Usuario:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit TabIndex="3" EditValue="{Binding usuarios.Nombre, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicial:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaInicial, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" AllowNullInput="False" TabIndex="4" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Saldo Anterior:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding SaldoAnterior, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" Mask="C2" MaskType="Numeric" MaskUseAsDisplayFormat="True" TabIndex="5" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="250">
|
||||
<tsWPF:tsLayoutItem Label="Fecha Final:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaFinal, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" AllowNullInput="False" TabIndex="6" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Saldo Final:">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:TextEdit EditValue="{Binding SaldoFinal, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" Mask="C2" MaskType="Numeric" MaskUseAsDisplayFormat="True" TabIndex="7" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Lectura:" Width="250">
|
||||
<tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" UsualCorreccion="False" />
|
||||
</tsWPF:tsLayoutItem.PropiedadesTS>
|
||||
<dxe:DateEdit EditValue="{Binding FechaLectura, Mode=TwoWay, NotifyOnSourceUpdated=True, NotifyOnValidationError=true, ValidatesOnExceptions=true}" AllowNullInput="False" TabIndex="8" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dx:DXTabControl>
|
||||
<dx:DXTabItem Header="Movimientos">
|
||||
<tsWPF:tsGridControl x:Name="gcMovimientos" TabIndex="9">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="true" ShowSearchPanelMode="Always" ShowTotalSummary="True" ShowGroupFooters="True" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="Importe" IsSmart="True" Width="130" HorizontalHeaderContentAlignment="Right">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="ReferenciaBanco" Width="120" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="Detalle" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="FechaOperacion" Width="110" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaValor" Width="90" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="CodigoConcepto" Width="120" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="ConceptoPropio" Width="120" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="NumeroDocumento" Header="Nº Documento" Width="150" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="idConciliación" Header="Nº Conciliación" Width="250" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<tsWPF:tsGridControl.GroupSummary>
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInGroupColumnFooter="Importe" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.GroupSummary>
|
||||
<tsWPF:tsGridControl.TotalSummary>
|
||||
<dxg:GridSummaryItem FieldName="Importe" SummaryType="Sum" ShowInColumn="Importe" DisplayFormat=" {0:c2}" />
|
||||
</tsWPF:tsGridControl.TotalSummary>
|
||||
</tsWPF:tsGridControl>
|
||||
</dx:DXTabItem>
|
||||
</dx:DXTabControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
121
GestionGrupoSanchoToro/ucExtractoBancario.xaml.vb
Normal file
121
GestionGrupoSanchoToro/ucExtractoBancario.xaml.vb
Normal file
@@ -0,0 +1,121 @@
|
||||
Imports DevExpress.Xpf.Editors
|
||||
Imports DevExpress.Xpf.LayoutControl
|
||||
Imports tsWPFCore
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports DevExpress.Xpf.Editors.Validation
|
||||
Imports DevExpress.Xpf.Editors.Helpers
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports tsWPFCore.modExtensiones
|
||||
Imports System.Data.Common
|
||||
Imports System.Data.Entity
|
||||
Imports tsUtilidades.Datos
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports bdGrupoSanchoToro.db.tscGrupoSanchoToro
|
||||
|
||||
Public Class ucExtractoBancario
|
||||
|
||||
|
||||
Private bd As tscGrupoSanchoToro
|
||||
Friend _idExtracto As Nullable(Of Integer)
|
||||
|
||||
Public Overrides Function EstablecedcPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
|
||||
|
||||
Dim NuevoEstado As tsUtilidades.EstadosAplicacion
|
||||
Dim ra As extractosbancarios
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo OrElse _idExtracto Is Nothing OrElse FuerzaNuevo Then
|
||||
ra = New extractosbancarios
|
||||
Me.DataContext = ra
|
||||
_idExtracto = Nothing
|
||||
ra.idUsuarioNavigation = bd.usuarios.First(Function(x) x.idUsuario = idUsuario)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.Nuevo
|
||||
Else
|
||||
ra = bd.extractosbancarios.First(Function(x) x.idExtracto = _idExtracto.Value)
|
||||
NuevoEstado = tsUtilidades.EstadosAplicacion.ModificandoRegistro
|
||||
End If
|
||||
Me.DataContext = ra
|
||||
Me.gcMovimientos.ItemsSource = ra.movimientosbancarios
|
||||
|
||||
Return NuevoEstado
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "extractosbancarios"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
If Estado = tsUtilidades.EstadosAplicacion.Nuevo Then
|
||||
Return "ExtractoBancario.Nuevo"
|
||||
Else
|
||||
Return "ExtractoBancario." & DirectCast(Me.DataContext, extractosbancarios).idExtracto.ToString
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Extracto Bancario"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(Optional idExtracto As Integer? = Nothing)
|
||||
|
||||
' Llamada necesaria para el diseñador.
|
||||
InitializeComponent()
|
||||
_idExtracto = idExtracto
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
If Me.Estado = tsUtilidades.EstadosAplicacion.ModificandoRegistro Then
|
||||
Dim ext As extractosbancarios = Me.DataContext
|
||||
Me.docpanel.Caption = "Extracto Bancario " & ext.idExtracto.ToString
|
||||
Me.docpanel.Tag = "Extracto Bancario." & ext.idExtracto.ToString
|
||||
Else
|
||||
Me.docpanel.Caption = "Movimiento Bancario Nuevo"
|
||||
Me.docpanel.Tag = "Movimiento Bancario.Nuevo"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim per = Comun.ObtienePermisos(Me.bd, "AP.SUPERADMINISTRATIVOS", idUsuario)
|
||||
per.Nuevos = False
|
||||
per.Modificar = False
|
||||
Return per
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.Tipo_ucControlBusqueda = GetType(ucExtractosBancarios)
|
||||
End Sub
|
||||
|
||||
Private Sub ucExtractoBancario_DespuesGuardar(sender As Object, e As ItemClickEventArgs, OpcionGuardado As Integer) Handles Me.DespuesGuardar
|
||||
Dim ext As extractosbancarios = Me.DataContext
|
||||
_idExtracto = ext.idExtracto
|
||||
End Sub
|
||||
End Class
|
||||
81
GestionGrupoSanchoToro/ucExtractosBancarios.xaml
Normal file
81
GestionGrupoSanchoToro/ucExtractosBancarios.xaml
Normal file
@@ -0,0 +1,81 @@
|
||||
<tsWPF:tsUserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" xmlns:tsWPF="clr-namespace:tsWPFCore;assembly=tsWPFCore" xmlns:Serialization="clr-namespace:DevExpress.Xpf.LayoutControl.Serialization;assembly=DevExpress.Xpf.LayoutControl.v23.2" x:Class="ucExtractosBancarios"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366">
|
||||
<tsWPF:tsUserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/tsWPFCore;component/Plantillas.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</tsWPF:tsUserControl.Resources>
|
||||
<Grid>
|
||||
<dxlc:LayoutControl Orientation="Vertical">
|
||||
<dxlc:LayoutGroup View="GroupBox" Header="Filtros" x:Name="lgFiltrosBusquedaRapida" Width="Auto" Orientation="Vertical" HorizontalAlignment="Stretch">
|
||||
<dxlc:LayoutGroup Orientation="Vertical" Width="800" HorizontalAlignment="Left">
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Inicio:" Width="250">
|
||||
<dxe:DateEdit x:Name="deFechaInicio" TabIndex="2" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<tsWPF:tsLayoutItem Label="Fecha Fin:" Width="200">
|
||||
<dxe:DateEdit x:Name="deFechaFin" TabIndex="3" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutGroup>
|
||||
<tsWPF:tsLayoutItem Label="Búsqueda:" FontWeight="Bold">
|
||||
<dxe:TextEdit x:Name="teBusqueda" TabIndex="0" x:FieldModifier="public" FontWeight="Normal" />
|
||||
</tsWPF:tsLayoutItem>
|
||||
<Button Content="Buscar" Height="25" Width="100" x:Name="btBuscar" Click="BtBuscar_Click" IsDefault="True" TabIndex="1" />
|
||||
</dxlc:LayoutGroup>
|
||||
<dxlc:LayoutItem Label="Campos de búsqueda:" x:Name="liCamposBusqueda">
|
||||
<Border BorderThickness="1" BorderBrush="Black">
|
||||
<TextBlock x:Name="tbCamposBusqueda" Text="Nº Extracto, IBAN, Denominación Cuenta" />
|
||||
</Border>
|
||||
</dxlc:LayoutItem>
|
||||
</dxlc:LayoutGroup>
|
||||
</dxlc:LayoutGroup>
|
||||
<tsWPF:tsGridControl x:Name="gc" TabIndex="1">
|
||||
<tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:PropiedadesTS Modificable="NoModificable" />
|
||||
</tsWPF:tsGridControl.PropiedadesTS>
|
||||
<tsWPF:tsGridControl.View>
|
||||
<tsWPF:tsTableView ShowGroupPanel="true" ShowSearchPanelMode="Always" x:Name="tv" />
|
||||
</tsWPF:tsGridControl.View>
|
||||
<dxg:GridColumn FieldName="idExtracto" Header="Nº Extracto" Width="100" IsSmart="True" CellTemplate="{DynamicResource VerDetalleTemplate}" />
|
||||
<dxg:GridColumn FieldName="FechaInicial" Width="90" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaFinal" Width="90" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="FechaLectura" Width="90" IsSmart="True">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateEditSettings DisplayFormat="d" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="idCajaNavigation.Descripcion" Header="Caja" Width="400" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="idCajaNavigation.IBAN" Header="IBAN" Width="250" IsSmart="True" />
|
||||
<dxg:GridColumn FieldName="SaldoAnterior" IsSmart="True" Width="130" HorizontalHeaderContentAlignment="Right">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="SaldoFinal" IsSmart="True" Width="130" HorizontalHeaderContentAlignment="Right">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings MaskType="Numeric" Mask="c2" MaskUseAsDisplayFormat="True" HorizontalContentAlignment="Right" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
</tsWPF:tsGridControl>
|
||||
</dxlc:LayoutControl>
|
||||
</Grid>
|
||||
</tsWPF:tsUserControl>
|
||||
342
GestionGrupoSanchoToro/ucExtractosBancarios.xaml.vb
Normal file
342
GestionGrupoSanchoToro/ucExtractosBancarios.xaml.vb
Normal file
@@ -0,0 +1,342 @@
|
||||
Imports System.Data.Entity
|
||||
Imports DevExpress.Xpf.Core.ServerMode
|
||||
Imports bdGrupoSanchoToro.db
|
||||
Imports bdGrupoSanchoToro.db.Utilidades
|
||||
Imports DevExpress.Xpf.Grid
|
||||
Imports DevExpress.Xpf.Core
|
||||
Imports System.Linq.Dynamic
|
||||
Imports tsUtilidades.Datos
|
||||
Imports tsWPFCore
|
||||
Imports DevExpress.Xpf.Bars
|
||||
Imports System.IO
|
||||
Imports Microsoft.Win32
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Linq.Dynamic.Core
|
||||
Imports tsUtilidades.Enumeraciones
|
||||
|
||||
Public Class ucExtractosBancarios
|
||||
|
||||
Dim bd As tscGrupoSanchoToro
|
||||
|
||||
Public Overrides Sub EstableceTitulo()
|
||||
Me.docpanel.Caption = "Extractos Bancarios"
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides ReadOnly Property idRegistroAplicacionActual As String
|
||||
Get
|
||||
Return "ExtractosBancarios"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property DescripcionRegistro As String
|
||||
Get
|
||||
Return "Extracto Bancario"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides ReadOnly Property NombreTablaBase As String
|
||||
Get
|
||||
Return "extractosbancarios"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overrides Sub EstableceDataContextSecundarios(Optional Background As Boolean = False)
|
||||
Dim Acciones As New List(Of tsWPFCore.Accion)
|
||||
Acciones.Add(New Accion With {
|
||||
.idAccion = 1,
|
||||
.Descripcion = "LEE FICHERO DE EXTRACTO"})
|
||||
Me.ContenedorAplicacion.cbAcciones.ItemsSource = Acciones
|
||||
If Acciones.Count > 0 Then Me.ContenedorAplicacion.beAcciones.EditValue = Acciones.First.idAccion
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Sub Cargado()
|
||||
Me.HabilitarRefresco = True
|
||||
deFechaInicio.EditValue = New Date(Now.AddMonths(-6).Year, Now.AddMonths(-6).Month, 1)
|
||||
deFechaFin.EditValue = Now
|
||||
GridBusqueda = Me.gc
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Overrides Function EstableceDCPrincipal(Optional Background As Boolean = False, Optional FuerzaNuevo As Boolean = False, Optional Refrescar As Boolean = False) As tsUtilidades.EstadosAplicacion
|
||||
' ObtieneAsientosAsync(bd, Background)
|
||||
If Refrescar OrElse Background Then ObtieneExtractosAsync(bd, Background)
|
||||
Return tsUtilidades.EstadosAplicacion.AplicacionSinIndice
|
||||
End Function
|
||||
|
||||
Public Overrides Function ObtieneBD() As tsUtilidades.ItsContexto
|
||||
bd = tscGrupoSanchoToro.NuevoContexto()
|
||||
Return bd
|
||||
End Function
|
||||
|
||||
'Public Overrides Function ObtieneConexionBD() As BBDD
|
||||
' Return bdGrupoSanchoToro.db.tscGrupoSanchoToro.bdga
|
||||
'End Function
|
||||
|
||||
Public Overrides Function ObtienePermisos() As tsUtilidades.Permisos
|
||||
Dim per = Comun.ObtienePermisos(Me.bd, "AP.ADMINISTRATIVOS", idUsuario)
|
||||
per.Nuevos = False
|
||||
Return per
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' Esta llamada es exigida por el diseñador.
|
||||
InitializeComponent()
|
||||
|
||||
|
||||
|
||||
' Agregue cualquier inicialización después de la llamada a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
Public Function ObtieneExtractos(ByRef DataContext As Object, BackGround As Boolean, TextoBusqueda As String, FechaInicio As DateOnly?, FechaFin As DateOnly?) As List(Of extractosbancarios)
|
||||
Dim rs As IQueryable(Of extractosbancarios)
|
||||
Dim iNumExc As Integer = 0
|
||||
|
||||
Do
|
||||
Try
|
||||
rs = bd.extractosbancarios.Include(Function(x) x.idCajaNavigation).AsQueryable
|
||||
If TextoBusqueda <> "" Then
|
||||
|
||||
Dim ExpresionBusqueda = tsWPFCore.Utilidades.Varias.GeneraExpresionBusqueda(TextoBusqueda, {"idExtracto"}, {"idCajaNavigation.Descripcion", "idCajaNavigation.IBAN"}, Nothing)
|
||||
rs = rs.Where(ExpresionBusqueda)
|
||||
End If
|
||||
If FechaInicio.HasValue Then
|
||||
Dim fi As DateOnly = FechaInicio.Value
|
||||
rs = rs.Where(Function(x) x.FechaInicial >= fi)
|
||||
End If
|
||||
If FechaFin.HasValue Then
|
||||
Dim ff As DateOnly = FechaFin.Value
|
||||
rs = rs.Where(Function(x) x.FechaInicial < ff)
|
||||
End If
|
||||
Exit Do
|
||||
Catch ex As Exception
|
||||
iNumExc += 1
|
||||
If iNumExc > 3 Then
|
||||
rs = Nothing
|
||||
Exit Do
|
||||
End If
|
||||
End Try
|
||||
Loop
|
||||
If rs IsNot Nothing Then
|
||||
Return rs.ToList
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Async Sub ObtieneExtractosAsync(bd As tscGrupoSanchoToro, Background As Boolean)
|
||||
Try
|
||||
|
||||
|
||||
Dim rs As New List(Of extractosbancarios)
|
||||
Dim fi = If(deFechaInicio.EditValue Is Nothing, Nothing, DateOnly.FromDateTime(deFechaInicio.EditValue))
|
||||
Dim ff = If(deFechaFin.EditValue Is Nothing, Nothing, DateOnly.FromDateTime(deFechaFin.EditValue))
|
||||
|
||||
Dim Busqueda As String
|
||||
|
||||
Busqueda = Me.teBusqueda.Text.Trim
|
||||
If Background Then
|
||||
Me.ContenedorAplicacion.IsEnabled = False
|
||||
Await Task.Run(Sub()
|
||||
rs = ObtieneExtractos(bd, Background, Busqueda, fi, ff)
|
||||
End Sub)
|
||||
Else
|
||||
If DXSplashScreen.IsActive = False Then DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Buscando Extractos ...")
|
||||
rs = ObtieneExtractos(bd, Background, Busqueda, fi, ff)
|
||||
End If
|
||||
|
||||
gc.ItemsSource = rs
|
||||
DataContext = rs
|
||||
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Finally
|
||||
Me.ContenedorAplicacion.IsEnabled = True
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ApLineas_Enlazar(Celda As EditGridCellData, Defecto As Boolean) Handles Me.Enlazar
|
||||
Dim id As Integer = DirectCast(Me.gc.CurrentItem, extractosbancarios).idExtracto
|
||||
FuncionesDinamicas.AbrirAP(New ucExtractoBancario(id), OtrosParametros)
|
||||
End Sub
|
||||
|
||||
Private Sub BtBuscar_Click(sender As Object, e As RoutedEventArgs)
|
||||
ObtieneExtractosAsync(bd, False)
|
||||
End Sub
|
||||
|
||||
Private Sub ucExtractosBancarios_EjecutarAccion(sender As Object, e As ItemClickEventArgs, idAccion As Integer) Handles Me.EjecutarAccion
|
||||
Try
|
||||
Select Case idAccion
|
||||
Case 1 ' LECTURA DE FICHEROS
|
||||
Dim bdtmp = tscGrupoSanchoToro.NuevoContexto()
|
||||
Dim NumLinea As Integer
|
||||
Dim reader As TextReader = Nothing
|
||||
Try
|
||||
Dim ofd As New OpenFileDialog
|
||||
ofd.CheckPathExists = True
|
||||
ofd.Filter = "Archivos|*.*"
|
||||
If ofd.ShowDialog Then
|
||||
DXSplashScreen.Show(Of tsWPFCore.SplashScreenTecnosis)()
|
||||
DXSplashScreen.SetState("Leyendo Extractos ...")
|
||||
Dim ne As extractosbancarios = Nothing
|
||||
Dim nm As movimientosbancarios = Nothing
|
||||
reader = New StreamReader(ofd.FileName)
|
||||
Dim linea As String = reader.ReadLine
|
||||
NumLinea = 1
|
||||
Dim SaldoSumado As Double = 0
|
||||
Dim sBanco As String = ""
|
||||
Do Until linea Is Nothing
|
||||
If linea.Trim <> "" Then
|
||||
Dim Tipo As String = linea.Substring(0, 2)
|
||||
Select Case Tipo
|
||||
Case "11" 'REGISTRO DE CABECERA DE CUENTA
|
||||
linea = linea.PadRight(80, " ")
|
||||
sBanco = linea.Substring(2, 4).Trim.PadLeft(4, "0")
|
||||
Dim sOficina = linea.Substring(6, 4).Trim.PadLeft(4, "0")
|
||||
Dim sCta = linea.Substring(10, 10).Trim.PadLeft(10, "0")
|
||||
Dim sFechaInicial = linea.Substring(20, 6)
|
||||
Dim sFechaFinal = linea.Substring(26, 6)
|
||||
Dim fi As DateOnly = DateOnly.FromDateTime(tsUtilidades.Extensiones.FechaStringADate("20" & sFechaInicial))
|
||||
Dim ff As DateOnly = DateOnly.FromDateTime(tsUtilidades.Extensiones.FechaStringADate("20" & sFechaFinal))
|
||||
Dim sDoH = linea.Substring(32, 1)
|
||||
Dim sSaldoAnterior = linea.Substring(33, 14)
|
||||
Dim sDivisa = linea.Substring(47, 3)
|
||||
Dim sModalidad = linea.Substring(50, 1)
|
||||
Dim sNombreAbreviado = linea.Substring(51, 26)
|
||||
Dim sLibre = linea.Substring(77, 3)
|
||||
Dim sDC = tsUtilidades.Bancos.Genericas.CalcularDigitoControlBancario(sBanco, sOficina, sCta)
|
||||
Dim sIBAN = tsUtilidades.Bancos.Genericas.CalcularIBAN("ES", sBanco, sOficina, sDC, sCta)
|
||||
Dim cj = bd.cajas.FirstOrDefault(Function(x) x.IBAN = sIBAN)
|
||||
If cj Is Nothing Then Throw New Exception("La caja con el IBAN " & sIBAN & " no está dada de alta.")
|
||||
If bd.movimientosbancarios.Any(Function(x) x.FechaOperacion >= fi AndAlso x.FechaOperacion <= ff AndAlso x.idExtractoBancarioNavigation.idCajaNavigation.IBAN = sIBAN) Then Throw New Exception("Ya existen extractos bancarios entre las fechas de inicio y fin del fichero seleccionado")
|
||||
Dim idcaja = cj.idCaja
|
||||
|
||||
ne = New extractosbancarios
|
||||
bdtmp.extractosbancarios.Add(ne)
|
||||
With ne
|
||||
ne.idCaja = idcaja
|
||||
ne.FechaInicial = fi
|
||||
ne.FechaFinal = ff
|
||||
ne.FechaLectura = Now
|
||||
ne.SaldoAnterior = Math.Round(Double.Parse(sSaldoAnterior) / 100, 2)
|
||||
ne.idUsuario = idUsuario
|
||||
End With
|
||||
Case "22"
|
||||
linea = linea.PadRight(80, " ")
|
||||
Select Case sBanco
|
||||
Case "0182"
|
||||
Dim sLibre = linea.Substring(2, 4)
|
||||
Dim sOficina = linea.Substring(6, 4)
|
||||
Dim sFechaOperacion = linea.Substring(10, 6)
|
||||
Dim sFechaValor = linea.Substring(16, 6)
|
||||
Dim sConceptoComun = linea.Substring(22, 2)
|
||||
Dim sConceptoPropio = linea.Substring(24, 3)
|
||||
Dim sDoH = linea.Substring(27, 1)
|
||||
Dim sImporte = linea.Substring(28, 14)
|
||||
Dim sNumeroDocumento = linea.Substring(42, 10)
|
||||
Dim sReferencia1 = linea.Substring(52).Trim
|
||||
nm = New movimientosbancarios
|
||||
ne.movimientosbancarios.Add(nm)
|
||||
With nm
|
||||
.FechaOperacion = DateOnly.FromDateTime(tsUtilidades.Extensiones.FechaStringADate("20" & sFechaOperacion))
|
||||
.FechaValor = DateOnly.FromDateTime(tsUtilidades.Extensiones.FechaStringADate("20" & sFechaValor))
|
||||
.CodigoConcepto = sConceptoComun
|
||||
.ConceptoPropio = sConceptoPropio
|
||||
.Importe = Math.Round(Double.Parse(sImporte) / 100, 2) * If(sDoH = "1", -1, 1)
|
||||
SaldoSumado += .Importe
|
||||
.NumeroDocumento = sNumeroDocumento
|
||||
.Detalle = ""
|
||||
.ReferenciaBanco = sReferencia1
|
||||
End With
|
||||
|
||||
Case Else
|
||||
Dim sLibre = linea.Substring(2, 4)
|
||||
Dim sOficina = linea.Substring(6, 4)
|
||||
Dim sFechaOperacion = linea.Substring(10, 6)
|
||||
Dim sFechaValor = linea.Substring(16, 6)
|
||||
Dim sConceptoComun = linea.Substring(22, 2)
|
||||
Dim sConceptoPropio = linea.Substring(24, 3)
|
||||
Dim sDoH = linea.Substring(27, 1)
|
||||
Dim sImporte = linea.Substring(28, 14)
|
||||
Dim sNumeroDocumento = linea.Substring(42, 10)
|
||||
Dim sReferencia1 = linea.Substring(52, 12)
|
||||
Dim sReferencia2 = linea.Substring(64, 16)
|
||||
nm = New movimientosbancarios
|
||||
ne.movimientosbancarios.Add(nm)
|
||||
With nm
|
||||
.FechaOperacion = DateOnly.FromDateTime(tsUtilidades.Extensiones.FechaStringADate("20" & sFechaOperacion))
|
||||
.FechaValor = DateOnly.FromDateTime(tsUtilidades.Extensiones.FechaStringADate("20" & sFechaValor))
|
||||
.CodigoConcepto = sConceptoComun
|
||||
.ConceptoPropio = sConceptoPropio
|
||||
.Importe = Math.Round(Double.Parse(sImporte) / 100, 2) * If(sDoH = "1", -1, 1)
|
||||
SaldoSumado += .Importe
|
||||
.NumeroDocumento = sNumeroDocumento
|
||||
.Detalle = sReferencia2.Trim
|
||||
.ReferenciaBanco = sReferencia1
|
||||
End With
|
||||
End Select
|
||||
Case "23"
|
||||
Select Case sBanco
|
||||
Case "0182"
|
||||
Dim sCodigoDato = linea.Substring(2, 2)
|
||||
Dim sConcepto1 = linea.Substring(4, 38).Trim
|
||||
Dim sConcepto2 = linea.Substring(42, 38).Trim
|
||||
With nm
|
||||
.Detalle &= (" " & sConcepto1 & " " & sConcepto2).Trim
|
||||
If .Detalle = "" Then .Detalle = .ReferenciaBanco
|
||||
End With
|
||||
Case Else
|
||||
Dim sCodigoDato = linea.Substring(2, 2)
|
||||
Dim sConcepto1 = linea.Substring(4, 38).Trim
|
||||
Dim sConcepto2 = linea.Substring(42, 38).Trim
|
||||
With nm
|
||||
.Detalle &= (" " & sConcepto1 & " " & sConcepto2).Trim
|
||||
|
||||
End With
|
||||
End Select
|
||||
|
||||
Case "33"
|
||||
Dim sDoH = linea.Substring(58, 1)
|
||||
Dim sSaldoFinal = linea.Substring(59, 14)
|
||||
Dim dSaldo = Math.Round(Double.Parse(sSaldoFinal) / 100, 2) * If(sDoH = "1", -1, 1)
|
||||
ne.SaldoFinal = dSaldo
|
||||
End Select
|
||||
End If
|
||||
linea = reader.ReadLine
|
||||
NumLinea += 1
|
||||
Loop
|
||||
If Math.Round(ne.SaldoFinal, 2) <> Math.Round(ne.SaldoAnterior + SaldoSumado, 2) Then Throw New Exception("El saldo final no corresponde con las suma de los apuntes en el fichero y el saldo anterior")
|
||||
bdtmp.GuardarCambios()
|
||||
reader.Close()
|
||||
ObtieneExtractosAsync(bd, False)
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
Try
|
||||
reader.Close()
|
||||
Catch
|
||||
End Try
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
Catch ex As Exception
|
||||
If DXSplashScreen.IsActive Then DXSplashScreen.Close()
|
||||
Throw New Exception("Error en la Línea " & NumLinea.ToString & " " & ex.Message, ex)
|
||||
End Try
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
FuncionesDinamicas.ErrorNoControladoAp(Me, ex)
|
||||
DXMessageBox.Show(ex.Message, "Error")
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user