parametro de empresa y grupo, en contratos detalle
This commit is contained in:
@@ -1084,12 +1084,14 @@ Public Class ClsContratos
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetContratosDetalle(CveContrato As Integer) As Boolean
|
||||
Public Function GetContratosDetalle(CveContrato As Integer, CveEmpresa As Integer, Optional Grupo As Integer = 1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Grupo", SqlDbType.Int).Value = Grupo
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1182,7 +1182,7 @@ Partial Class Contratos_Default
|
||||
If TipoContrato = 4 Then
|
||||
TabPI.Visible = True
|
||||
End If
|
||||
If ObjContratos.GetContratosDetalle(CveContrato) Then
|
||||
If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
TmpDT = ObjContratos.DtResultados
|
||||
If TmpDT.MAX("Cantidad_Original").ToString.ToEntero > 0 OrElse TmpDT.MAX("PU_Original").ToString.ToEntero > 0 Then
|
||||
BtnAutorizar.Visible = False
|
||||
|
||||
@@ -529,7 +529,7 @@ Partial Class Contratos_Default
|
||||
If TipoContrato = 4 Then
|
||||
TabPI.Visible = True
|
||||
End If
|
||||
If ObjContratos.GetContratosDetalle(CveContrato) Then
|
||||
If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
TmpDT = ObjContratos.DtResultados
|
||||
If TmpDT.MAX("Cantidad_Original").ToString.ToEntero > 0 OrElse TmpDT.MAX("PU_Original").ToString.ToEntero > 0 Then
|
||||
BtnAutorizar.Visible = False
|
||||
|
||||
@@ -902,7 +902,7 @@ Partial Class Contratos_ContratoObra
|
||||
If TipoContrato = 4 Then
|
||||
TabPI.Visible = True
|
||||
End If
|
||||
If ObjContratos.GetContratosDetalle(CveContrato) Then
|
||||
If ObjContratos.GetContratosDetalle(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
TmpDT = ObjContratos.DtResultados
|
||||
If TmpDT.MAX("Cantidad_Original").ToString.ToEntero > 0 OrElse TmpDT.MAX("PU_Original").ToString.ToEntero > 0 Then
|
||||
BtnAutorizar.Visible = False
|
||||
|
||||
@@ -467,7 +467,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
SubProyecto = DR("SubProyectoContrato").ToString
|
||||
|
||||
Dim objContratos As New ClsContratos
|
||||
If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then
|
||||
If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTDetalle = objContratos.DtResultados.FiltraParametros("CveTipoPresupuesto=2")
|
||||
Else
|
||||
DTDetalle = Nothing
|
||||
|
||||
@@ -548,7 +548,7 @@ Partial Class Contratos_FacturacionMasiva
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
|
||||
If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then
|
||||
If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTDetalle = objContratos.DtResultados
|
||||
Else
|
||||
DTDetalle = Nothing
|
||||
|
||||
@@ -547,7 +547,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
End Sub
|
||||
Private Sub DdlContratos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlContratos.SelectedIndexChanged
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
@@ -974,7 +974,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
|
||||
Dim DTContratosTemporal As New DataTable
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTContratosTemporal = ObjContratos.DtResultados
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
@@ -2101,7 +2101,7 @@ Partial Class OC
|
||||
Dim dttemp As DataTable = Nothing 'GlobalDTContratos(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
|
||||
If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then
|
||||
Dim drContrato As DataRow = dttemp.Rows(0)
|
||||
If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero) Then
|
||||
If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtContratodetalle As DataTable = ObjContratos.DtResultados.FiltraParametros(String.Format("CvePS = {0}", DdlP2.SelectedValue.ToString))
|
||||
If dtContratodetalle IsNot Nothing AndAlso dtContratodetalle.Rows.Count > 0 Then
|
||||
Dim drContratoDetalle As DataRow = dtContratodetalle(0)
|
||||
@@ -7449,7 +7449,7 @@ Partial Class OC
|
||||
|
||||
Private Sub CargaContratos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
@@ -7479,7 +7479,7 @@ Partial Class OC
|
||||
|
||||
Private Sub DdlContratos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlContratos.SelectedIndexChanged
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero) Then
|
||||
If ObjContratos.GetContratosDetalle(DdlContratos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user