Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2325,6 +2325,29 @@ Public Class ClsContratos
|
|||||||
End With
|
End With
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el Reporte de Avances Detalle CP.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetVentasAvanceObra(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Con_RepVentasAvancesObra")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||||
|
End With
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|||||||
@@ -1563,7 +1563,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="GvDatosAvance" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
<asp:GridView ID="GvDatosAvance" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||||
|
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion"
|
||||||
|
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||||
|
|
||||||
@@ -1633,7 +1635,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||||
|
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion"
|
||||||
|
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||||
|
|
||||||
|
|||||||
@@ -2656,7 +2656,8 @@ Partial Class Contratos_ContratoObra
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Protected Sub GvDatosAvanceControl_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvanceControl.RowDataBound
|
Protected Sub GvDatosAvanceControl_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvanceControl.RowDataBound
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DBCampo("CveClasificacion").ToString.ToEntero = 0 Then
|
If e.Row.DBCampo("CveClasificacion").ToString.ToEntero = 0 Then
|
||||||
@@ -2675,26 +2676,36 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs)
|
Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs)
|
||||||
Dim Btn = CType(sender, LinkButton)
|
|
||||||
Dim Parametros = Btn.CommandArgument.Split("|"c)
|
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||||
|
|
||||||
|
|
||||||
|
'Dim Btn = CType(sender, LinkButton)
|
||||||
|
'Dim Parametros = Btn.CommandArgument.Split("|"c)
|
||||||
|
|
||||||
|
|
||||||
|
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||||
|
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||||
|
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||||
|
Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
|
|
||||||
If ObjContratos.GetVentasAvance(CveContrato, If(Parametros(0).ToEntero > 0, Parametros(0).ToEntero, -1), If(Parametros(2).ToEntero > 0, Parametros(2).ToEntero, -1), If(Parametros(4).ToEntero > 0, Parametros(4).ToEntero, -1)) Then
|
If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 1) Then
|
||||||
GvDatosVentasAvance.DataSource = ObjContratos.DtResultados
|
GvDatosVentasAvance.DataSource = ObjContratos.DtResultados
|
||||||
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
|
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al obtener el Listado de Ventas/Remisiones de Avance. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al obtener el Listado de Ventas de Avance. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
GvDatosVentasAvance.DataBind()
|
GvDatosVentasAvance.DataBind()
|
||||||
|
|
||||||
|
LbTituloModalVentasAvance.Text = "Ventas de Avance"
|
||||||
LbTituloModalVentasAvance.Text = If(Parametros(4).ToEntero = 1, "Ventas de Avance", "Remisiones de Avance")
|
|
||||||
LbClasificacionVentasAvance.Text = Parametros(1)
|
LbClasificacionVentasAvance.Text = Clasificacion
|
||||||
LbPSVentasAvance.Text = If(Parametros(2).ToEntero > 0, Parametros(3), "")
|
LbPSVentasAvance.Text = CodigoPS
|
||||||
|
|
||||||
UpVentasAvance.Update()
|
UpVentasAvance.Update()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user