- ajuste de actualizar un dato registrado
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" EnableEventValidation="false" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" EnableEventValidation="false" %>
|
||||||
|
|
||||||
|
|
||||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||||
|
|||||||
@@ -1146,7 +1146,12 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
' AgregarPS()
|
' AgregarPS()
|
||||||
'End Sub
|
'End Sub
|
||||||
Protected Sub LkAgregarDetalle_Click(sender As Object, e As EventArgs) Handles LkAgregarDetalle.Click
|
Protected Sub LkAgregarDetalle_Click(sender As Object, e As EventArgs) Handles LkAgregarDetalle.Click
|
||||||
AgregarPS()
|
If CveMovimientoDetalleEdit > 0 Then
|
||||||
|
ActualizarPS()
|
||||||
|
Else
|
||||||
|
AgregarPS()
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs)
|
||||||
AgregarPS()
|
AgregarPS()
|
||||||
@@ -1197,7 +1202,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
|
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
|
||||||
Valido = False
|
Valido = False
|
||||||
Alert("El producto requiere Serie-Lote", TipoMensaje.MsgAdvertencia)
|
Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'salida
|
'salida
|
||||||
@@ -2364,14 +2369,17 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing
|
Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing
|
||||||
GvM.EditIndex = e.NewEditIndex
|
Dim i As Integer = e.NewEditIndex
|
||||||
|
GvM.EditIndex = i
|
||||||
|
|
||||||
Dim Gv As GridView = DirectCast(sender, GridView)
|
Dim Gv As GridView = DirectCast(sender, GridView)
|
||||||
Dim GvRow As GridViewRow = Gv.Rows(0)
|
Dim GvRow As GridViewRow = Gv.Rows(i)
|
||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||||
divCantidad.Visible = False
|
txtCantidad.Enabled = False
|
||||||
divClasificacionProducto.Visible = False
|
DdlClasificacion.Enabled = False
|
||||||
divUnidadMedida.Visible = False
|
DdlProducto2.Enabled = False
|
||||||
|
DdlUnidad.Enabled = False
|
||||||
End If
|
End If
|
||||||
txtCantidad.Text = GvRow.DataKey("Cantidad").ToEntero().ToString
|
txtCantidad.Text = GvRow.DataKey("Cantidad").ToEntero().ToString
|
||||||
DdlProducto2.SelectedValue = GvRow.DataKey("CvePS")
|
DdlProducto2.SelectedValue = GvRow.DataKey("CvePS")
|
||||||
@@ -2429,30 +2437,30 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvM_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvM.RowUpdating
|
Protected Sub GvM_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvM.RowUpdating
|
||||||
|
|
||||||
Dim Precio As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDouble
|
'Dim Precio As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDouble
|
||||||
Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero
|
'Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero
|
||||||
Dim serie As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerie").Text.Replace(" ", String.Empty)
|
'Dim serie As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerie").Text.Replace(" ", String.Empty)
|
||||||
Dim Observaciones As String = GvM.Rows(e.RowIndex).FCTextBox("TxtObservaciones").Text
|
'Dim Observaciones As String = GvM.Rows(e.RowIndex).FCTextBox("TxtObservaciones").Text
|
||||||
Dim CveSeccionAlmacen As Integer = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
|
'Dim CveSeccionAlmacen As Integer = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
|
||||||
Dim SeccionAlmacen As String = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedItem.Text
|
'Dim SeccionAlmacen As String = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedItem.Text
|
||||||
Dim Cantidad As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDouble
|
'Dim Cantidad As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtCantidad").Text.ToDouble
|
||||||
Dim Drs As DataRow() = DtMovimientos.Select(String.Format("No = {0}", No))
|
'Dim Drs As DataRow() = DtMovimientos.Select(String.Format("No = {0}", No))
|
||||||
|
|
||||||
If Drs.Count > 0 Then
|
'If Drs.Count > 0 Then
|
||||||
Drs(0)("Cantidad") = Cantidad
|
' Drs(0)("Cantidad") = Cantidad
|
||||||
Drs(0)("PU") = Precio
|
' Drs(0)("PU") = Precio
|
||||||
Drs(0)("Total") = Drs(0)("Cantidad").ToString.ToDouble * Precio
|
' Drs(0)("Total") = Drs(0)("Cantidad").ToString.ToDouble * Precio
|
||||||
Drs(0)("Estatus") = "U"
|
' Drs(0)("Estatus") = "U"
|
||||||
Drs(0)("Serie") = serie
|
' Drs(0)("Serie") = serie
|
||||||
Drs(0)("Observaciones") = Observaciones
|
' Drs(0)("Observaciones") = Observaciones
|
||||||
Drs(0)("CveSeccionAlmacen") = CveSeccionAlmacen
|
' Drs(0)("CveSeccionAlmacen") = CveSeccionAlmacen
|
||||||
Drs(0)("SeccionAlmacen") = SeccionAlmacen
|
' Drs(0)("SeccionAlmacen") = SeccionAlmacen
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
DtMovimientos.AcceptChanges()
|
'DtMovimientos.AcceptChanges()
|
||||||
GvM.EditIndex = -1
|
'GvM.EditIndex = -1
|
||||||
|
|
||||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
'CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DeleteRow(ByVal sender As Object, ByVal e As EventArgs)
|
Protected Sub DeleteRow(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
@@ -4301,11 +4309,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ActualizarPS()
|
Private Sub ActualizarPS()
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDouble, DdlUnidad.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDouble, CveAFEdit,
|
If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDouble, DdlUnidad.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDouble, CveAFEdit,
|
||||||
CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text,
|
CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text,
|
||||||
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Alert("Error al Actualizar los movimientos")
|
Alert("Error al Actualizar los movimientos")
|
||||||
|
Else
|
||||||
|
RegistraScript("$('#ModalAgregar').modal('hide')")
|
||||||
End If
|
End If
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user