req requerir CveProveedor al generar OC, OI agenda
This commit is contained in:
@@ -334,6 +334,10 @@ Partial Class OI_PopUpAgenda
|
||||
CargaContarto(Request("CveContrato").ToEntero)
|
||||
End If
|
||||
|
||||
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
CargaCompra(CveCompra:=Request("CveCompra").ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Request("CveEvento") IsNot Nothing AndAlso IsNumeric(Request("CveEvento")) AndAlso Request("CveEvento").ToEntero > 0 Then
|
||||
@@ -355,6 +359,9 @@ Partial Class OI_PopUpAgenda
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub Tarea() '1
|
||||
CveTipoEvento = 1
|
||||
|
||||
@@ -684,6 +691,12 @@ Partial Class OI_PopUpAgenda
|
||||
CveUsuario = Request("CveUsuario").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
Dim CveCompra As Integer = -1
|
||||
If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
CveCompra = Request("CveCompra").ToEntero
|
||||
End If
|
||||
|
||||
'------------------------------------------
|
||||
'Recorrro Grid para obtener el usuario PARA
|
||||
For Each RowPara As GridViewRow In GVUsuarios.Rows
|
||||
@@ -710,7 +723,7 @@ Partial Class OI_PopUpAgenda
|
||||
Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf CveTipoEvento = 2 Then
|
||||
If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor) Then
|
||||
If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra) Then
|
||||
Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||
End If
|
||||
ElseIf CveTipoEvento = 3 Then
|
||||
@@ -1260,13 +1273,13 @@ Partial Class OI_PopUpAgenda
|
||||
End Sub
|
||||
Private Sub CargaProveedor(CveProveedor As Integer)
|
||||
|
||||
'Dim ObjClaves As New ClsCompProveedores
|
||||
' hacerlo con el global dt
|
||||
'If ObjClaves.GetProveedores(CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
||||
' If ObjClaves.DtResultados.Rows.Count > 0 Then
|
||||
' LtlAgenda.Text = ObjClaves.CveProveedor & " - " & ObjClaves.NombreComercial
|
||||
' End If
|
||||
'End If
|
||||
Dim ObjClaves As New ClsCompProveedores
|
||||
|
||||
If ObjClaves.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjClaves.DtResultados.Rows.Count > 0 Then
|
||||
LtlAgenda.Text = ObjClaves.CveProveedor & " - " & ObjClaves.NombreComercial
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaUsuario(CveUsuario As Integer)
|
||||
@@ -1290,6 +1303,16 @@ Partial Class OI_PopUpAgenda
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCompra(CveCompra As Integer)
|
||||
Dim objCompra As New ClsCompras
|
||||
|
||||
If objCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = objCompra.DtResultados.Rows(0)
|
||||
LtlAgenda.Text = $" Compra: {dr("SerieFolio").ToString}"
|
||||
End If
|
||||
objCompra.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user