Contratos 2020-12-02
This commit is contained in:
@@ -138,8 +138,8 @@ Partial Class Contratos_ContratoAvance
|
||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DdlContratos.DataBind()
|
||||
|
||||
DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DDlContratosEstimaciones.DataBind()
|
||||
'DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
'DDlContratosEstimaciones.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ Partial Class Contratos_ContratoAvance
|
||||
If e.Row.DataKey("CveContratoDetalle").ToEntero > 0 Then
|
||||
|
||||
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkModalDropzone")
|
||||
'LnkAnexo.Visible = True
|
||||
|
||||
Dim DVAnexo As Control = DirectCast(e.Row.FindControl("ModalAnexoEvidencia"), Control)
|
||||
LnkAnexo.OnClientClick = $" $('#{DVAnexo.ClientID}').modal('show'); return false;"
|
||||
|
||||
@@ -220,9 +220,20 @@ Partial Class Contratos_ContratoAvance
|
||||
Dim LnkGuardarAvance As LinkButton = e.Row.FCLinkButton("LnkGuardarAvance")
|
||||
LnkGuardarAvance.Visible = True
|
||||
|
||||
|
||||
If e.Row.DataKey("CantidadMax").ToDouble = 0 Then
|
||||
LnkAnexo.Visible = False
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = False
|
||||
LnkGuardarAvance.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||
@@ -432,120 +443,120 @@ Partial Class Contratos_ContratoAvance
|
||||
#Region "ESTIMACION"
|
||||
|
||||
|
||||
Private Sub CargaAvancesParaEstimar()
|
||||
CveContratoEstimacion = -1
|
||||
'Private Sub CargaAvancesParaEstimar()
|
||||
' CveContratoEstimacion = -1
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim DTEstimaciones As New DataTable
|
||||
Dim NumeroEstimacionActual As Integer = 0
|
||||
' Dim ObjContratos As New ClsContratos()
|
||||
' Dim DTEstimaciones As New DataTable
|
||||
' Dim NumeroEstimacionActual As Integer = 0
|
||||
|
||||
If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
|
||||
DTEstimaciones = ObjContratos.DtResultados
|
||||
' If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
|
||||
' DTEstimaciones = ObjContratos.DtResultados
|
||||
|
||||
CveContratoEstimacion = DDlContratosEstimaciones.SelectedValue.ToEntero
|
||||
' CveContratoEstimacion = DDlContratosEstimaciones.SelectedValue.ToEntero
|
||||
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
' ObjContratos.Dispose()
|
||||
|
||||
|
||||
If DTEstimaciones.Rows.Count > 0 Then
|
||||
GvEstimaciones.DataSource = DTEstimaciones
|
||||
BtnGuardarEstimacion.Visible = True
|
||||
Else
|
||||
GvEstimaciones.DataSource = Nothing
|
||||
BtnGuardarEstimacion.Visible = False
|
||||
End If
|
||||
GvEstimaciones.DataBind()
|
||||
' If DTEstimaciones.Rows.Count > 0 Then
|
||||
' GvEstimaciones.DataSource = DTEstimaciones
|
||||
' BtnGuardarEstimacion.Visible = True
|
||||
' Else
|
||||
' GvEstimaciones.DataSource = Nothing
|
||||
' BtnGuardarEstimacion.Visible = False
|
||||
' End If
|
||||
' GvEstimaciones.DataBind()
|
||||
|
||||
UpEstimaciones.Update()
|
||||
End Sub
|
||||
' UpEstimaciones.Update()
|
||||
'End Sub
|
||||
|
||||
Private Sub BtnConsultarEstimaciones_Click(sender As Object, e As EventArgs) Handles BtnConsultarEstimaciones.Click
|
||||
'Private Sub BtnConsultarEstimaciones_Click(sender As Object, e As EventArgs) Handles BtnConsultarEstimaciones.Click
|
||||
|
||||
CargaAvancesParaEstimar()
|
||||
' CargaAvancesParaEstimar()
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub GvEstimaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstimaciones.RowDataBound
|
||||
'Private Sub GvEstimaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstimaciones.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
' If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
|
||||
|
||||
If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||
If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
End If
|
||||
Else
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||
' If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
||||
' e.Row.CssClass = "SubTotales"
|
||||
' Else
|
||||
' e.Row.CssClass = "SubTotales2"
|
||||
' End If
|
||||
' Else
|
||||
' e.Row.CssClass = "SubTotales3"
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
|
||||
'Private Sub BtnGuardarEstimacion_Click(sender As Object, e As EventArgs) Handles BtnGuardarEstimacion.Click
|
||||
|
||||
CveEstimacionNueva = -1
|
||||
NuemeroEstimacionNuevo = -1
|
||||
' CveEstimacionNueva = -1
|
||||
' NuemeroEstimacionNuevo = -1
|
||||
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
' Dim ObjContratos As New ClsContratos()
|
||||
' Dim ErrorProceso As Boolean = False
|
||||
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
' ObjContratos.IniciaTransacSQL()
|
||||
|
||||
|
||||
If ObjContratos.AddContratosAvanceEstimacion(CveContratoEstimacion, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjContratos.AddContratosAvanceEstimacion(CveContratoEstimacion, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
CveEstimacionNueva = ObjContratos.CveEstimacionNueva
|
||||
NuemeroEstimacionNuevo = ObjContratos.NumeroEstimacionNueva
|
||||
' CveEstimacionNueva = ObjContratos.CveEstimacionNueva
|
||||
' NuemeroEstimacionNuevo = ObjContratos.NumeroEstimacionNueva
|
||||
|
||||
For Each GvRow As GridViewRow In GvEstimaciones.Rows
|
||||
' For Each GvRow As GridViewRow In GvEstimaciones.Rows
|
||||
|
||||
If GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
|
||||
If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' If GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
|
||||
' If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
|
||||
' ErrorProceso = True
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
' Else
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
|
||||
'AddContratosAvanceEstimacion
|
||||
'UpdateContratosAvanceEstimacion
|
||||
' 'AddContratosAvanceEstimacion
|
||||
' 'UpdateContratosAvanceEstimacion
|
||||
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjContratos.Commit()
|
||||
Alert($"Estimación {NuemeroEstimacionNuevo} agregada correctamente.")
|
||||
' If Not ErrorProceso Then
|
||||
' ObjContratos.Commit()
|
||||
' Alert($"Estimación {NuemeroEstimacionNuevo} agregada correctamente.")
|
||||
|
||||
BtnGuardarEstimacion.Visible = False
|
||||
BtnDescargarGenerado.Visible = True
|
||||
' BtnGuardarEstimacion.Visible = False
|
||||
' BtnDescargarGenerado.Visible = True
|
||||
|
||||
Else
|
||||
ObjContratos.RollBack()
|
||||
End If
|
||||
' Else
|
||||
' ObjContratos.RollBack()
|
||||
' End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
' ObjContratos.Dispose()
|
||||
|
||||
UpEstimaciones.Update()
|
||||
End Sub
|
||||
' UpEstimaciones.Update()
|
||||
'End Sub
|
||||
|
||||
Private Sub BtnDescargarGenerado_Click(sender As Object, e As EventArgs) Handles BtnDescargarGenerado.Click
|
||||
'Private Sub BtnDescargarGenerado_Click(sender As Object, e As EventArgs) Handles BtnDescargarGenerado.Click
|
||||
|
||||
GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, Now, DDlContratosEstimaciones.SelectedItem.Text)
|
||||
' GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, Now, DDlContratosEstimaciones.SelectedItem.Text)
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub GeneraAnexo(CveEstimacion As Integer, NumeroEstimacion As Integer, FechaEstimacion As Date, NumeroContrato As String)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user