Commit inicial Ventas Productivo
This commit is contained in:
114
Contratos/RepContratosDetalle.aspx.vb
Normal file
114
Contratos/RepContratosDetalle.aspx.vb
Normal file
@@ -0,0 +1,114 @@
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class RepContratos
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaProveedores()
|
||||
CargaContratos()
|
||||
CargaClasificacion()
|
||||
CargaSeccion()
|
||||
'DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
|
||||
CargaDatos(Request("CveContrato").ToEntero, "Con")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos(CveContrato As Integer, Tipo As String)
|
||||
Dim Con As New ClsContratos
|
||||
If Con.GetRepContratosAvancesDetalle(-1, CveContrato, -1, TiPO, UsuarioActual.CveEmpresa) Then
|
||||
GV.DataSource = Con.DtResultados
|
||||
GV.DataBind()
|
||||
'If Con.DtResultados.Rows.Count > 0 Then
|
||||
' BtnAgregar.Visible = True
|
||||
'End If
|
||||
UpDatos.Update()
|
||||
End If
|
||||
Con.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "C O M B O S"
|
||||
|
||||
Private Sub CargaProveedores()
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedor.DataBind()
|
||||
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSeccion()
|
||||
DdlSeccion.DataSource = GlobalDTContratosSecciones.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlSeccion.DataBind()
|
||||
DdlSeccion.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todas", "-1"))
|
||||
'Dim ObjSecciones As New ClsContratos
|
||||
'If ObjSecciones.GetSecciones() Then
|
||||
' DdlSeccion.DataSource = ObjSecciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' DdlSeccion.DataBind()
|
||||
|
||||
'End If
|
||||
|
||||
'ObjSecciones.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaContratos()
|
||||
DdlContrato.DataSource = GlobalDTContratos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlContrato.DataBind()
|
||||
DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaClasificacion()
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaPS()
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPS(-1, DdlClasificacion.SelectedValue.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DdlPS.DataSource = ObjPS.DtResultados
|
||||
Else
|
||||
DdlPS.DataSource = Nothing
|
||||
End If
|
||||
DdlPS.DataBind()
|
||||
|
||||
ObjPS.Dispose()
|
||||
DdlPS.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
|
||||
e.Row.Cells(0).Width = Unit.Pixel(200) 'SubSeccion
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100) 'Cantidad
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100) 'Cantidad
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100) 'Cantidad
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100) 'Cantidad
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100) 'Cantidad
|
||||
e.Row.Cells(6).Width = Unit.Pixel(100) 'Cantidad
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("RazonSocial") = "" Then
|
||||
e.Row.CssClass = "Totales" : e.Row.Height = 25
|
||||
ElseIf e.Row.DBCampo("DescripcionContrato") = "" Then
|
||||
e.Row.CssClass = "SubTotales2" : e.Row.Height = 25
|
||||
ElseIf e.Row.DBCampo("Clasificacion") = "" Then
|
||||
e.Row.CssClass = "SubTotales" : e.Row.Height = 25
|
||||
'ElseIf e.Row.DBCampo("Clasificacion") = "" Then
|
||||
' e.Row.CssClass = "SubTotales3" : e.Row.Height = 25
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("OriginalvsReal").ToDouble < 0 Then e.Row.FCLabel("LblOrigVsReal").ForeColor = Drawing.Color.Red
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles CmdConsultar.Click
|
||||
'CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user