Agregar gastos desde trayectos

This commit is contained in:
2020-11-09 19:24:47 -07:00
parent 47e7aefb72
commit 21bc9c576d
2 changed files with 95 additions and 6 deletions

View File

@@ -226,4 +226,34 @@ Partial Class GPS_TrayectoDetalle
End If
End If
End Sub
Protected Sub LimpiaModal()
TxtCantidad.Text = ""
TxtPrecio.Text = ""
TxtDescripcion.Text = ""
TxtObs.Text = ""
TxtFecha.Text = ""
End Sub
Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
LimpiaModal()
'Modalidad = "A"
BtnGuardar.Text = "Agregar"
ltlMotititulo.Text = "Agregar Gasto"
UpModal.Update()
RegistraScript("$('#DModal').modal()")
End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
Dim ObjPS As New ClsGPS
'If Modalidad = "A" Then
'ElseIf Modalidad = "U" Then
' If ObjPS.UpdateGasto(CveGPSGasto, TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(), UsuarioActual.CveUsuario) Then
' RegistraScript("$('#DModal').modal('hide')")
' Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
' End If
'End If
If ObjPS.AddGasto(TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(),
2, UsuarioActual.CveUsuario, UsuarioActual.CveCliente, CveTrayecto:=Me.CveTrayecto) Then
RegistraScript("$('#DModal').modal('hide')")
Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
End If