agregando dropdownlost al resguardo material

This commit is contained in:
Antonio Gonzalez
2020-01-23 12:07:11 -07:00
parent 58eed4766c
commit 2fcfdad4cd
4 changed files with 217 additions and 146 deletions

View File

@@ -41,6 +41,8 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
GetUser(context) GetUser(context)
Case "ActualizaPreP" Case "ActualizaPreP"
ActualizaPrePoliza(context) ActualizaPrePoliza(context)
Case "getpersonal"
getpersonal(context)
End Select End Select
Catch ex As Exception Catch ex As Exception
@@ -686,4 +688,50 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
#End Region #End Region
#Region "Get Personal"
Private Function getpersonal(ByVal context As HttpContext) As String
Dim retorno As String = ""
Dim DtRetorno As DataTable = Nothing
Dim usuario As Usuario = UsuarioActual(context)
Dim CveEmpresa As String
If IsNothing(usuario) Then
context.Response.Write("")
Else
CveEmpresa = usuario.CveEmpresa
Dim Name = IfNull(context.Request("Name"), "-1").ToString
Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa)
'sino existe, recarga los datos
If context.Application(AppNombre) Is Nothing Then
Dim ObjProveedores As New ClsRH
If ObjProveedores.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, usuario.CveEmpresa) Then
context.Application(AppNombre) = ObjProveedores.DtResultados
End If
ObjProveedores.Dispose()
End If
'Dim ObjProveedores As New ClsCompProveedores
'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", Name, "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa) Then
' DtRetorno = ObjProveedores.DtResultados
'End If
'ObjProveedores.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
DtRetorno = dt.FiltraParametros($"Nombre like '%{Name}%'")
End If
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CvePersonal").ColumnName = "id"
DtRetorno.Columns("Nombre").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If
Return retorno
End Function
#End Region
End Class End Class

View File

@@ -1447,9 +1447,9 @@
<Source>External</Source> <Source>External</Source>
<Value>=Parameters!QR.Value</Value> <Value>=Parameters!QR.Value</Value>
<Sizing>FitProportional</Sizing> <Sizing>FitProportional</Sizing>
<Top>3.15082in</Top> <Top>3.13693in</Top>
<Left>0.15526in</Left> <Left>0.15526in</Left>
<Height>0.95455in</Height> <Height>1.06738in</Height>
<Width>1.49755in</Width> <Width>1.49755in</Width>
<ZIndex>6</ZIndex> <ZIndex>6</ZIndex>
<Style> <Style>

View File

