Agregar gastos desde trayectos
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user