This commit is contained in:
Antonio Gonzalez
2019-09-09 12:33:00 -05:00
15 changed files with 967 additions and 185 deletions

View File

@@ -2115,6 +2115,7 @@ Partial Class OS_OrdenesServicios
If GvMaterialesModal.Rows.Count > 0 Then
Dim ObjInventario As New ClsInventarios
ObjInventario.IniciaTransacSQL()
Dim CveTraspasoSolicitud As Integer = 0
@@ -2146,7 +2147,7 @@ Partial Class OS_OrdenesServicios
Estatus = 3
End If
Dim Folio As Integer = ObjInventario.AddTrasladoSolicitud($"Solicitud de traspaso #{LblFolio.Text}", DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOS:=CveOS)
Dim Folio As Integer = ObjInventario.AddTrasladoSolicitud($"Solicitud de traspaso OS#{LblFolio.Text}", DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOS:=CveOS)
If Folio > 0 Then
CveTraspasoSolicitud = ObjInventario.CveTraspasoSolicitud
@@ -2155,10 +2156,10 @@ Partial Class OS_OrdenesServicios
End If
If Not TieneError Then
For Each Row As GridViewRow In TmpDTMaterialesDetalle.Rows
Dim CveUM As Integer = Row.DataKey("CveUM").ToEntero
Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero
Dim Cantidad As Integer = Row.DataKey("Cantidad").ToEntero
For Each Row As DataRow In TmpDTMaterialesDetalle.Rows
Dim CveUM As Integer = Row("CveUM").ToString.ToEntero
Dim CvePS As Integer = Row("CvePS").ToString.ToEntero
Dim Cantidad As Integer = Row("Cantidad").ToString.ToEntero
If Not ObjInventario.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, 0, "", -1) Then
TieneError = True
@@ -2173,7 +2174,7 @@ Partial Class OS_OrdenesServicios
Alert("Ocurrió un error en la existencia", TipoMensaje.MsgError)
End If
If TieneError = False Then
If Not TieneError Then
ObjInventario.Commit()
Alert($"El Traspaso se guardó correctamente con el folio #: <b>{Folio}</b>.", TipoMensaje.MsgInformacion, $"document.location.href=""/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}""")
Else