@@ -58,6 +58,7 @@
</div> </div>
<div class="caption uppercase" style="position: relative;"> <div class="caption uppercase" style="position: relative;">
<i class="fa fa-info-circle"></i>información del movimiento <i class="fa fa-info-circle"></i>información del movimiento
</div> </div>
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
@@ -79,26 +80,29 @@
<div class="row" id="DivPersonal" runat="server"> <div class="row" id="DivPersonal" runat="server">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Personal/Responsable: Personal/Responsable:
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="DdlPersonal" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList> <ADS:Dropdownlost runat="server" ID="DdlPersonal" CssStyle="width: 100%;" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" IncluyeTodos="false"></ADS:Dropdownlost>
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonal" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlPersonal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator> <%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonal" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlPersonal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
<div class="row" id="DivCliente" visible="false" runat="server"> <div class="row" id="DivCliente" visible="false" runat="server">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Cliente: Cliente:
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:DropDownList ID="DdlCliente" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList> <ADS:Dropdownlost runat="server" ID="DdlCliente" CssStyle="width: 100%;" DataTextField="Nombre" DataValueField="CveCliente"></ADS:Dropdownlost>
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator> <%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVCliente" Display="None" ValidationGroup="GrpGuardar" runat="server" ControlToValidate="DdlCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOCliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
<div class="row" id="DivProveedor" visible="false" runat="server"> <div class="row" id="DivProveedor" visible="false" runat="server">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Proveedor: Proveedor:
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlProveedor" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
@@ -164,6 +168,7 @@
<div class="row"> <div class="row">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Observaciones Observaciones
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox> <asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
@@ -306,7 +311,7 @@
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle magindate"> <div class="portlet-title portlet-filterT smalltitle magindate">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnVerificarExistencias" runat="server" Text="Verificar Existencias" OnClick="BtnVerificarExistencias_Click" ValidationGroup="GrpVerificarExistencias" class="btn btn-default" /> <asp:Button ID="BtnVerificarExistencias" runat="server" Text="Consultar" OnClick="BtnVerificarExistencias_Click" ValidationGroup="GrpVerificarExistencias" class="btn btn-default" />
</div> </div>
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<div class="row"> <div class="row">
@@ -326,45 +331,48 @@
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVTipo" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlTipo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Tipo''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator> <asp:RequiredFieldValidator InitialValue="-1" ID="RFVTipo" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlTipo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Tipo''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-1" style="max-width: 100px">Fecha</div> <div class="col-md-2" id="DivPersonalLiberacion" runat="server" style="max-width: 155px">Personal/Responsable</div>
<div class="col-md-2"> <div class="col-md-2" id="DivPersonalLiberacion2" runat="server">
<div style="display: inline-block; vertical-align: text-bottom;"> <ADS:Dropdownlost ID="DdlPersonalLiberacion" runat="server" CssStyle="width: 300%;" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></ADS:Dropdownlost>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;"> <%--<asp:DropDownList ID="DdlPersonalLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList>
<asp:TextBox ID="TxtFechaLiberacion" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox> <asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonalLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlPersonalLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<span class="input-group-btn "> <ajax:ValidatorCalloutExtender ID="VCEPersonalLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonalLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<asp:LinkButton ID="ImgFechaLiberacion" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaLiberacion" runat="server" TargetControlID="TxtFechaLiberacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaLiberacion" TargetControlID="TxtFechaLiberacion" PopupButtonID="ImgFechaLiberacion" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpVerificarExistencias"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpVerificarExistencias"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div> </div>
<div class="col-md-2" style="max-width: 155px" id="DivClienteLiberacion" runat="server" visible="false">Cliente</div>
<div class="col-md-2" id="DivClienteLiberacion2" runat="server" visible="false">
<ADS:Dropdownlost ID="DdlClienteLiberacion" runat="server" CssStyle="width: 300%;" DataTextField="Nombre" DataValueField="CveCliente"></ADS:Dropdownlost>
<%--<asp:DropDownList ID="DdlClienteLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList>
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVClienteLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlClienteLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOClienteLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClienteLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div>
<div class="col-md-2" style="max-width: 155px" id="DivProveedorLiberacion" runat="server" visible="false">Proveedor</div>
<div class="col-md-2" id="DivProveedorLiberacion2" runat="server" visible="false">
<ADS:Dropdownlost ID="DdlProveedorLiberacion" runat="server" CssStyle="width: 300%;" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
<%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVProveedorLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlProveedorLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Proveedor''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCOProveedorLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedorLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row"> <div class="row">
<div class="col-md-2" id="DivPersonalLiberacion" runat="server" style="max-width: 155px">Personal/Responsable</div> <div class="col-md-1" style="max-width: 100px">Fecha</div>
<div class="col-md-2" id="DivPersonalLiberacion2" runat="server"> <div class="col-md-2">
<asp:DropDownList ID="DdlPersonalLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal"></asp:DropDownList> <div style="display: inline-block; vertical-align: text-bottom;">
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVPersonalLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlPersonalLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Personal/Responsable''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<ajax:ValidatorCalloutExtender ID="VCEPersonalLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonalLiberacion" Width="350px"></ajax:ValidatorCalloutExtender> <asp:TextBox ID="TxtFechaLiberacion" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
</div> <span class="input-group-btn ">
<div class="col-md-2" style="max-width: 155px" id="DivClienteLiberacion" runat="server" visible="false">Cliente</div> <asp:LinkButton ID="ImgFechaLiberacion" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
<div class="col-md-2" id="DivClienteLiberacion2" runat="server" visible="false"> </span>
<asp:DropDownList ID="DdlClienteLiberacion" CssClass="form-control select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList> <ajax:MaskedEditExtender ID="MEEFechaLiberacion" runat="server" TargetControlID="TxtFechaLiberacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<asp:RequiredFieldValidator InitialValue="-1" ID="RFVClienteLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlClienteLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Cliente''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator> <ajax:CalendarExtender runat="server" ID="CEFechaLiberacion" TargetControlID="TxtFechaLiberacion" PopupButtonID="ImgFechaLiberacion" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<ajax:ValidatorCalloutExtender ID="VCOClienteLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClienteLiberacion" Width="350px"></ajax:ValidatorCalloutExtender> <asp:RequiredFieldValidator ID="RFVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpVerificarExistencias"></asp:RequiredFieldValidator>
</div> <asp:CompareValidator ID="CVFechaLiberacion" runat="server" ControlToValidate="TxtFechaLiberacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaLiberacion''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpVerificarExistencias"></asp:CompareValidator>
<div class="col-md-2" style="max-width: 155px" id="DivProveedorLiberacion" runat="server" visible="false">Proveedor</div> <ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
<div class="col-md-2" id="DivProveedorLiberacion2" runat="server" visible="false"> <ajax:ValidatorCalloutExtender ID="VCOFechaLiberacion2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>
<ADS:Dropdownlost ID="DdlProveedorLiberacion" runat="server" CssStyle="width: 100%;" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost> </div>
<%--<asp:RequiredFieldValidator InitialValue="-1" ID="RFVProveedorLiberacion" Display="None" ValidationGroup="GrpVerificarExistencias" runat="server" ControlToValidate="DdlProveedorLiberacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es campo <b>''Proveedor''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>--%> </div>
<%--<ajax:ValidatorCalloutExtender ID="VCOProveedorLiberacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVProveedorLiberacion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
</div> </div>
@@ -387,6 +395,7 @@
</div> </div>
<div class="caption uppercase" style="position: relative;"> <div class="caption uppercase" style="position: relative;">
<i class="fa fa-info-circle"></i>información del movimiento <i class="fa fa-info-circle"></i>información del movimiento
</div> </div>
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
@@ -423,6 +432,7 @@
<div class="row"> <div class="row">
<label class="col-md-4 truncate" style="max-width: 155px"> <label class="col-md-4 truncate" style="max-width: 155px">
Observaciones Observaciones
</label> </label>
<div class="col-md-8"> <div class="col-md-8">
<asp:TextBox ID="TxtObservacionesLiberacion" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox> <asp:TextBox ID="TxtObservacionesLiberacion" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>

