Correcion en validaciones y servicio a domicilio

This commit is contained in:
2022-01-11 17:38:47 -07:00
parent 4ed08910cd
commit b700371095
2 changed files with 368 additions and 255 deletions

View File

@@ -494,7 +494,7 @@
<tr align="left" id="TrServicioDomicilio" runat="server" visible="false"> <tr align="left" id="TrServicioDomicilio" runat="server" visible="false">
<td><b>Servicio a Domicilio:</b>&nbsp;</td> <td><b>Servicio a Domicilio:</b>&nbsp;</td>
<td> <td>
<asp:CheckBox ID="ChkServicioDomicilio" runat="server" CssClass="make-switchsd" data-size="small" Text="" ClientIDMode="Static" /> <asp:CheckBox ID="ChkServicioDomicilio" runat="server" AutoPostBack="true" OnCheckedChanged="ChkServicioDomicilio_CheckedChanged" />
</td> </td>
</tr> </tr>
</table> </table>
@@ -928,7 +928,7 @@
</div> </div>
<div class=" col-sm-8"> <div class=" col-sm-8">
<div class="Widthall" style="overflow-x: auto;"> <div class="Widthall" style="overflow-x: auto;">
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Origen,CvePS" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None"> <asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Consec,Origen,CodigoPS,CvePS,Serie,AplicaSerie" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
@@ -2790,14 +2790,15 @@
<div class="col-md-4"> <div class="col-md-4">
<label>Año:</label> <label>Año:</label>
<br /> <br />
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" ></asp:TextBox>
<asp:CustomValidator ID="CVAnio" runat="server" ClientValidationFunction="ValidaAnioVehiculo" ValidateEmptyText="true" ControlToValidate="TxtAnioVehiculo" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<label>Usado:</label> <label>Usado:</label>
<br /> <br />
<asp:DropDownList ID="DdlRecepcionUsados" CssClass="form-control input-sm select2me" runat="server" CausesValidation="true" DataTextField="CodigoPS" DataValueField="CvePSCargo" Width="100%" OnSelectedIndexChanged="DdlRecepcionUsados_SelectedIndexChanged" AutoPostBack="true"> <asp:DropDownList ID="DdlRecepcionUsados" CssClass="form-control input-sm select2me" runat="server" DataTextField="CodigoPS" DataValueField="CvePSCargo" Width="100%" OnSelectedIndexChanged="DdlRecepcionUsados_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@@ -2813,6 +2814,7 @@
<asp:DropDownList ID="DdlMarcaUsado" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarcaUsado" Width="100%"> <asp:DropDownList ID="DdlMarcaUsado" CssClass="form-control input-sm select2me" runat="server" DataTextField="Marca" DataValueField="CveMarcaUsado" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione la Marca" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione la Marca" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:CustomValidator ID="RFVMarcaUsado" runat="server" ClientValidationFunction="ValidaMarcaUsado" ControlToValidate="DdlMarcaUsado" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
<label for="<%= DdlMarcaUsado.ClientID.ToString()%>">Marca:</label> <label for="<%= DdlMarcaUsado.ClientID.ToString()%>">Marca:</label>
</div> </div>
</div> </div>
@@ -2969,6 +2971,8 @@
<asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true"> <asp:DropDownList ID="DdlBCIAjuste" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="BCI" DataValueField="CveBCIUsado" Width="100%" AutoPostBack="true">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label> <label for="<%= DdlBCIAjuste.ClientID.ToString()%>">BCI:</label>
<asp:RequiredFieldValidator ID="RFVBCIAjuste" runat="server" ControlToValidate="DdlBCIAjuste" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''BCI''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEBCIAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVBCIAjuste" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@@ -3135,8 +3139,7 @@
<div class="modal-footer"> <div class="modal-footer">
<asp:UpdatePanel ID="UpAgregar" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAgregar" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<%-- <asp:Button ID="BtnCalculaMesesUso" Text="" OnClick="BtnCalculaMesesUso_Click" ClientIDMode="Static" Style="display: none;" runat="server" />--%> <asp:Button ID="LnkAgregarPS" OnClick="LnkAgregarPS_Click" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" />
<asp:Button ClientIDMode="Static" ID="LnkAgregarPS" OnClick="LnkAgregarPS_Click" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpAddVenta" UseSubmitBehavior="false" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -3176,6 +3179,26 @@
} }
}); });
function ValidaMarcaUsado(val, args) {
//VALIDA SOLO SI SE SELECCIONO UN USADO
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
if (cveUsado > 0) {
args.IsValid = (ToDouble(args.Value) > 0);
} else {
args.IsValid = true;
}
}
function ValidaAnioVehiculo(val, args) {
//VALIDA SOLO SI SE SELECCIONO UN USADO
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
if (cveUsado > 0) {
args.IsValid = (ToDouble(args.Value) > 0);
} else {
args.IsValid = true;
}
}
function ValidarCodigoEnsamble(source, arguments) { function ValidarCodigoEnsamble(source, arguments) {
let CveMarca = HdnPSAjusteMarca.value; let CveMarca = HdnPSAjusteMarca.value;
let CveClasificacion = HdnPSAjusteClasificacion.value; let CveClasificacion = HdnPSAjusteClasificacion.value;

View File

@@ -3067,7 +3067,7 @@ Partial Class PV
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'SERIE ALMACEN 'SERIE ALMACEN
If e.Row.DBCampo("CveTipoInvPS").ToEntero = 5 Then If e.Row.DBCampo("CveTipoInvPS").ToEntero = 5 OrElse CBool(e.Row.DBCampo("AplicaSerie")) Then
If CveVenta > 0 Then If CveVenta > 0 Then
e.Row.FCLiteral("LtlSerie").Visible = True e.Row.FCLiteral("LtlSerie").Visible = True
Else Else
@@ -3198,6 +3198,27 @@ Partial Class PV
Exit Sub Exit Sub
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso ddlAlmacen.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar un almacen de servicio a domicilio.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) <= 0 Then
Alert("Debe tener producto seleccionados para servicio a domicilio.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
For Each GvRow As GridViewRow In GvInv.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If String.IsNullOrEmpty(GvRow.FCTextBox("TxtSerie").Text.Trim) AndAlso CBool(GvRow.DataKey("AplicaSerie")) Then
Alert(String.Format("El producto {0} requiere serie.", GvRow.DataKey("CodigoPS")), TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Next
End If
'VALIDA PRECIO AL AGREGAR A ALMACEN 'VALIDA PRECIO AL AGREGAR A ALMACEN
If Not UsuarioActual.TienePermisoProceso(169) Then If Not UsuarioActual.TienePermisoProceso(169) Then
If Not CveContrato > 0 Then If Not CveContrato > 0 Then
@@ -3463,7 +3484,7 @@ Partial Class PV
#Region "OBJETO VENTA" #Region "OBJETO VENTA"
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False) Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False)
Try
If Me.CveVenta > 0 Then If Me.CveVenta > 0 Then
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False) ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
Else Else
@@ -3692,8 +3713,21 @@ Partial Class PV
'INCRUSTAMOS ALMACEN ENTREGA POR ADELANTADO CUANDO SEA REMISION Y NO TRAIGA ASIGNADO POR EL USUARIO 'INCRUSTAMOS ALMACEN ENTREGA POR ADELANTADO CUANDO SEA REMISION Y NO TRAIGA ASIGNADO POR EL USUARIO
If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then
If ObjFactura.ServicioDomicilio Then If ObjFactura.ServicioDomicilio Then
ObjFactura.CveAlmacenServicioDomicilio = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero ObjFactura.CveAlmacenServicioDomicilio = ddlAlmacen.SelectedValue.ToEntero() 'GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
ObjFactura.DtInventario = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
'PREPARA DT INVENTARIO
Dim DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
For Each GvRow As GridViewRow In GvInv.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
Dim filtro = DtInv.Select(String.Format("CvePS = {0} AND Consec = {1}", GvRow.DataKey("CvePS"), GvRow.DataKey("Consec")))
If filtro IsNot Nothing AndAlso filtro.Length > 0 Then
Dim Row = filtro(0)
Row("Serie") = GvRow.FCTextBox("TxtSerie").Text.Trim
End If
End If
Next
ObjFactura.DtInventario = DtInv
End If End If
ObjFactura.CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero ObjFactura.CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
@@ -3711,7 +3745,13 @@ Partial Class PV
End If End If
End If End If
Catch ex As Exception
OnError("Ocurrió un error al generar la venta", ex)
If ObjFactura IsNot Nothing Then
ObjFactura.Dispose()
ObjFactura = Nothing
End If
End Try
End Sub End Sub
#End Region #End Region
@@ -4133,6 +4173,8 @@ Partial Class PV
CambiaSucursal() CambiaSucursal()
End If End If
ObjSubProyectos.Dispose() ObjSubProyectos.Dispose()
ChkServicioDomicilio_CheckedChanged(ChkServicioDomicilio, EventArgs.Empty)
End Sub End Sub
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoComprobante.SelectedIndexChanged Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoComprobante.SelectedIndexChanged
CambiaTipoComprobante() CambiaTipoComprobante()
@@ -4310,6 +4352,8 @@ Partial Class PV
TmpDT.Columns.Add("EliminarDB", GetType(Boolean)) TmpDT.Columns.Add("EliminarDB", GetType(Boolean))
TmpDT.Columns("EliminarDB").DefaultValue = False TmpDT.Columns("EliminarDB").DefaultValue = False
TmpDT.Columns.Add("AplicaSerie", GetType(Boolean))
End Sub End Sub
Private Sub CreaDTmpC() Private Sub CreaDTmpC()
@@ -4346,6 +4390,8 @@ Partial Class PV
Exit Sub Exit Sub
End If End If
Dim AplicaSerie = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("AplicaSerie"))
If TmpDT.FiltraParametros("AsientoContableVentas <> '" & AsientoContableVentas.ToString & "'").Rows.Count = 0 Then If TmpDT.FiltraParametros("AsientoContableVentas <> '" & AsientoContableVentas.ToString & "'").Rows.Count = 0 Then
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
Row = TmpDT.NewRow() Row = TmpDT.NewRow()
@@ -4380,6 +4426,7 @@ Partial Class PV
Row("SubProyecto") = SubProyecto Row("SubProyecto") = SubProyecto
Row("Serie") = Serie Row("Serie") = Serie
Row("TiempoEntrega") = TiempoEntrega Row("TiempoEntrega") = TiempoEntrega
Row("AplicaSerie") = AplicaSerie
TmpDT.Rows.Add(Row) TmpDT.Rows.Add(Row)
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False") GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
@@ -4596,6 +4643,7 @@ Partial Class PV
End If End If
End If End If
TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento
If Modalidad = "A" Then If Modalidad = "A" Then
@@ -4671,6 +4719,7 @@ Partial Class PV
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2 Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
Row("CuentaPredial") = CuentaPredial Row("CuentaPredial") = CuentaPredial
Row("EsCargo") = EsCargo Row("EsCargo") = EsCargo
Row("AplicaSerie") = DrPS("AplicaSerie")
If EsCargo AndAlso ConsecPSPadre >= 0 Then If EsCargo AndAlso ConsecPSPadre >= 0 Then
Row("ConsecPSPadre") = ConsecPSPadre Row("ConsecPSPadre") = ConsecPSPadre
@@ -5036,6 +5085,8 @@ Partial Class PV
End If End If
End If End If
Me.CveVentaDetalle = -1 Me.CveVentaDetalle = -1
UpAgregar.Update()
End Sub End Sub
Private Function AgregarPS() As Boolean Private Function AgregarPS() As Boolean
Dim CveVentaDetalle As Integer = Me.CveVentaDetalle Dim CveVentaDetalle As Integer = Me.CveVentaDetalle
@@ -5278,6 +5329,8 @@ Partial Class PV
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2") DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
CargaGVInv(DtInv) CargaGVInv(DtInv)
ChkServicioDomicilio_CheckedChanged(ChkServicioDomicilio, EventArgs.Empty)
UpContado.Update() UpContado.Update()
UpPS.Update() UpPS.Update()
RegistraScript("BorraDescuentos();", "BorraDescuentos") RegistraScript("BorraDescuentos();", "BorraDescuentos")
@@ -5864,24 +5917,23 @@ Partial Class PV
Dim Index = Row.RowIndex Dim Index = Row.RowIndex
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
Dim Existencia = ObjInventarios.GetExistenciasPSSerie("", ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Dim Existencia = ObjInventarios.GetExistenciasPSSerie(Row.FCTextBox("TxtSerie").Text.ToString.Trim, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
Dim ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Row.FCTextBox("TxtSerie").Text.ToString)) ObjInventarios.Dispose()
'Valida Existencia 'Valida Existencia
If Existencia - ExistenciaActual <= 0 Then If Existencia <= 0 Then
Alert(String.Format("Not hay existencia suficiente del producto con la Serie: <b>{0}</b>. Por favor rectifique y vuelva a intentar", Row.FCTextBox("TxtSerie").Text.ToString), TipoMensaje.MsgAdvertencia) Alert(String.Format("Not hay existencia suficiente del producto con la Serie: <b>{0}</b>. Por favor rectifique y vuelva a intentar", Row.FCTextBox("TxtSerie").Text.ToString), TipoMensaje.MsgAdvertencia)
Row.FCTextBox("TxtSerie").Text = "" Row.FCTextBox("TxtSerie").Text = ""
Row.FCHiddenField("HdnSerie").Value = "" Row.FCHiddenField("HdnSerie").Value = ""
TmpDT.Rows(Index)("Serie") = "" DtInv.Rows(Index)("Serie") = ""
Else Else
Row.FCHiddenField("HdnSerie").Value = Row.FCTextBox("TxtSerie").Text Row.FCHiddenField("HdnSerie").Value = Row.FCTextBox("TxtSerie").Text
TmpDT.Rows(Index)("Serie") = Row.FCTextBox("TxtSerie").Text DtInv.Rows(Index)("Serie") = Row.FCTextBox("TxtSerie").Text
End If End If
TmpDT.AcceptChanges() DtInv.AcceptChanges()
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
ObjInventarios.Dispose()
End Sub End Sub
Private Function ValidaSerieINV() As Boolean Private Function ValidaSerieINV() As Boolean
@@ -7804,11 +7856,49 @@ Partial Class PV
Response.Redirect($"~/Ventas/PV.aspx") Response.Redirect($"~/Ventas/PV.aspx")
End Sub End Sub
Protected Sub DdlRecepcionUsados_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlRecepcionUsados_SelectedIndexChanged(sender As Object, e As EventArgs)
If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then
Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}")
DdlBCIUsado.DataSource = DTBCIUsados.FiltraParametros(String.Format("CveTamaño = {0}", DrTamanio("CveTamaño"))) DdlBCIUsado.DataSource = DTBCIUsados.FiltraParametros(String.Format("CveTamaño = {0}", DrTamanio("CveTamaño")))
Else
DdlBCIUsado.Items.Clear()
DdlBCIUsado.DataSource = Nothing
End If
DdlBCIUsado.DataBind() DdlBCIUsado.DataBind()
UpModalVenta.Update() UpAddVenta.Update()
End Sub
Protected Sub ChkServicioDomicilio_CheckedChanged(sender As Object, e As EventArgs)
If ChkServicioDomicilio.Checked Then
PreparaServicioDomicilio()
Else
ddlAlmacen.Items.Clear()
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero}")
ddlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
ddlAlmacen.DataBind()
If GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero}").Rows.Count > 0 Then
ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
End If
For Each GvRow As GridViewRow In GvInv.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
GvRow.FCCheckBox("cbInv").Enabled = True
End If
Next
End If
UpINV.Update()
End Sub
Private Sub PreparaServicioDomicilio()
ddlAlmacen.Items.Clear()
ddlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=29).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}")
ddlAlmacen.DataBind()
For Each GvRow As GridViewRow In GvInv.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
GvRow.FCCheckBox("cbInv").Checked = True
GvRow.FCCheckBox("cbInv").Enabled = False
End If
Next
End Sub End Sub
End Class End Class