View File

@@ -4,8 +4,8 @@ Option Strict On
Imports System.Data Imports System.Data
Imports Extensiones Imports Extensiones
Partial Class Inventarios_ResguardoMaterial Partial Class Inventarios_ResguardoMaterial
Inherits ClsPaginas Inherits ClsPaginas
#Region "Propiedades" #Region "Propiedades"
Public Property DtMovimientos() As DataTable Public Property DtMovimientos() As DataTable
Get Get
@@ -122,12 +122,12 @@ Partial Class Inventarios_ResguardoMaterial
Set(value As Integer) Set(value As Integer)
ViewState("TipoSeccionAlmacen") = value ViewState("TipoSeccionAlmacen") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
@@ -156,11 +156,11 @@ Partial Class Inventarios_ResguardoMaterial
Private Sub OcultarControles(CvePersonal As Integer) Private Sub OcultarControles(CvePersonal As Integer)
DdlPersonal.SelectedValueExist(CvePersonal) DdlPersonal.ddl.SelectedValueExist(CvePersonal)
DdlPersonal.Enabled = False DdlPersonal.Enabled = False
DVTipo.Visible = False DVTipo.Visible = False
End Sub End Sub
#Region " INICIALIZA VALORES " #Region " INICIALIZA VALORES "
Private Sub InicializaValores() Private Sub InicializaValores()
CreaDT() CreaDT()
@@ -213,21 +213,25 @@ Partial Class Inventarios_ResguardoMaterial
End Sub End Sub
Private Sub CargaCombos() Private Sub CargaCombos()
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonal.setEsWebService(True)
DdlPersonal.DataBind() DdlPersonal.Attributes.Add("data-metodo", "getpersonal")
DdlPersonal.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlPersonal.SelectedValue = "-1"
DdlPersonal.SelectedText = "Seleccione"
DdlPersonalLiberacion.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonalLiberacion.setEsWebService(True)
DdlPersonalLiberacion.DataBind() DdlPersonalLiberacion.Attributes.Add("data-metodo", "getpersonal")
DdlPersonalLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlPersonalLiberacion.SelectedValue = "-1"
DdlPersonalLiberacion.SelectedText = "Seleccione"
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) DdlCliente.setEsWebService(True)
DdlCliente.DataBind() DdlCliente.Attributes.Add("data-metodo", "getcliente")
DdlCliente.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCliente.SelectedValue = "-1"
DdlCliente.SelectedText = "Seleccione"
DdlClienteLiberacion.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) DdlClienteLiberacion.setEsWebService(True)
DdlClienteLiberacion.DataBind() DdlClienteLiberacion.Attributes.Add("data-metodo", "getcliente")
DdlClienteLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClienteLiberacion.SelectedValue = "-1"
DdlClienteLiberacion.SelectedText = "Seleccione"
DdlProveedor.setEsWebService(True) DdlProveedor.setEsWebService(True)
DdlProveedor.Attributes.Add("data-metodo", "getproveedores") DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
@@ -304,14 +308,14 @@ Partial Class Inventarios_ResguardoMaterial
End Sub End Sub
Private Function isWhitFamily() As Boolean Private Function isWhitFamily() As Boolean
Return (UsuarioActual.CveEmpresa = 66) Return (UsuarioActual.CveEmpresa = 66)
End Function End Function
#End Region #End Region
#Region " RESGUARDO " #Region " RESGUARDO "
#Region " FUNCIONALIDAD 105 - CLASIFICACION PS" #Region " FUNCIONALIDAD 105 - CLASIFICACION PS"
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
CargaProductosPorClasificacion() CargaProductosPorClasificacion()
@@ -371,21 +375,21 @@ Partial Class Inventarios_ResguardoMaterial
DdlUnidad.DataBind() DdlUnidad.DataBind()
UPDatos.Update() UPDatos.Update()
End Sub End Sub
#End Region #End Region
#Region " EISTENCIAS " #Region " EISTENCIAS "
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1") As Double Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1") As Double
Dim Inv As New ClsInventarios Dim Inv As New ClsInventarios
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote) Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote)
Inv.Dispose() Inv.Dispose()
Return Existencia Return Existencia
End Function End Function
#End Region #End Region
#Region " AGREGAR " #Region " AGREGAR "
Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
AgregaProducto() AgregaProducto()
@@ -443,10 +447,10 @@ Partial Class Inventarios_ResguardoMaterial
DdlClasificacion.SelectedValue = "-1" DdlClasificacion.SelectedValue = "-1"
txtCantidad.Text = "" txtCantidad.Text = ""
TxtObservacionesdetalle.Text = "" TxtObservacionesdetalle.Text = ""
End Sub End Sub
#End Region #End Region
#Region " GvM " #Region " GvM "
Private Sub CargaGvM() Private Sub CargaGvM()
@@ -483,10 +487,10 @@ Partial Class Inventarios_ResguardoMaterial
e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen" e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region " NUEVO " #Region " NUEVO "
Protected Sub BtnNuevo_Click(sender As Object, e As EventArgs) Protected Sub BtnNuevo_Click(sender As Object, e As EventArgs)
LimpiarMovimiento() LimpiarMovimiento()
@@ -503,20 +507,20 @@ Partial Class Inventarios_ResguardoMaterial
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = Now.ToShortDateString
DdlPersonal.SelectedIndex = 0 DdlPersonal.ddl.SelectedIndex = 0
LimpiarAgregar() LimpiarAgregar()
UPDatos.Update() UPDatos.Update()
UpGenerales.Update() UpGenerales.Update()
End Sub End Sub
#End Region #End Region
#End Region #End Region
#Region " LIBERACION " #Region " LIBERACION "
#Region " GV DATOS LIBERACION " #Region " GV DATOS LIBERACION "
Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Protected Sub GvMLiberacion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -529,12 +533,12 @@ Partial Class Inventarios_ResguardoMaterial
Dim Index = e.Row.RowIndex Dim Index = e.Row.RowIndex
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onKeyUp", String.Format("ValidarCantidad({0});", Index)) e.Row.FCTextBox("TxtCantidad").Attributes.Add("onKeyUp", String.Format("ValidarCantidad({0});", Index))
End If End If
End Sub End Sub
#End Region #End Region
#Region " CARGA RESGUARDOS PARA LIBERACION " #Region " CARGA RESGUARDOS PARA LIBERACION "
Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs) Protected Sub BtnVerificarExistencias_Click(sender As Object, e As EventArgs)
If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then If Not DdlProveedorLiberacion.SelectedValue.ToEntero > 0 AndAlso DdlTipo.SelectedValue.ToEntero = 3 Then
Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia) Alert("Tiene que seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
@@ -572,7 +576,7 @@ Partial Class Inventarios_ResguardoMaterial
CargaGvMLiberacion() CargaGvMLiberacion()
If DdlPersonalLiberacion.SelectedValue.ToEntero <> -1 Then If DdlPersonalLiberacion.SelectedValue.ToEntero <> -1 Then
LblTipo.InnerText = "Personal/Responsable:" LblTipo.InnerText = "Personal/Responsable:"
LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedItem.Text LbTipoLiberacion.Text = DdlPersonalLiberacion.SelectedText
End If End If
If DdlProveedorLiberacion.SelectedValue.ToEntero <> -1 Then If DdlProveedorLiberacion.SelectedValue.ToEntero <> -1 Then
LblTipo.InnerText = "Proveedor:" LblTipo.InnerText = "Proveedor:"
@@ -580,7 +584,7 @@ Partial Class Inventarios_ResguardoMaterial
End If End If
If DdlClienteLiberacion.SelectedValue.ToEntero <> -1 Then If DdlClienteLiberacion.SelectedValue.ToEntero <> -1 Then
LblTipo.InnerText = "Cliente:" LblTipo.InnerText = "Cliente:"
LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedItem.Text LbTipoLiberacion.Text = DdlClienteLiberacion.SelectedText
End If End If
CvePersonalLiberacion = DdlPersonalLiberacion.SelectedValue.ToEntero CvePersonalLiberacion = DdlPersonalLiberacion.SelectedValue.ToEntero
CveClienteLiberacion = DdlClienteLiberacion.SelectedValue.ToEntero CveClienteLiberacion = DdlClienteLiberacion.SelectedValue.ToEntero
@@ -613,10 +617,10 @@ Partial Class Inventarios_ResguardoMaterial
GvMLiberacion.DataSource = DtMovimientosLiberacion GvMLiberacion.DataSource = DtMovimientosLiberacion
GvMLiberacion.DataBind() GvMLiberacion.DataBind()
UpGridLiberacion.Update() UpGridLiberacion.Update()
End Sub End Sub
#End Region #End Region
#Region " LIMPIAR LIBERACION " #Region " LIMPIAR LIBERACION "
Private Sub LimpiarLiberacion() Private Sub LimpiarLiberacion()
LbTipoLiberacion.Text = "" LbTipoLiberacion.Text = ""
@@ -638,14 +642,14 @@ Partial Class Inventarios_ResguardoMaterial
CargaGvMLiberacion() CargaGvMLiberacion()
UpGeneralesLibreacion.Update() UpGeneralesLibreacion.Update()
End Sub End Sub
#End Region #End Region
#End Region #End Region
#Region " GUARDAR " #Region " GUARDAR "
Protected Sub BtnGuardarResguardo_Click(sender As Object, e As EventArgs) Handles BtnGuardarResguardo.Click Protected Sub BtnGuardarResguardo_Click(sender As Object, e As EventArgs) Handles BtnGuardarResguardo.Click
@@ -963,17 +967,26 @@ Partial Class Inventarios_ResguardoMaterial
DivCliente.Visible = False DivCliente.Visible = False
DivPersonal.Visible = False DivPersonal.Visible = False
DivProveedor.Visible = False DivProveedor.Visible = False
If RbTipoCliente.Checked Then DivCliente.Visible = True If RbTipoCliente.Checked Then
If RbTipoPersonal.Checked Then DivPersonal.Visible = True DivCliente.Visible = True
If RbTipoProveedor.Checked Then DivProveedor.Visible = True 'DdlPersonal.Attributes.Add("data-metodo", "getcliente")
End If
If RbTipoPersonal.Checked Then
DivPersonal.Visible = True
'DdlPersonal.Attributes.Add("data-metodo", "getpersonal")
End If
If RbTipoProveedor.Checked Then
DivProveedor.Visible = True
'DdlPersonal.Attributes.Add("data-metodo", "getproveedores")
End If
UpGenerales.Update() UpGenerales.Update()
End Sub End Sub
Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipo_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlPersonalLiberacion.SelectedIndex = 0 'DdlPersonalLiberacion.ddl.SelectedIndex = 0
DdlProveedorLiberacion.SelectedValue = "-1" 'DdlProveedorLiberacion.SelectedValue = "-1"
DdlProveedorLiberacion.SelectedText = "Seleccione" 'DdlProveedorLiberacion.SelectedText = "Seleccione"
DdlClienteLiberacion.SelectedIndex = 0 'DdlClienteLiberacion.SelectedValue = "0"
DivPersonalLiberacion.Visible = False DivPersonalLiberacion.Visible = False
DivPersonalLiberacion2.Visible = False DivPersonalLiberacion2.Visible = False
DivClienteLiberacion.Visible = False DivClienteLiberacion.Visible = False
@@ -993,10 +1006,10 @@ Partial Class Inventarios_ResguardoMaterial
DivProveedorLiberacion2.Visible = True DivProveedorLiberacion2.Visible = True
End If End If
UpFiltraLiberacion.Update() UpFiltraLiberacion.Update()
End Sub End Sub
#End Region #End Region
#Region "SECCION ALMACEN" #Region "SECCION ALMACEN"
Private Sub CreaDtSeccionAlmacen() Private Sub CreaDtSeccionAlmacen()
DtSeccionAlmacen = New DataTable DtSeccionAlmacen = New DataTable
@@ -1100,9 +1113,9 @@ Partial Class Inventarios_ResguardoMaterial
DdlAlmacen.Enabled = True DdlAlmacen.Enabled = True
DdlAlmacen.ToolTip = "" DdlAlmacen.ToolTip = ""
End If End If
UpGenerales.Update() UpGenerales.Update()
ElseIf TipoSeccionAlmacen = 2 Then ElseIf TipoSeccionAlmacen = 2 Then
If CantidadTotalSeccion > 0 Then If CantidadTotalSeccion > 0 Then
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen" GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen"
@@ -1172,32 +1185,32 @@ Partial Class Inventarios_ResguardoMaterial
DtSeccionAlmacen.Rows.RemoveAt(Index) DtSeccionAlmacen.Rows.RemoveAt(Index)
DtSeccionAlmacen.AcceptChanges() DtSeccionAlmacen.AcceptChanges()
CargaSeccionAlmacen() CargaSeccionAlmacen()
End Sub End Sub
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs) 'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
' If Not CveVentaSurtir > 0 Then ' If Not CveVentaSurtir > 0 Then
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia) ' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
' Exit Sub ' Exit Sub
' End If ' End If
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then ' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia) ' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
' Exit Sub ' Exit Sub
' End If ' End If
' Dim ObjInv As New ClsInventarios ' Dim ObjInv As New ClsInventarios
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then ' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados ' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
' End If ' End If
' ObjInv.Dispose() ' ObjInv.Dispose()
' GvVerSeccionesAlmacen.DataBind() ' GvVerSeccionesAlmacen.DataBind()
' UpVerSeccionesAlmacen.Update() ' UpVerSeccionesAlmacen.Update()
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()") ' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
'End Sub 'End Sub
#End Region #End Region
End Class End Class