Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1718,9 +1718,9 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function CancelarBancos_IE(CveUsuario As Integer, CveIE As Integer, MesAnterior As Boolean, IdPoliza As Integer, FolioPoliza As Integer, Optional FechaCancelacion As Date = MinFecha, Optional TipoMovimiento As Integer = 1) As Boolean
|
Public Function CancelarBancos_IE(CveUsuario As Integer, CveIE As Integer, MesAnterior As Boolean, IdPoliza As Integer, FolioPoliza As Integer, Optional FechaCancelacion As Date = MinFecha, Optional TipoMovimiento As Integer = 1) As Integer
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Integer = 0
|
||||||
DataAdapter("PA_Banc_IECancelar")
|
DataAdapter("PA_Banc_IECancelar")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -1731,11 +1731,12 @@ Public Class ClsBancos
|
|||||||
.Add("@FolioPoliza", SqlDbType.Int).Value = FolioPoliza
|
.Add("@FolioPoliza", SqlDbType.Int).Value = FolioPoliza
|
||||||
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
|
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
|
||||||
.Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento
|
.Add("@TipoMovimiento", SqlDbType.Int).Value = TipoMovimiento
|
||||||
|
.Add("@CvePrePoliza", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al cancelar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al cancelar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ Public Class ClsInventarios
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1) As Boolean
|
Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1, Optional CveAlmacenVirtual As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_AlmacenesAdd")
|
DataAdapter("PA_Inv_AlmacenesAdd")
|
||||||
@@ -377,7 +377,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
|
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
|
||||||
|
.Add("@CveAlmacenVirtual", SqlDbType.Int).Value = CveAlmacenVirtual
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -396,7 +396,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1) As Boolean
|
Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1, Optional CveAlmacenVirtual As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_AlmacenesUpdate")
|
DataAdapter("PA_Inv_AlmacenesUpdate")
|
||||||
@@ -413,6 +413,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
|
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
|
||||||
|
.Add("@CveAlmacenVirtual", SqlDbType.Int).Value = CveAlmacenVirtual
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -41,36 +41,36 @@ Public Class ClsRH
|
|||||||
|
|
||||||
Public Sub Commit()
|
Public Sub Commit()
|
||||||
SqlTransacc.Commit()
|
SqlTransacc.Commit()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
Public ReadOnly Property DSResultados() As DataSet
|
Public ReadOnly Property DSResultados() As DataSet
|
||||||
Get
|
Get
|
||||||
DSResultados = DSet
|
DSResultados = DSet
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||||
|
|
||||||
If TransaccionCompartida Is Nothing Then
|
If TransaccionCompartida Is Nothing Then
|
||||||
SqlConexion = New SqlConnection
|
SqlConexion = New SqlConnection
|
||||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||||
Try
|
Try
|
||||||
SqlConexion.Open()
|
SqlConexion.Open()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
EsTransaccionCompartida = True
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
ConexionAdd()
|
ConexionAdd()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -80,23 +80,23 @@ Public Class ClsRH
|
|||||||
End With
|
End With
|
||||||
Data = New DataTable
|
Data = New DataTable
|
||||||
End Sub
|
End Sub
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
Private EsTransaccionCompartida As Boolean = False
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
|
||||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||||
|
|
||||||
Try
|
Try
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||||
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
|
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
|
||||||
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
|
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
|
||||||
@@ -141,7 +141,7 @@ Public Class ClsRH
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
||||||
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ Public Class ClsRH
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
|
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
|
||||||
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1549,7 +1549,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
CveDepartamento As Integer, CveRuta As Integer, CveEscolaridad As Integer, CveEstadoCivil As Integer, CveGenero As Integer,
|
CveDepartamento As Integer, CveRuta As Integer, CveEscolaridad As Integer, CveEstadoCivil As Integer, CveGenero As Integer,
|
||||||
CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer,
|
CveEstatusPersonal As Integer, CveSubProyecto As Integer, CveClienteAsignado As Integer, HorarioTrabajo As String, CveSupervisor As Integer,
|
||||||
CveTipoPeriodo As Integer, CveMetodoPago As Integer, CveTipoContrato As Integer, CveMotivoBaja As Integer, CveProyecto As Integer,
|
CveTipoPeriodo As Integer, CveMetodoPago As Integer, CveTipoContrato As Integer, CveMotivoBaja As Integer, CveProyecto As Integer,
|
||||||
FechaIFinContrato As String, FechaFFinContrato As String, FechaIIngreso As String, FechaFIngreso As String, SqlStr As String, NCaracteristicas As Integer,
|
FechaIFinContrato As String, FechaFFinContrato As String, FechaIIngreso As String, FechaFIngreso As String, SqlStr As String, NCaracteristicas As Integer,
|
||||||
CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean
|
CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -1820,8 +1820,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@CelularPersonal", SqlDbType.VarChar).Value = CelularPersonal
|
.Add("@CelularPersonal", SqlDbType.VarChar).Value = CelularPersonal
|
||||||
.Add("@TelefonoMarcadoRapido", SqlDbType.VarChar).Value = TelefonoMarcadoRapido
|
.Add("@TelefonoMarcadoRapido", SqlDbType.VarChar).Value = TelefonoMarcadoRapido
|
||||||
.Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno
|
.Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno
|
||||||
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
||||||
|
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
|
|
||||||
End With
|
End With
|
||||||
@@ -1937,8 +1937,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
.Add("@FechaActivo", SqlDbType.Date).Value = FechaActivo
|
.Add("@FechaActivo", SqlDbType.Date).Value = FechaActivo
|
||||||
.Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso
|
.Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso
|
||||||
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
.Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -1955,16 +1955,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean
|
Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_RH_PersonalUpdateSalarioIntegrado")
|
SqlDataAdapter("PA_RH_PersonalUpdateSalarioIntegrado")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@SDI", SqlDbType.Money).Value = SDI
|
.Add("@SDI", SqlDbType.Money).Value = SDI
|
||||||
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
|
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -1973,8 +1973,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean
|
Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_RH_PersonalUpdateSalarios")
|
SqlDataAdapter("PA_RH_PersonalUpdateSalarios")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -1985,7 +1985,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
|
.Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario
|
||||||
.Add("@SDI", SqlDbType.Money).Value = SDI
|
.Add("@SDI", SqlDbType.Money).Value = SDI
|
||||||
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
|
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
|
||||||
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
|
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -1994,16 +1994,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean
|
Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_RH_MovimientosToSUA")
|
SqlDataAdapter("PA_RH_MovimientosToSUA")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
.Add("@FechaI", SqlDbType.VarChar).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
.Add("@FechaF", SqlDbType.VarChar).Value = FechaF
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -2012,17 +2012,17 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean
|
Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_RH_PersonalUpdateRFCValidado")
|
SqlDataAdapter("PA_RH_PersonalUpdateRFCValidado")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@isOk", SqlDbType.Bit).Value = RFCValidadoisok
|
.Add("@isOk", SqlDbType.Bit).Value = RFCValidadoisok
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -2031,14 +2031,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function Updateestemporal(CvePersonal As Integer, CveEmpresa As Integer, estemporal As Boolean) As Boolean
|
Public Function Updateestemporal(CvePersonal As Integer, CveEmpresa As Integer, estemporal As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
SqlDataAdapter("PA_RH_PersonalUpdateesTemporal")
|
SqlDataAdapter("PA_RH_PersonalUpdateesTemporal")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@isOk", SqlDbType.Bit).Value = estemporal
|
.Add("@isOk", SqlDbType.Bit).Value = estemporal
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -2052,8 +2052,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double,
|
SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double,
|
||||||
CvePersonal As Integer, CveEmpresa As Integer) As Boolean
|
CvePersonal As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
SqlDataAdapter("PA_RH_PersonalUpdateMasivo")
|
SqlDataAdapter("PA_RH_PersonalUpdateMasivo")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
||||||
@@ -2391,8 +2391,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddAsistenciaMasiva2(CvePeriodo As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
Public Function AddAsistenciaMasiva2(CvePeriodo As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -2418,9 +2418,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Asistencias Detalles"
|
#Region "Asistencias Detalles"
|
||||||
Public Function GetAsistenciasDetalle() As Boolean
|
Public Function GetAsistenciasDetalle() As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -3442,7 +3442,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
|
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
|
||||||
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
|
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = RHRequerido.CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = RHRequerido.CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
|
||||||
.Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento
|
.Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -3464,8 +3464,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@CveRequerimiento", SqlDbType.Int).Value = RHRequerido.CveRequerimiento
|
.Add("@CveRequerimiento", SqlDbType.Int).Value = RHRequerido.CveRequerimiento
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = RHRequerido.CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = RHRequerido.CveSubProyecto
|
||||||
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
|
.Add("@CveTurno", SqlDbType.Int).Value = RHRequerido.CveTurno
|
||||||
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
|
.Add("@Cantidad", SqlDbType.Int).Value = RHRequerido.Cantidad
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = RHRequerido.CveEmpresa
|
||||||
.Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento
|
.Add("@CveDepartamento", SqlDbType.Int).Value = RHRequerido.CveDepartamento
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -3480,13 +3480,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
End Function
|
End Function
|
||||||
Public Function RemovePersonalRequerido(CveRequerimiento As Integer, CveEmpresa As Integer) As Boolean
|
Public Function RemovePersonalRequerido(CveRequerimiento As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_RH_PersonalRequeridoRemove")
|
DataAdapter("PA_RH_PersonalRequeridoRemove")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveRequerimiento", SqlDbType.Int).Value = CveRequerimiento
|
.Add("@CveRequerimiento", SqlDbType.Int).Value = CveRequerimiento
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|
||||||
@@ -3504,10 +3504,10 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "ClsRHReportePersonalNecesidades"
|
#Region "ClsRHReportePersonalNecesidades"
|
||||||
Public Function GetReportePersonalNecesidades(CveTurno As Integer, CveProyecto As Integer, tCveSubProyeto As Integer, Estatus As Integer, CveEmpresa As Integer, CveDepartamento As Integer) As Boolean
|
Public Function GetReportePersonalNecesidades(CveTurno As Integer, CveProyecto As Integer, tCveSubProyeto As Integer, Estatus As Integer, CveEmpresa As Integer, CveDepartamento As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -3529,9 +3529,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al obtener el Reporte de Necesidades de Personal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener el Reporte de Necesidades de Personal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "ClsRHReporteRotacionPersonal"
|
#Region "ClsRHReporteRotacionPersonal"
|
||||||
Public Function GetReporteRotacionPersonal(FechaInicio As Date, FechaFin As Date, CveTurno As Integer, CveProyecto As Integer, CveSubProyeto As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetReporteRotacionPersonal(FechaInicio As Date, FechaFin As Date, CveTurno As Integer, CveProyecto As Integer, CveSubProyeto As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
@@ -3634,92 +3634,6 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
|
|
||||||
#Region "C H E C A D O R E S T A C I O N E S"
|
#Region "C H E C A D O R E S T A C I O N E S"
|
||||||
|
|
||||||
Public Function ChecadorEstacionesAdd(CveChecadorTipo As Integer, CveZonaHoraria As Integer, CveUsuario As Integer, CveEmpresa As Integer, ChecadorEstacion As String, Ip As String, Puerto As Integer, Estatus As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_RH_ChecadorEstacionesAdd")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveChecadorTipo", SqlDbType.Int).Value = CveChecadorTipo
|
|
||||||
.Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria
|
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
|
||||||
.Add("@ChecadorEstacion", SqlDbType.VarChar).Value = ChecadorEstacion
|
|
||||||
.Add("@Ip", SqlDbType.VarChar).Value = Ip
|
|
||||||
.Add("@Puerto", SqlDbType.Int).Value = Puerto
|
|
||||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
|
||||||
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al agregar el checador de estaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function ChecadorEstacionesUpdate(CveChecadorEstacion As Integer, CveChecadorTipo As Integer, CveZonaHoraria As Integer, CveUsuario As Integer, CveEmpresa As Integer, ChecadorEstacion As String, Ip As String, Puerto As Integer, Estatus As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_RH_ChecadorEstacionesUpdate")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveChecadorEstacion", SqlDbType.Int).Value = CveChecadorEstacion
|
|
||||||
.Add("@CveChecadorTipo", SqlDbType.Int).Value = CveChecadorTipo
|
|
||||||
.Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria
|
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
|
||||||
.Add("@ChecadorEstacion", SqlDbType.VarChar).Value = ChecadorEstacion
|
|
||||||
.Add("@Ip", SqlDbType.VarChar).Value = Ip
|
|
||||||
.Add("@Puerto", SqlDbType.Int).Value = Puerto
|
|
||||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
|
||||||
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al actualizar el checador de estaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function ChecadorEstacionesRemove(CveChecadorEstacion As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_RH_ChecadorEstacionesRemove")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveChecadorEstacion", SqlDbType.Int).Value = CveChecadorEstacion
|
|
||||||
|
|
||||||
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al eliminar el checador de estaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function ChecadorEstacionesGet(CveChecadorEstacion As Integer, CveEmpresa As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_RH_ChecadorEstacionesGet")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveChecadorEstacion", SqlDbType.Int).Value = CveChecadorEstacion
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
|
||||||
|
|
||||||
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al obtener el checador de estaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function DdlChecadorTipoGet(CveEmpresa As Integer) As Boolean
|
Public Function DdlChecadorTipoGet(CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_RH_DdlChecadorTipoGet")
|
DataAdapter("PA_RH_DdlChecadorTipoGet")
|
||||||
@@ -4158,16 +4072,16 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch exs As SqlException
|
Catch exs As SqlException
|
||||||
|
|
||||||
|
|
||||||
If exs.Message.Contains("Número: 547;") Then
|
If exs.Message.Contains("Número: 547;") Then
|
||||||
OnError("El Tema no se puede eliminar porque tiene registros relacionados..", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("El Tema no se puede eliminar porque tiene registros relacionados..", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
Else
|
Else
|
||||||
OnError("El Tema no se puede eliminar porque tiene registros relacionados. TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("El Tema no se puede eliminar porque tiene registros relacionados. TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If exs.ErrorCode = -2146232060 Then
|
'If exs.ErrorCode = -2146232060 Then
|
||||||
' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
'Else
|
'Else
|
||||||
@@ -4463,7 +4377,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
.Add("@Beneficiario", SqlDbType.Bit).Value = Beneficiario
|
.Add("@Beneficiario", SqlDbType.Bit).Value = Beneficiario
|
||||||
|
|
||||||
End With
|
End With
|
||||||
@@ -4498,9 +4412,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
.Add("@Beneficiario", SqlDbType.Int).Value = Beneficiario
|
.Add("@Beneficiario", SqlDbType.Int).Value = Beneficiario
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -6747,9 +6661,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", ""))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", ""))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -6875,11 +6789,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Checador"
|
#Region "Checador"
|
||||||
Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_RH_ChecadorGet")
|
DataAdapter("PA_RH_ChecadorGet")
|
||||||
@@ -6894,18 +6808,18 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al obtener el listado de checadores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener el listado de checadores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddChecadores(Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, CveUsuario As Integer, Optional CveModelo As Integer = 1, Optional Estatus As Integer = 1) As Boolean
|
Public Function AddChecadores(Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, CveUsuario As Integer, Optional CveModelo As Integer = 1, Optional Estatus As Integer = 1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_RH_ChecadorAdd")
|
DataAdapter("PA_RH_ChecadorAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
|
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
|
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
|
||||||
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
|
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
|
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
|
||||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
@@ -6915,18 +6829,18 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al agregar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al agregar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateChecadores(CveChecador As Integer, Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, Optional CveModelo As Integer = 1, Optional Estatus As Boolean = True) As Boolean
|
Public Function UpdateChecadores(CveChecador As Integer, Checador As String, CveSubProyecto As Integer, IPLocal As String, Puerto As String, Optional CveModelo As Integer = 1, Optional Estatus As Boolean = True) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_RH_ChecadorUpdate")
|
DataAdapter("PA_RH_ChecadorUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
|
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
|
||||||
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
|
.Add("@Checador", SqlDbType.NVarChar).Value = Checador
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
|
.Add("@IPLocal", SqlDbType.NVarChar).Value = IPLocal
|
||||||
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
|
.Add("@Puerto", SqlDbType.NVarChar).Value = Puerto
|
||||||
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
|
.Add("@CveModelo", SqlDbType.Int).Value = CveModelo
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
@@ -6936,8 +6850,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al actualizar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al actualizar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function RemoveChecadores(CveChecador As Integer) As Boolean
|
Public Function RemoveChecadores(CveChecador As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_RH_ChecadorDelete")
|
DataAdapter("PA_RH_ChecadorDelete")
|
||||||
@@ -6951,21 +6865,21 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
|||||||
OnError("Ocurrió un error al eliminar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al eliminar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
'Public msgsError As New StringBuilder()
|
'Public msgsError As New StringBuilder()
|
||||||
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||||
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||||
' msgsError.AppendLine(Mensaje)
|
' msgsError.AppendLine(Mensaje)
|
||||||
' msgsError.Append("<br/>")
|
' msgsError.Append("<br/>")
|
||||||
' 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
|
' 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
|
||||||
' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
#Region " IDisposable Support "
|
#Region " IDisposable Support "
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
'If msgsError.ToString().Length > 0 Then
|
'If msgsError.ToString().Length > 0 Then
|
||||||
' Alert(msgsError.ToString(), TipoMensaje.MsgError)
|
' Alert(msgsError.ToString(), TipoMensaje.MsgError)
|
||||||
|
|||||||
@@ -1180,7 +1180,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<asp:CheckBox ID="ChkCancelarNegativo" CssClass="md-checksd2" Text="Falta de fondos" TextAlign="Right" runat="server" />
|
<asp:CheckBox ID="ChkCancelarNegativo" CssClass="md-checksd2" Text="Falta de fondos" TextAlign="Right" runat="server" Visible="false" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:CheckBox ID="ChkGeneraCancelacion" CssClass="md-checksd2" Text="Genera Devolución" TextAlign="Right" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4391,7 +4391,7 @@ Partial Class Bancos_IE
|
|||||||
Dim IdPolizaNueva = -1
|
Dim IdPolizaNueva = -1
|
||||||
Dim FolioPolizaNueva = -1
|
Dim FolioPolizaNueva = -1
|
||||||
|
|
||||||
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1")) Then
|
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC)) Then
|
||||||
|
|
||||||
If ObjAC Is Nothing Then
|
If ObjAC Is Nothing Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
@@ -4427,7 +4427,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE"
|
MensajeError = "Error al cancelar IE"
|
||||||
End If
|
End If
|
||||||
@@ -4458,7 +4458,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE"
|
MensajeError = "Error al cancelar IE"
|
||||||
End If
|
End If
|
||||||
@@ -4479,22 +4479,42 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
|
' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
|
||||||
If TxtFechaDocumento.Text.ToDate < TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then
|
Dim GeneraCancelacionEnCero As Boolean = True
|
||||||
|
If TxtFechaDocumento.Text.ToDate >= TxtFechaCancelacion.Text.ToDate.FirstDayOfMonth Then 'si es del mismo mes, se genra cancelacion en cero
|
||||||
|
GeneraCancelacionEnCero = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then
|
||||||
|
GeneraCancelacionEnCero = False
|
||||||
|
End If
|
||||||
|
Dim CvePrePolizaCancelacion As Integer = 0
|
||||||
|
|
||||||
|
If Not GeneraCancelacionEnCero Then
|
||||||
'CANCELA IE MES ANTERIOR
|
'CANCELA IE MES ANTERIOR
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate)
|
||||||
|
If CvePrePolizaCancelacion <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'CANCELA IE MES ACTUAL
|
'CANCELA IE MES ACTUAL
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate) Then
|
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate)
|
||||||
|
If CvePrePolizaCancelacion <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||||
|
If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
|
||||||
|
ErrorCancelar = True
|
||||||
|
MensajeError = "Error al contabilizar poliza"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Banc.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
If Banc.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
||||||
If Banc.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}).Rows.Count > 0 Then
|
If Banc.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}).Rows.Count > 0 Then
|
||||||
If Not Banc.GetFoliosCancelados(UsuarioActual.CveEmpresa) Then
|
If Not Banc.GetFoliosCancelados(UsuarioActual.CveEmpresa) Then
|
||||||
@@ -4656,7 +4676,7 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
'genera nuevo IE contrario
|
'genera nuevo IE contrario
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4672,7 +4692,7 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
'siempre se hace una cancelación
|
'siempre se hace una cancelación
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1584,7 +1584,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
'Cuando salio NO exitoso cancelamos el IE
|
'Cuando salio NO exitoso cancelamos el IE
|
||||||
If Not ObjIE.CancelarBancos_IE(UsuarioActual.CveUsuario, ArrayCveIEs(index).ToEntero, False, -1, -1) Then
|
If ObjIE.CancelarBancos_IE(UsuarioActual.CveUsuario, ArrayCveIEs(index).ToEntero, False, -1, -1) <= 0 Then
|
||||||
ErrorDB = True
|
ErrorDB = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -2818,7 +2818,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE"
|
MensajeError = "Error al cancelar IE"
|
||||||
End If
|
End If
|
||||||
@@ -2849,7 +2849,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
'CANCELA IE
|
'CANCELA IE
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE"
|
MensajeError = "Error al cancelar IE"
|
||||||
End If
|
End If
|
||||||
@@ -2872,13 +2872,13 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
|
' If TxtFechaDocumento.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFechaDocumento.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Then
|
||||||
If FechaDocumento < FechaCancelacion.FirstDayOfMonth Then
|
If FechaDocumento < FechaCancelacion.FirstDayOfMonth Then
|
||||||
'CANCELA IE MES ANTERIOR
|
'CANCELA IE MES ANTERIOR
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
MensajeError = "Error al cancelar IE MES ANTERIOR"
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'CANCELA IE MES ACTUAL
|
'CANCELA IE MES ACTUAL
|
||||||
If Not Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) Then
|
If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, FechaCancelacion) <= 0 Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Error al cancelar IE MES ACTUAL"
|
MensajeError = "Error al cancelar IE MES ACTUAL"
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -2688,77 +2688,88 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
TmpDT.Columns.Add("CveContrato", GetType(Integer))
|
TmpDT.Columns.Add("CveContrato", GetType(Integer))
|
||||||
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
|
TmpDT.Columns.Add("DifPSSat", GetType(Integer))
|
||||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
|
||||||
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
|
If Not TmpDT.Columns.Contains("CveContratoDetalle") Then
|
||||||
|
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not TmpDT.Columns.Contains("CveCultivoCuadroDetalle") Then
|
||||||
|
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
|
||||||
CargaHidendsAC()
|
|
||||||
End If
|
|
||||||
|
|
||||||
CalculaTotales(True)
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaInventarios Then
|
|
||||||
DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy
|
|
||||||
|
|
||||||
If dr("Inventario").ToString = "1" Then
|
|
||||||
|
|
||||||
CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero
|
|
||||||
|
|
||||||
Dim Inv As New ClsInventarios
|
|
||||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
|
||||||
'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento")))
|
|
||||||
'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros)
|
|
||||||
|
|
||||||
ImgImprimirAlmacen.Visible = True
|
|
||||||
ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento"))
|
|
||||||
|
|
||||||
Dim drt As DataRow
|
|
||||||
'actualizo el almacen
|
|
||||||
For Each dri As DataRow In DtInv.Rows
|
|
||||||
|
|
||||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
|
||||||
If drt IsNot Nothing Then
|
|
||||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie
|
|
||||||
TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie
|
|
||||||
|
|
||||||
dri("CveAlmacen") = drt("CveAlmacen")
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Proceso Super Tramposo de Charlie
|
|
||||||
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then
|
|
||||||
Dim drt As DataRow
|
|
||||||
For Each dri As DataRow In DtInv.Rows
|
|
||||||
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
|
||||||
If drt IsNot Nothing Then
|
|
||||||
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0)
|
|
||||||
TmpDr("CveAlmacen") = drt("CveAlmacen")
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
Inv.Dispose()
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
|
CargaHidendsAC()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaGvInv()
|
CalculaTotales(True)
|
||||||
|
|
||||||
'Ocultamos "Recibir Aqui"
|
If UsuarioActual.Empresa.UsaInventarios Then
|
||||||
GvInv.Columns(6).Visible = False
|
DtInv = TmpDT.FiltraParametros(String.Format("CveTipoPS = 2")).Copy
|
||||||
GvInv.Columns(7).Visible = False
|
|
||||||
|
|
||||||
|
If dr("Inventario").ToString = "1" Then
|
||||||
|
|
||||||
|
CveMovimientoAlmacen = dr("CveMovimiento").ToString.ToEntero
|
||||||
|
|
||||||
|
Dim Inv As New ClsInventarios
|
||||||
|
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
'Dim TempParametros = Encripta(String.Format("OP=Alm&CveMovimiento={0}", dr("CveMovimiento")))
|
||||||
|
'ImgImprimirAlmacen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", TempParametros)
|
||||||
|
|
||||||
|
ImgImprimirAlmacen.Visible = True
|
||||||
|
ImgImprimirAlmacen.NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", dr("CveMovimiento"))
|
||||||
|
|
||||||
|
Dim drt As DataRow
|
||||||
|
'actualizo el almacen
|
||||||
|
For Each dri As DataRow In DtInv.Rows
|
||||||
|
|
||||||
|
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||||
|
If drt IsNot Nothing Then
|
||||||
|
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0) 'Charlie
|
||||||
|
TmpDr("CveAlmacen") = drt("CveAlmacen") 'Charlie
|
||||||
|
|
||||||
|
dri("CveAlmacen") = drt("CveAlmacen")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Proceso Super Tramposo de Charlie
|
||||||
|
If Inv.GetMovimientosDetalle(dr("CveMovimiento").ToString.ToEntero, UsuarioActual.CveEmpresa, CveCompra:=-123) Then
|
||||||
|
Dim drt As DataRow
|
||||||
|
For Each dri As DataRow In DtInv.Rows
|
||||||
|
drt = Inv.DtResultados.FiltroPrimero(String.Format("CvePS = {0} AND Cantidad = {1}", dri("CvePS"), dri("Cantidad")))
|
||||||
|
If drt IsNot Nothing Then
|
||||||
|
Dim TmpDr As DataRow = TmpDT.Select($"Consec = {dri("Consec").ToString.ToEntero}")(0)
|
||||||
|
TmpDr("CveAlmacen") = drt("CveAlmacen")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
Inv.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
CargaGvInv()
|
||||||
|
|
||||||
|
'Ocultamos "Recibir Aqui"
|
||||||
|
GvInv.Columns(6).Visible = False
|
||||||
|
GvInv.Columns(7).Visible = False
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
DdlTipoComprobante.Enabled = False
|
DdlTipoComprobante.Enabled = False
|
||||||
DdlTipoComprobante.SelectedValue = dr("TipoDocto").ToString
|
DdlTipoComprobante.SelectedValue = dr("TipoDocto").ToString
|
||||||
If dr("TipoDocto").ToString = "Fac" Then
|
If dr("TipoDocto").ToString = "Fac" Then
|
||||||
ChkAplicaNotaCredito.Enabled = True
|
ChkAplicaNotaCredito.Enabled = True
|
||||||
@@ -3958,6 +3969,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
'------------------INICIA VALIDACIONES------------------
|
'------------------INICIA VALIDACIONES------------------
|
||||||
Dim EstatusCredito As Integer = 0
|
Dim EstatusCredito As Integer = 0
|
||||||
Dim CveSubProyecto As Integer = 0
|
Dim CveSubProyecto As Integer = 0
|
||||||
@@ -6795,6 +6807,19 @@ Partial Class Compras_Compras
|
|||||||
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal
|
importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1 And ISNULL(CveTipoPS,0) = 2").ToString.ToDecimal
|
||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'cuando es emp acumuladora
|
||||||
|
|
||||||
|
Dim Valor = (From dr1 In GlobalDTAcumTamaños().FiltraParametros("CveEmpresa = 140").AsEnumerable()
|
||||||
|
Join dr2 In TmpDT.AsEnumerable On dr1.Field(Of Integer)("CvePSCargo") Equals dr2.Field(Of Integer)("CvePS")
|
||||||
|
Select New With
|
||||||
|
{
|
||||||
|
.Total = dr2.Field(Of Double)("Total")
|
||||||
|
}).Sum(Function(item) item.Total)
|
||||||
|
|
||||||
|
importeMovimiento += Valor.ToDecimal
|
||||||
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ConceptoContabilizacionNC = 225
|
Dim ConceptoContabilizacionNC = 225
|
||||||
Dim CveMovimientoDevolucion As Integer = -1
|
Dim CveMovimientoDevolucion As Integer = -1
|
||||||
|
|
||||||
|
|||||||
@@ -37,208 +37,222 @@
|
|||||||
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
|
||||||
|
Avance de Contrato
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" class="btn btn-default" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption" style="position: relative;">
|
||||||
|
<asp:UpdatePanel class="row" ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<label class="col-md-1 truncate">Contrato:</label>
|
||||||
|
<div class="col-md-6 col-lg-4">
|
||||||
|
<div class="ddls">
|
||||||
|
<asp:DropDownList ID="DdlContratos" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 col-lg-2 " style="display: none!important">
|
||||||
|
<asp:DropDownList ID="DdlAvances" runat="server" DataTextField="Name" DataValueField="Fecha" Class=" form-control input-inline select2me" Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-1" style="text-align: right!important">
|
||||||
|
Fecha:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
|
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-6" style="text-align:right!important">
|
||||||
|
<div style="display: inline-block">
|
||||||
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", Gv.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<table class="table table-striped Widthall">
|
||||||
|
<tr>
|
||||||
|
<th style="width: 300px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
<th style="width: 100px;"></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Producto / Servicio</th>
|
||||||
|
<th colspan="2">Avance</th>
|
||||||
|
<th colspan="2">Ultimo Avance</th>
|
||||||
|
<th colspan="2">Levantamiento</th>
|
||||||
|
<th style="text-align: right;">Anexo</th>
|
||||||
|
<th style="text-align: right;"></th>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||||
|
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
||||||
|
CssClass="table GVEstimacion table-advance table-hover mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false"></asp:LinkButton>
|
||||||
|
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="UM">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Abreviatura")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Importe">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Importe">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Importe">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText=" ">
|
||||||
|
<ItemTemplate>
|
||||||
|
|
||||||
|
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
||||||
|
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
||||||
|
|
||||||
|
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">Cargar Evidencia</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div style="text-align: left">
|
||||||
|
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:UpdatePanel runat="server">
|
||||||
|
<ContentTemplate>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkGuardarAvance" Text="Guardar" CssClass="btn btn-primary" runat="server" OnClick="LnkGuardarAvance_Click" Visible="false" Height="30px" ValidationGroup="GrpGuardar"></asp:LinkButton>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="text-center" runat="server" visible="false">
|
||||||
|
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%-- <ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
|
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter">
|
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
|
||||||
<div class="tools">
|
|
||||||
<asp:Button ID="BtnConsultar" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" class="btn btn-default" />
|
|
||||||
</div>
|
|
||||||
<div class="titlefiltros caption" style="position: relative;">
|
|
||||||
<asp:UpdatePanel class="row" ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<label class="col-md-1 truncate">Contrato:</label>
|
|
||||||
<div class="col-md-6 col-lg-4">
|
|
||||||
<div class="ddls">
|
|
||||||
<asp:DropDownList ID="DdlContratos" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2 col-lg-2 " style="display:none!important">
|
|
||||||
<asp:DropDownList ID="DdlAvances" runat="server" DataTextField="Name" DataValueField="Fecha" Class=" form-control input-inline select2me" Width="100%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-1" style="text-align:right!important">
|
|
||||||
Fecha:
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
|
||||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
|
||||||
<span class="input-group-btn ">
|
|
||||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
||||||
</span>
|
|
||||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align:right">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<table class="table table-striped Widthall">
|
|
||||||
<tr>
|
|
||||||
<th style="width: 300px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
<th style="width: 100px;"></th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th>Producto / Servicio</th>
|
|
||||||
<th colspan="2">Avance</th>
|
|
||||||
<th colspan="2">Ultimo Avance</th>
|
|
||||||
<th colspan="2">Levantamiento</th>
|
|
||||||
<th style="text-align: right;">Anexo</th>
|
|
||||||
<th style="text-align: right;"> </th>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
|
||||||
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
|
||||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField HeaderText="">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false"></asp:LinkButton>
|
|
||||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="UM">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Abreviatura")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Importe">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Importe">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Importe">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText=" ">
|
|
||||||
<ItemTemplate>
|
|
||||||
|
|
||||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
|
||||||
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
|
||||||
|
|
||||||
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<!-- Modal content-->
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<h4 class="modal-title">Cargar Evidencia</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<div style="text-align: left">
|
|
||||||
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkGuardarAvance" Text="Guardar" CssClass="btn btn-primary" runat="server" OnClick="LnkGuardarAvance_Click" Visible="false" ValidationGroup="GrpGuardar" ></asp:LinkButton>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="text-center" runat="server" visible ="false">
|
|
||||||
<asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
@@ -341,7 +355,7 @@
|
|||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>--%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -138,8 +138,8 @@ Partial Class Contratos_ContratoAvance
|
|||||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||||
DdlContratos.DataBind()
|
DdlContratos.DataBind()
|
||||||
|
|
||||||
DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
'DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||||
DDlContratosEstimaciones.DataBind()
|
'DDlContratosEstimaciones.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ Partial Class Contratos_ContratoAvance
|
|||||||
If e.Row.DataKey("CveContratoDetalle").ToEntero > 0 Then
|
If e.Row.DataKey("CveContratoDetalle").ToEntero > 0 Then
|
||||||
|
|
||||||
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkModalDropzone")
|
Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkModalDropzone")
|
||||||
'LnkAnexo.Visible = True
|
|
||||||
Dim DVAnexo As Control = DirectCast(e.Row.FindControl("ModalAnexoEvidencia"), Control)
|
Dim DVAnexo As Control = DirectCast(e.Row.FindControl("ModalAnexoEvidencia"), Control)
|
||||||
LnkAnexo.OnClientClick = $" $('#{DVAnexo.ClientID}').modal('show'); return false;"
|
LnkAnexo.OnClientClick = $" $('#{DVAnexo.ClientID}').modal('show'); return false;"
|
||||||
|
|
||||||
@@ -220,9 +220,20 @@ Partial Class Contratos_ContratoAvance
|
|||||||
Dim LnkGuardarAvance As LinkButton = e.Row.FCLinkButton("LnkGuardarAvance")
|
Dim LnkGuardarAvance As LinkButton = e.Row.FCLinkButton("LnkGuardarAvance")
|
||||||
LnkGuardarAvance.Visible = True
|
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 If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
Protected Sub GetAnexos(sender As Object, e As System.EventArgs)
|
||||||
@@ -432,120 +443,120 @@ Partial Class Contratos_ContratoAvance
|
|||||||
#Region "ESTIMACION"
|
#Region "ESTIMACION"
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaAvancesParaEstimar()
|
'Private Sub CargaAvancesParaEstimar()
|
||||||
CveContratoEstimacion = -1
|
' CveContratoEstimacion = -1
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos()
|
' Dim ObjContratos As New ClsContratos()
|
||||||
Dim DTEstimaciones As New DataTable
|
' Dim DTEstimaciones As New DataTable
|
||||||
Dim NumeroEstimacionActual As Integer = 0
|
' Dim NumeroEstimacionActual As Integer = 0
|
||||||
|
|
||||||
If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
|
' If ObjContratos.GetContratosAvanceEstimacion(DDlContratosEstimaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
|
||||||
DTEstimaciones = ObjContratos.DtResultados
|
' 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
|
' If DTEstimaciones.Rows.Count > 0 Then
|
||||||
GvEstimaciones.DataSource = DTEstimaciones
|
' GvEstimaciones.DataSource = DTEstimaciones
|
||||||
BtnGuardarEstimacion.Visible = True
|
' BtnGuardarEstimacion.Visible = True
|
||||||
Else
|
' Else
|
||||||
GvEstimaciones.DataSource = Nothing
|
' GvEstimaciones.DataSource = Nothing
|
||||||
BtnGuardarEstimacion.Visible = False
|
' BtnGuardarEstimacion.Visible = False
|
||||||
End If
|
' End If
|
||||||
GvEstimaciones.DataBind()
|
' GvEstimaciones.DataBind()
|
||||||
|
|
||||||
UpEstimaciones.Update()
|
' UpEstimaciones.Update()
|
||||||
End Sub
|
'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("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||||
If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
' If e.Row.DBCampo("CveFamilias").ToString.ToEntero = 0 Then
|
||||||
e.Row.CssClass = "SubTotales"
|
' e.Row.CssClass = "SubTotales"
|
||||||
Else
|
' Else
|
||||||
e.Row.CssClass = "SubTotales2"
|
' e.Row.CssClass = "SubTotales2"
|
||||||
End If
|
' End If
|
||||||
Else
|
' Else
|
||||||
e.Row.CssClass = "SubTotales3"
|
' e.Row.CssClass = "SubTotales3"
|
||||||
End If
|
' End If
|
||||||
End If
|
' 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
|
' CveEstimacionNueva = -1
|
||||||
NuemeroEstimacionNuevo = -1
|
' NuemeroEstimacionNuevo = -1
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos()
|
' Dim ObjContratos As New ClsContratos()
|
||||||
Dim ErrorProceso As Boolean = False
|
' 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
|
' CveEstimacionNueva = ObjContratos.CveEstimacionNueva
|
||||||
NuemeroEstimacionNuevo = ObjContratos.NumeroEstimacionNueva
|
' 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 GvRow.DataKey("CveContratoAvance").ToEntero > 0 Then
|
||||||
If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
|
' If Not ObjContratos.UpdateContratosAvanceEstimacion(GvRow.DataKey("CveContratoAvance").ToEntero, ObjContratos.CveEstimacionNueva, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorProceso = True
|
' ErrorProceso = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
Else
|
' Else
|
||||||
ErrorProceso = True
|
' ErrorProceso = True
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
'AddContratosAvanceEstimacion
|
' 'AddContratosAvanceEstimacion
|
||||||
'UpdateContratosAvanceEstimacion
|
' 'UpdateContratosAvanceEstimacion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorProceso Then
|
' If Not ErrorProceso Then
|
||||||
ObjContratos.Commit()
|
' ObjContratos.Commit()
|
||||||
Alert($"Estimación {NuemeroEstimacionNuevo} agregada correctamente.")
|
' Alert($"Estimación {NuemeroEstimacionNuevo} agregada correctamente.")
|
||||||
|
|
||||||
BtnGuardarEstimacion.Visible = False
|
' BtnGuardarEstimacion.Visible = False
|
||||||
BtnDescargarGenerado.Visible = True
|
' BtnDescargarGenerado.Visible = True
|
||||||
|
|
||||||
Else
|
' Else
|
||||||
ObjContratos.RollBack()
|
' ObjContratos.RollBack()
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
' ObjContratos.Dispose()
|
||||||
|
|
||||||
UpEstimaciones.Update()
|
' UpEstimaciones.Update()
|
||||||
End Sub
|
'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)
|
Private Sub GeneraAnexo(CveEstimacion As Integer, NumeroEstimacion As Integer, FechaEstimacion As Date, NumeroContrato As String)
|
||||||
|
|
||||||
|
|||||||
@@ -320,24 +320,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Datos del Contrato</div>
|
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Datos del Contrato</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding">
|
<div class="portlet-body rowpadding">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 truncate">No. Contrato:</label>
|
<label class="col-md-3 truncate">No. Contrato:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtNumeroContrato" runat="server" Width="200px" MaxLength="50"></asp:TextBox>
|
<asp:TextBox ID="TxtNumeroContrato" runat="server" Width="200px" MaxLength="50"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVNumeroContrato" runat="server" ControlToValidate="TxtNumeroContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''No. Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVNumeroContrato" runat="server" ControlToValidate="TxtNumeroContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''No. Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCENumeroContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroContrato" Width="300px" BehaviorID="_content_VCENumeroContrato"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCENumeroContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroContrato" Width="300px" BehaviorID="_content_VCENumeroContrato"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 truncate">Descripción del Contrato:</label>
|
<label class="col-md-3 truncate">Descripción del Contrato:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtDescripcionContrato" runat="server" MaxLength="70" Width="400px" TextMode="MultiLine" ></asp:TextBox>
|
<asp:TextBox ID="TxtDescripcionContrato" runat="server" MaxLength="70" Width="400px" TextMode="MultiLine" ></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVDescripcionContrato" runat="server" ControlToValidate="TxtDescripcionContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''DescripcionContrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDescripcionContrato" runat="server" ControlToValidate="TxtDescripcionContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''DescripcionContrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEDescripcionContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcionContrato" Width="300px" BehaviorID="_content_VCEDescripcionContrato"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -345,16 +341,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="trLicitacion" runat="server" class="row">
|
<div id="trLicitacion" runat="server" class="row">
|
||||||
<label class="col-md-2 truncate">Número Licitación:</label>
|
<label class="col-md-3 truncate">Número Licitación:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox>
|
<asp:TextBox ID="TxtNumeroLicitacion" runat="server" MaxLength="70" Width="200px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="TrProveedor" runat="server">
|
<div class="row" id="TrProveedor" runat="server">
|
||||||
<label class="col-md-2 truncate ">
|
<label class="col-md-3 truncate ">
|
||||||
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
|
<asp:Label ID="LblProveedor" runat="server" Text="Proveedor:"></asp:Label></label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlContratista" runat="server" CssClass="input-sm form-control select2me" AppendDataBoundItems="True" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
@@ -363,10 +359,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row" >
|
<div class="row" >
|
||||||
<label class="col-md-2 truncate ">
|
<label class="col-md-3 truncate ">
|
||||||
<asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label></label>
|
<asp:Label ID="LblCliente" runat="server" Text="Cliente:"></asp:Label></label>
|
||||||
|
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="True" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 350px !important;" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
@@ -378,21 +374,21 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row" style="display: none;">
|
<div class="row" style="display: none;">
|
||||||
<label class="col-md-2 truncate ">Ubicacion:</label>
|
<label class="col-md-3 truncate ">Ubicacion:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" id="divResponsable" runat="server">
|
<div class="row" id="divResponsable" runat="server">
|
||||||
<label class="col-md-2 truncate ">Responsable:</label>
|
<label class="col-md-3 truncate ">Responsable:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtResponsable" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
<asp:TextBox ID="TxtResponsable" runat="server" MaxLength="50" Width="400px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="div3" runat="server">
|
<div class="row" id="div3" runat="server">
|
||||||
<label class="col-md-2 truncate ">Lugar:</label>
|
<label class="col-md-3 truncate ">Lugar:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtLugar" runat="server" MaxLength="300" Width="400px"></asp:TextBox>
|
<asp:TextBox ID="TxtLugar" runat="server" MaxLength="300" Width="400px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -400,8 +396,8 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<label class="col-md-2 truncate">Tipo Contrato:</label>
|
<label class="col-md-3 truncate">Tipo Contrato:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlTipoContratoObra" runat="server" CssClass="select2me" Width="150px" >
|
<asp:DropDownList ID="DdlTipoContratoObra" runat="server" CssClass="select2me" Width="150px" >
|
||||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||||
<asp:ListItem Value="30">Obra</asp:ListItem>
|
<asp:ListItem Value="30">Obra</asp:ListItem>
|
||||||
@@ -415,8 +411,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 truncate">Fecha Inicial:</label>
|
<label class="col-md-3 truncate">Fecha Inicial:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtFechaInicial" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox><span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioInicial" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
<asp:TextBox ID="TxtFechaInicial" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox><span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioInicial" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -427,8 +423,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 truncate">Fecha Final:</label>
|
<label class="col-md-3 truncate">Fecha Final:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtFechaFinal" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox><span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioFinal" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
<asp:TextBox ID="TxtFechaFinal" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox><span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioFinal" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -445,8 +441,8 @@
|
|||||||
|
|
||||||
<div class="row" id="DVddlproyecto" runat="server">
|
<div class="row" id="DVddlproyecto" runat="server">
|
||||||
|
|
||||||
<asp:Label runat="server" ID="LblProyecto" class="col-md-2 truncate">Proyecto:</asp:Label>
|
<asp:Label runat="server" ID="LblProyecto" class="col-md-3 truncate">Proyecto:</asp:Label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 200px;" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-sm select2me" Style="width: 200px;" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Sin Proyecto asignado" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Sin Proyecto asignado" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
@@ -459,8 +455,8 @@
|
|||||||
|
|
||||||
<div class="row" id="DVSubProyecto" runat="server" visible="false">
|
<div class="row" id="DVSubProyecto" runat="server" visible="false">
|
||||||
|
|
||||||
<asp:Label runat="server" ID="LblSubProyectoTitulo" class="col-md-2 truncate"></asp:Label>
|
<asp:Label runat="server" ID="LblSubProyectoTitulo" class="col-md-3 truncate"></asp:Label>
|
||||||
<asp:Label runat="server" ID="LblSubProyecto" class="col-md-10 truncate"></asp:Label>
|
<asp:Label runat="server" ID="LblSubProyecto" class="col-md-9 truncate"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -484,24 +480,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Información</div>
|
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Información</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding">
|
|
||||||
|
<div class="portlet-body rowpadding">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row" id="TrCliente" runat="server" visible="False">
|
<div class="row" id="TrCliente" runat="server" visible="False">
|
||||||
<label class="col-md-2 truncate">
|
<label class="col-md-3 ">
|
||||||
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label><div class="col-md-10">
|
<asp:Label ID="Label1" runat="server" Text="Cliente:"></asp:Label></label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row" id="TrClienteSucursal" runat="server" visible="False">
|
<div class="row" id="TrClienteSucursal" runat="server" visible="False">
|
||||||
<label class="col-md-2 truncate">
|
<label class="col-md-3 ">
|
||||||
<asp:Label ID="Label2" runat="server" Text="Sucursal Cliente:"></asp:Label></label><div class="col-md-10">
|
<asp:Label ID="Label2" runat="server" Text="Sucursal Cliente:"></asp:Label></label>
|
||||||
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Width="75%">
|
<asp:DropDownList ID="DdlSucursalCliente" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Width="75%">
|
||||||
<asp:ListItem Selected="true" Text="Matriz" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="true" Text="Matriz" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
@@ -514,64 +509,64 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2 truncate">Moneda:</label>
|
<label class="col-md-3 ">Moneda:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" AutoPostBack="True" DataValueField="CveMoneda" Width="150px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" DataTextField="Moneda" AutoPostBack="True" DataValueField="CveMoneda" Width="200px"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" id="tipoCambio" visible="False">
|
<div class="row" runat="server" id="tipoCambio" visible="False">
|
||||||
<label class="col-md-2 truncate">Tipo de cambio:</label>
|
<label class="col-md-3 ">Tipo de cambio:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtTipoCambio" runat="server" MaxLength="12" Width="90px"></asp:TextBox>
|
<asp:TextBox ID="TxtTipoCambio" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="TxtTipoCambio" FilterType="Custom, Numbers" ValidChars="." BehaviorID="_content_SoloNumeros" />
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" TargetControlID="TxtTipoCambio" FilterType="Custom, Numbers" ValidChars="." BehaviorID="_content_SoloNumeros" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="trIva" runat="server" class="row">
|
<div id="trIva" runat="server" class="row">
|
||||||
<label class="col-md-2 truncate">% IVA:</label>
|
<label class="col-md-3 ">% IVA:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtPorIVA" runat="server" MaxLength="12" Width="150px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPorIVA" FilterType="Custom, Numbers" ValidChars="." BehaviorID="_content_SoloNumeros" />
|
<asp:TextBox ID="TxtPorIVA" runat="server" MaxLength="12" Width="200px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPorIVA" FilterType="Custom, Numbers" ValidChars="." BehaviorID="_content_SoloNumeros" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="trAnticipo" runat="server" class="row">
|
<div id="trAnticipo" runat="server" class="row">
|
||||||
<label class="col-md-2 truncate ">% Anticipo:</label>
|
<label class="col-md-3 ">% Anticipo:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtPorAnticipo" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
<asp:TextBox ID="TxtPorAnticipo" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="trAmortizacion" runat="server" class="row">
|
<div id="trAmortizacion" runat="server" class="row">
|
||||||
<label class="col-md-2 truncate ">% Amortización de Anticipo:</label>
|
<label class="col-md-3 ">% Amortización de Anticipo:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtPorAmortizacionAnticipo" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
<asp:TextBox ID="TxtPorAmortizacionAnticipo" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="trPorGarantia" runat="server" class="row">
|
<div id="trPorGarantia" runat="server" class="row">
|
||||||
<label class="col-md-2 truncate ">% Garantía:</label>
|
<label class="col-md-3 ">% Garantía:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtPorGarantia" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
<asp:TextBox ID="TxtPorGarantia" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row" runat="server">
|
<div class="row" runat="server">
|
||||||
<label class="col-md-2 truncate ">% Limite de Gastos:</label>
|
<label class="col-md-3 ">% Limite de Gastos:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtLimiteGastos" runat="server" MaxLength="5" Width="150px"></asp:TextBox>
|
<asp:TextBox ID="TxtLimiteGastos" runat="server" MaxLength="5" Width="200px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtLimiteGastos" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtLimiteGastos" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" id="DvTotal" runat="server">
|
<div class="row" id="DvTotal" runat="server">
|
||||||
<label class="col-md-2 truncate ">Total:</label>
|
<label class="col-md-3 ">Total con IVA:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtTotal" runat="server" MaxLength="12" Width="150px"></asp:TextBox>
|
<asp:TextBox ID="TxtTotal" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="TxtTotal" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender8" runat="server" TargetControlID="TxtTotal" FilterType="Custom, Numbers" ValidChars=",." BehaviorID="_content_SoloNumeros" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row" id="DvObservaciones" runat="server" visible="false">
|
<div class="row" id="DvObservaciones" runat="server" visible="false">
|
||||||
<label class="col-md-2 truncate ">Observación de Facturación:</label>
|
<label class="col-md-3 ">Observación de Facturación:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-9">
|
||||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="400px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
<asp:TextBox ID="TxtObservaciones" runat="server" Width="400px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1274,12 +1269,12 @@
|
|||||||
<div id="dvCa" style="width: 100%; top: 30px">
|
<div id="dvCa" style="width: 100%; top: 30px">
|
||||||
<table id="dTable" class="table Widthall ">
|
<table id="dTable" class="table Widthall ">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
<td width="25%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||||
<td width="15%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
<td width="10%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||||
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
<td width="18%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||||
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
<td width="18%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||||
<td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
<td width="10%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||||
<td width="10%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>
|
<td width="5%" id="TH6" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Anticipo</strong> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -1303,10 +1298,14 @@
|
|||||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||||
|
<asp:BoundField HeaderText="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
<asp:LinkButton ID="LBAvanceXFacturarCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceXFacturarCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||||
@@ -1346,8 +1345,8 @@
|
|||||||
<div id="dvCaCon" style="width: 100%; top: 30px">
|
<div id="dvCaCon" style="width: 100%; top: 30px">
|
||||||
<table id="dTable" class="table Widthall ">
|
<table id="dTable" class="table Widthall ">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
<td width="25%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||||
<td width="15%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
<td width="10%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||||
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
<td width="15%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||||
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
<td width="15%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||||
<%-- <td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
<%-- <td width="15%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||||
@@ -1375,9 +1374,11 @@
|
|||||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Cantidad" DataField="FaltanteCantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Importe $" DataField="FaltanteImporte" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,##0.00##}" ItemStyle-Width="7.5%" />
|
||||||
|
<asp:BoundField HeaderText="%" DataField="FaltantePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||||
|
|
||||||
<%-- <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
<%-- <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Autorización de Avance
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -45,130 +46,140 @@
|
|||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación">
|
|
||||||
<ContentTemplate>
|
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter">
|
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
|
||||||
|
|
||||||
<div class="tools">
|
|
||||||
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="titlefiltros caption" style="position: relative;">
|
|
||||||
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<label class="col-md-1 truncate">Contrato:</label>
|
|
||||||
<div class="col-md-6 col-lg-4">
|
|
||||||
<div class="ddls">
|
|
||||||
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
|
||||||
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance,Fecha,CveEstimacion"
|
|
||||||
CssClass="table GVEstimacion table-advance table-hover mysmallbtn" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField HeaderText="" ItemStyle-Width="60%">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
|
|
||||||
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Importe">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Importe", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Cantidad">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Importe">
|
|
||||||
<ItemTemplate>
|
|
||||||
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Acciones">
|
|
||||||
<ItemTemplate>
|
|
||||||
|
|
||||||
<table style="width:120px!important">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" Visible="false" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:LinkButton ID="LnkEliminarAvance" runat="server" OnClick="LnkEliminarAvance_Click" AlternateText="Agregar Anexo" Visible="false"
|
|
||||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Confimra la elimiancion del avance?" data-btn-ok-label="si"
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
</ItemTemplate>
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
</asp:TemplateField>
|
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
|
||||||
|
</div>
|
||||||
|
|
||||||
</Columns>
|
<div class="titlefiltros caption" style="position: relative;">
|
||||||
</asp:GridView>
|
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
</div>
|
<label class="col-md-1 truncate">Contrato:</label>
|
||||||
</div>
|
<div class="col-md-6 col-lg-4">
|
||||||
|
<div class="ddls">
|
||||||
|
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
||||||
<div class="row">
|
</asp:DropDownList>
|
||||||
<div class="col-md-12">
|
</div>
|
||||||
<div class="text-center">
|
</div>
|
||||||
|
|
||||||
<asp:Button id="BtnAutoriza" CssClass="btn btn-primary" runat="server" Text="Autorizar" Visible="false" OnClick="BtnAutoriza_Click" />
|
</ContentTemplate>
|
||||||
<asp:Button id="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false"/>
|
</asp:UpdatePanel>
|
||||||
<asp:Button id="BtnDescargarGenerado" CssClass="btn btn-primary" runat="server" Text="Descarga Generador" Visible="false"/>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
<div class="row">
|
||||||
</ContentTemplate>
|
|
||||||
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-6" style="text-align:right!important">
|
||||||
|
<div style="display: inline-block">
|
||||||
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEstimaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEstimaciones.ClientID) %>" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
||||||
|
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance,Fecha,CveEstimacion"
|
||||||
|
CssClass="table GVEstimacion table-advance table-hover mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="" ItemStyle-Width="60%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false"></asp:LinkButton>
|
||||||
|
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Importe">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Importe", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Cantidad">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Importe">
|
||||||
|
<ItemTemplate>
|
||||||
|
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Acciones">
|
||||||
|
<ItemTemplate>
|
||||||
|
|
||||||
|
<table style="width: 120px!important">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" Visible="false" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<asp:LinkButton ID="LnkEliminarAvance" runat="server" OnClick="LnkEliminarAvance_Click" AlternateText="Agregar Anexo" Visible="false"
|
||||||
|
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Confimra la elimiancion del avance?" data-btn-ok-label="si" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="text-center">
|
||||||
|
|
||||||
|
<asp:Button ID="BtnAutoriza" CssClass="btn btn-primary" runat="server" Text="Autorizar" Visible="false" OnClick="BtnAutoriza_Click" />
|
||||||
|
<asp:Button ID="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false" />
|
||||||
|
<asp:Button ID="BtnDescargarGenerado" CssClass="btn btn-primary" runat="server" Text="Descarga Generador" Visible="false" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="BtnDescargarGenerado" />
|
<asp:PostBackTrigger ControlID="BtnDescargarGenerado" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
|
|
||||||
|
|
||||||
</ajax:TabContainer>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -221,14 +221,26 @@
|
|||||||
|
|
||||||
<asp:TemplateField HeaderText="Avance $">
|
<asp:TemplateField HeaderText="Avance $">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
<asp:Label ID="LblAvanceImporte" CssClass="Texto" runat="server" Text='<%# Eval("AvanceImporte", "{0:N2}")%>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Facturado">
|
<asp:TemplateField HeaderText="Avance Acumulado $">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="LblFacturado" CssClass="Texto" runat="server" Text='<%# Eval("Facturado")%>'></asp:Label>
|
<asp:Label ID="LblAvanceAcumuladoImporte" CssClass="Texto" runat="server" Text='<%# Eval("AvanceAcumuladoImporte", "{0:N2}")%>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Factura" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="~/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" Target="_blank" />
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Estado">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LblEstatus" CssClass="Texto" runat="server" Text='<%# Eval("EstimacionEstatus")%>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ Partial Class RepContratosObraAvancesDetalle
|
|||||||
Dim objContrato As New ClsContratos
|
Dim objContrato As New ClsContratos
|
||||||
Dim DTArchivos As New DataTable
|
Dim DTArchivos As New DataTable
|
||||||
|
|
||||||
If objContrato.GetContratosAvanceAnexos(Drow("CveContratoDetalle").ToString.ToEntero, Drow("Fecha").ToString, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
|
If objContrato.GetContratosAvanceAnexos(Drow("CveContratoDetalle").ToString.ToEntero, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion) Then
|
||||||
DTArchivos = objContrato.DtResultados
|
DTArchivos = objContrato.DtResultados
|
||||||
End If
|
End If
|
||||||
objContrato.Dispose()
|
objContrato.Dispose()
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ Partial Class RepContratosObraAvancesPartida
|
|||||||
Dim CveContratoAvance As Integer = GvRow.DataKey("CveContratoAvance").ToEntero
|
Dim CveContratoAvance As Integer = GvRow.DataKey("CveContratoAvance").ToEntero
|
||||||
|
|
||||||
Dim objContrato As New ClsContratos
|
Dim objContrato As New ClsContratos
|
||||||
If objContrato.GetContratosAvanceAnexos(CveContratoDetalle, Fecha, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion, CveContratoAvance:=CveContratoAvance) Then
|
If objContrato.GetContratosAvanceAnexos(CveContratoDetalle, UsuarioActual.CveUsuario, CveEstimacion:=CveEstimacion, CveContratoAvance:=CveContratoAvance) Then
|
||||||
GvAnexos.DataSource = objContrato.DtResultados
|
GvAnexos.DataSource = objContrato.DtResultados
|
||||||
GvAnexos.DataBind()
|
GvAnexos.DataBind()
|
||||||
GvAnexos.Visible = True
|
GvAnexos.Visible = True
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,IdCtaContable,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden,CveCuenta,CveUsuarioAutoriza" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,IdCtaContable,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden,CveCuenta,CveUsuarioAutoriza,CveAlmacenVirtual" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Almacen">
|
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Almacen">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -314,8 +314,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
<div id="divAlmacenesVirtuales" runat="server" class="row" visible="false">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:DropDownList ID="DdlAlmacenesVirtuales" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" Width="50%" CssClass="form-control input-sm select2me"/>
|
||||||
|
<asp:Label AssociatedControlID="DdlAlmacenesVirtuales" runat="server" Text="Almacén Virtual:"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
CargaTipoAlmacen()
|
CargaTipoAlmacen()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
CargaUsuarios()
|
CargaUsuarios()
|
||||||
|
CargaAlmacenVirtual()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -64,7 +65,14 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
ObjAlmacen.Dispose()
|
ObjAlmacen.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaAlmacenVirtual()
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
divAlmacenesVirtuales.Visible = True
|
||||||
|
DdlAlmacenesVirtuales.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 24)
|
||||||
|
DdlAlmacenesVirtuales.DataBind()
|
||||||
|
DdlAlmacenesVirtuales.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "C O M B O S"
|
#Region "C O M B O S"
|
||||||
|
|
||||||
@@ -84,23 +92,23 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
DdlTipoAlmacen.DataBind()
|
DdlTipoAlmacen.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaUsuarios()
|
Private Sub CargaUsuarios()
|
||||||
|
|
||||||
Dim DT As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 1 ").Copy
|
Dim DT As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 1 ").Copy
|
||||||
|
|
||||||
DT.DefaultView.Sort = "Nombre ASC"
|
DT.DefaultView.Sort = "Nombre ASC"
|
||||||
DT = DT.DefaultView.ToTable
|
DT = DT.DefaultView.ToTable
|
||||||
|
|
||||||
DdlUsuariosAutoriza.DataSource = DT
|
DdlUsuariosAutoriza.DataSource = DT
|
||||||
DdlUsuariosAutoriza.DataBind()
|
DdlUsuariosAutoriza.DataBind()
|
||||||
|
|
||||||
DdlUsuariosAutoriza.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
DdlUsuariosAutoriza.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCuentasContables()
|
Private Sub CargaCuentasContables()
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||||
divCuentasCompac.Visible = False
|
divCuentasCompac.Visible = False
|
||||||
pnlCuentassig.Visible = True
|
pnlCuentassig.Visible = True
|
||||||
Using ObjContabilidad As New ClsContabilidad
|
Using ObjContabilidad As New ClsContabilidad
|
||||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||||
@@ -111,22 +119,22 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
divCuentasCompac.Visible = True
|
divCuentasCompac.Visible = True
|
||||||
pnlCuentassig.Visible = False
|
pnlCuentassig.Visible = False
|
||||||
Using ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
Using ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
'UsuarioActual.Empresa.Funcionalidad(208).ToEntero
|
||||||
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
|
If ObjContabilidad.GetCuentasRecursiva(UsuarioActual.Empresa.Funcionalidad(208).ToEntero, 1) Then
|
||||||
DtCuentasContables = ObjContabilidad.DtResultados
|
DtCuentasContables = ObjContabilidad.DtResultados
|
||||||
Else
|
Else
|
||||||
DtCuentasContables = Nothing
|
DtCuentasContables = Nothing
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
DdlCuentasContables.DataSource = DtCuentasContables
|
DdlCuentasContables.DataSource = DtCuentasContables
|
||||||
DdlCuentasContables.DataBind()
|
DdlCuentasContables.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpAddAlmacen.Update()
|
UpAddAlmacen.Update()
|
||||||
@@ -159,9 +167,9 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||||
|
|
||||||
If e.Row.DBCampo("IdCtaContable").ToEntero > 0 Then
|
If e.Row.DBCampo("IdCtaContable").ToEntero > 0 Then
|
||||||
e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}")
|
e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}")
|
||||||
'Else
|
'Else
|
||||||
' e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta"
|
' e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -184,14 +192,14 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
|
|
||||||
e.Row.FCDropDownList("DdlTipoAlmacen").DataSource = GlobalDTTipoAlmacen(-1)
|
e.Row.FCDropDownList("DdlTipoAlmacen").DataSource = GlobalDTTipoAlmacen(-1)
|
||||||
e.Row.FCDropDownList("DdlTipoAlmacen").DataBind()
|
e.Row.FCDropDownList("DdlTipoAlmacen").DataBind()
|
||||||
e.Row.FCDropDownList("DdlTipoAlmacen").SelectedValue = e.Row.DBCampo("CveTipoAlmacen")
|
e.Row.FCDropDownList("DdlTipoAlmacen").SelectedValue = e.Row.DBCampo("CveTipoAlmacen")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'e.Row.FCDropDownList("DdlModalidad").DataSource =
|
'e.Row.FCDropDownList("DdlModalidad").DataSource =
|
||||||
'e.Row.FCDropDownList("DdlModalidad").DataBind()
|
'e.Row.FCDropDownList("DdlModalidad").DataBind()
|
||||||
e.Row.FCDropDownList("DdlModalidad").Items.Add(New ListItem("Solo Existencia", "0"))
|
e.Row.FCDropDownList("DdlModalidad").Items.Add(New ListItem("Solo Existencia", "0"))
|
||||||
e.Row.FCDropDownList("DdlModalidad").Items.Add(New ListItem("Contable", "1"))
|
e.Row.FCDropDownList("DdlModalidad").Items.Add(New ListItem("Contable", "1"))
|
||||||
e.Row.FCDropDownList("DdlModalidad").SelectedValue = If(e.Row.DBCampo("Modalidad").ToString = "Contable", "1", "0")
|
e.Row.FCDropDownList("DdlModalidad").SelectedValue = If(e.Row.DBCampo("Modalidad").ToString = "Contable", "1", "0")
|
||||||
@@ -199,20 +207,20 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "O R D E N A M I E N T O"
|
#Region "O R D E N A M I E N T O"
|
||||||
'Private Sub OrdenaDatos()
|
'Private Sub OrdenaDatos()
|
||||||
' If (GvDatos.Rows.Count > 0) Then
|
' If (GvDatos.Rows.Count > 0) Then
|
||||||
' GvDatos.UseAccessibleHeader = True
|
' GvDatos.UseAccessibleHeader = True
|
||||||
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||||
' RegistraScript("OrdenarGV();")
|
' RegistraScript("OrdenarGV();")
|
||||||
' End If
|
' End If
|
||||||
'End Sub
|
'End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Sub RecargaGlobalAlmacenes()
|
Private Sub RecargaGlobalAlmacenes()
|
||||||
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
||||||
'Dim ObjAlmacen As New ClsInventarios
|
'Dim ObjAlmacen As New ClsInventarios
|
||||||
@@ -239,19 +247,21 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
Dim Estatus = 0
|
Dim Estatus = 0
|
||||||
If ChkEstatus.Checked Then Estatus = 1
|
If ChkEstatus.Checked Then Estatus = 1
|
||||||
Dim CuentaContable As Integer = 0
|
Dim CuentaContable As Integer = 0
|
||||||
Dim CveCuenta As Integer = 0
|
Dim CveCuenta As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
If pnlCuentassig.Visible Then
|
If pnlCuentassig.Visible Then
|
||||||
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
|
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
|
||||||
End If
|
End If
|
||||||
If divCuentasCompac.Visible Then
|
If divCuentasCompac.Visible Then
|
||||||
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
|
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If HdnModalidad.Value = "A" Then
|
If HdnModalidad.Value = "A" Then
|
||||||
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero) Then
|
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero,
|
||||||
|
CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero()) Then
|
||||||
Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
@@ -261,7 +271,7 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero) Then
|
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then
|
||||||
Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
@@ -278,7 +288,7 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Agregar()
|
Public Sub Agregar()
|
||||||
HdnModalidad.Value = "A"
|
HdnModalidad.Value = "A"
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
If DdlModalidad.SelectedValue = 1 Then
|
If DdlModalidad.SelectedValue = 1 Then
|
||||||
DdlCuentasContables.Visible = True
|
DdlCuentasContables.Visible = True
|
||||||
@@ -290,6 +300,7 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
ChkEstatus.Checked = True
|
ChkEstatus.Checked = True
|
||||||
divEstatus.Visible = False
|
divEstatus.Visible = False
|
||||||
DdlUsuariosAutoriza.SelectedValueExist("-1")
|
DdlUsuariosAutoriza.SelectedValueExist("-1")
|
||||||
|
DdlAlmacenesVirtuales.SelectedValue = "-1"
|
||||||
|
|
||||||
UpAddAlmacen.Update()
|
UpAddAlmacen.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddAlmacen"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddAlmacen"))
|
||||||
@@ -326,16 +337,17 @@ Partial Class Inventarios_CatAlmacenes
|
|||||||
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
|
||||||
DdlTipoAlmacen.SelectedValueExist(GvRow.DataKey("CveTipoAlmacen"))
|
DdlTipoAlmacen.SelectedValueExist(GvRow.DataKey("CveTipoAlmacen"))
|
||||||
TxtAlmacen.Text = GvRow.DataKey("Almacen")
|
TxtAlmacen.Text = GvRow.DataKey("Almacen")
|
||||||
TxtOrden.Text = GvRow.DataKey("Orden")
|
TxtOrden.Text = GvRow.DataKey("Orden")
|
||||||
DdlUsuariosAutoriza.SelectedValueExist(If(GvRow.DataKey("CveUsuarioAutoriza").ToEntero > 0, GvRow.DataKey("CveUsuarioAutoriza"), "-1"))
|
DdlUsuariosAutoriza.SelectedValueExist(If(GvRow.DataKey("CveUsuarioAutoriza").ToEntero > 0, GvRow.DataKey("CveUsuarioAutoriza"), "-1"))
|
||||||
|
DdlAlmacenesVirtuales.SelectedValueExist(GvRow.DataKey("CveAlmacenVirtual"))
|
||||||
|
|
||||||
|
|
||||||
divEstatus.Visible = True
|
divEstatus.Visible = True
|
||||||
ChkEstatus.Checked = If((GvRow.DataKey("Estatus")) = "Activo", True, False)
|
ChkEstatus.Checked = If((GvRow.DataKey("Estatus")) = "Activo", True, False)
|
||||||
UpAddAlmacen.Update()
|
UpAddAlmacen.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddAlmacen"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddAlmacen"))
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub LnkAlmacen_Click(sender As Object, e As EventArgs) Handles LnkAlmacen.Click
|
Private Sub LnkAlmacen_Click(sender As Object, e As EventArgs) Handles LnkAlmacen.Click
|
||||||
Agregar()
|
Agregar()
|
||||||
|
|||||||
@@ -551,18 +551,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DdlTipo.Items.Insert(0, New ListItem("Compra", "1"))
|
DdlTipo.Items.Insert(0, New ListItem("Compra", "1"))
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then
|
||||||
DdlTipo.Items.Insert(1, New ListItem("OC", "2"))
|
DdlTipo.Items.Add(New ListItem("OC", "2"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(155).ToEntero > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(155).ToEntero > 0 Then
|
||||||
DdlTipo.Items.Insert(DdlTipo.Items.Count - 1, New ListItem("Importación", "3"))
|
DdlTipo.Items.Add(New ListItem("Importación", "3"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(158).ToEntero > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(158).ToEntero > 0 Then
|
||||||
DdlTipo.Items.Insert(DdlTipo.Items.Count - 1, New ListItem("Costo Indirecto", "4"))
|
DdlTipo.Items.Add(New ListItem("Costo Indirecto", "4"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpFiltros.Update()
|
UpFiltros.Update()
|
||||||
@@ -774,7 +771,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim DtPendientes As New DataTable
|
Dim DtPendientes As New DataTable
|
||||||
|
|
||||||
If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140, 1, 72, 80), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
|
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140, 1, 72, 80, 153, 154), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
|
||||||
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
|
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
|
||||||
Else
|
Else
|
||||||
DtPendientes = Nothing
|
DtPendientes = Nothing
|
||||||
@@ -2251,7 +2248,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
Retorno = False
|
Retorno = False
|
||||||
|
|||||||
@@ -84,14 +84,13 @@
|
|||||||
<label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Usuario Registró:</label>
|
<label class="col-md-1 " runat="server" style="margin-top: 5px; font-size:12px;">Usuario Registró:</label>
|
||||||
<div class="col-md-2" runat="server">
|
<div class="col-md-2" runat="server">
|
||||||
<asp:DropDownList ID="DdlUsuarios" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveUsuario" DataTextField="Nombre" ValidationGroup="GrpGuardar" CssClass="select2me">
|
<asp:DropDownList ID="DdlUsuarios" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveUsuario" DataTextField="Nombre" ValidationGroup="GrpGuardar" CssClass="select2me">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:Label runat="server" ID="lblSubProyecto" class="col-md-1 " style="margin-top: 5px; font-size:12px;">Subproyecto:</asp:Label>
|
<asp:Label runat="server" ID="lblSubProyecto" class="col-md-1 " style="margin-top: 5px; font-size:12px;">Subproyecto:</asp:Label>
|
||||||
<div class="col-md-2" runat="server">
|
<div class="col-md-2" runat="server">
|
||||||
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
|
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
|||||||
{
|
{
|
||||||
DdlProveedores.setEsWebService(true);
|
DdlProveedores.setEsWebService(true);
|
||||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores");
|
DdlProveedores.Attributes.Add("data-metodo", "getproveedores");
|
||||||
DdlProveedores.SelectedText = "Seleccione";
|
DdlProveedores.SelectedText = "Todos";
|
||||||
DdlProveedores.SelectedValue = "-1";
|
DdlProveedores.SelectedValue = "-1";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,6 +158,10 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
|||||||
if (DdlProveedores.SelectedValue != "-1") { Proveedor = $" <b>Proveedor:</b> {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; }
|
if (DdlProveedores.SelectedValue != "-1") { Proveedor = $" <b>Proveedor:</b> {DdlProveedores.ddl.SelectedItem.Text}"; } else { Proveedor = ""; }
|
||||||
String Estatus;
|
String Estatus;
|
||||||
if (DdlEstatus.SelectedValue != "1") { Estatus = $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; }
|
if (DdlEstatus.SelectedValue != "1") { Estatus = $" <b>Estatus:</b> {DdlEstatus.SelectedItem.Text}"; } else { Estatus = ""; }
|
||||||
|
String Usuario;
|
||||||
|
if (DdlUsuarios.SelectedValue != "-1") { Usuario = $" <b>Usuario:</b> {DdlUsuarios.SelectedItem.Text}"; } else { Usuario = ""; }
|
||||||
|
String SubProyectos;
|
||||||
|
if (DdlSubProyecto.SelectedValue != "-1") { SubProyectos = $" <b>{lblSubProyecto.Text}:</b> {DdlSubProyecto.SelectedItem.Text}"; } else { SubProyectos = ""; }
|
||||||
|
|
||||||
if (DtDatos.Rows.Count > 0)
|
if (DtDatos.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -167,7 +171,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
|||||||
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||||
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||||
para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue));
|
para.Add(new ReportParameter("Estatus", DdlEstatus.SelectedValue));
|
||||||
String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}";
|
String Agrupadores = $"{Proveedor}{FechaI}{FechaF}{Estatus}{Usuario}{SubProyectos}";
|
||||||
para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $"<b>Agrupado Por:</b> {Agrupadores}")));
|
para.Add(new ReportParameter("AgrupadoPor", (Agrupadores == "" ? "": $"<b>Agrupado Por:</b> {Agrupadores}")));
|
||||||
if (Imagen.Exists)
|
if (Imagen.Exists)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,132 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatChecadorEstaciones.aspx.vb" Inherits="RH_CatChecadorEstaciones" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
|
||||||
Catálogo Estaciones
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LnkChecadorEstaciones" runat="server"><i class="fa fa-plus-circle"></i> Agregar</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:HiddenField ClientIDMode="Static" runat="server" ID="HdnCveChecadorEstaciones" Value="-1" />
|
|
||||||
<div class="row" style="margin-right: 10px; margin-top: 18px;text-align:right">
|
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvChecadorEstaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvChecadorEstaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
<asp:GridView ID="GvChecadorEstaciones" runat="server" GridLines="None" DataKeyNames="CveChecadorEstacion,ChecadorEstacion,CveChecadorTipo,Ip,Puerto,CveZonaHoraria,Estatus,Fecha,CveUsuario,CveEmpresa,ChecadorTipo,Usuario,ZonaHoraria"
|
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-freezerows="1" AutoGenerateColumns ="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Checadores de Estaciones ">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="ChecadorEstacion" HeaderText="Checador de Estacion" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="ChecadorTipo" HeaderText="Tipo de Checador" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="ZonaHoraria" HeaderText="Zona Horaria" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<asp:BoundField DataField="Ip" HeaderText="IP" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<asp:BoundField DataField="Puerto" HeaderText="Puerto" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'>></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
|
|
||||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="Delete_Click" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="A" ClientIDMode="Static" />
|
|
||||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
|
|
||||||
|
|
||||||
<%--POPUP AGREGAR--%>
|
|
||||||
<div id="divAddChecadorEstaciones" class="modal ADS fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<asp:UpdatePanel ID="UpAddChecadorEstaciones" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="myModalLabel">Agregar Checador de Estacion</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:UpdatePanel ID="UpBodyChecadorEstaciones" UpdateMode="Conditional" runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtChecadorEstaciones" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVChecadorEstaciones" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtChecadorEstaciones" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Checador de Estaciones''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
|
||||||
<label for="<%= TxtChecadorEstaciones.ClientID.ToString()%>">Checador de Estaciones:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlChecadorTipo" DataValueField="CveChecadorTipo" Width="150" DataTextField="ChecadorTipo" runat="server" CssClass="form-control select2me"></asp:DropDownList>
|
|
||||||
<label for="<%= DdlChecadorTipo.ClientID.ToString()%>">Tipo de Checador:</label>
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator runat="server" Enabled="true" Display="None" ID="RfvDdlChecadorTipo" ControlToValidate="DdlChecadorTipo" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor seleccione uno." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VADdlChecadorTipo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChecadorTipo" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlZonaHoraria" DataValueField="CveZonaHoraria" DataTextField="ZonaHoraria" Width="150" runat="server" CssClass="form-control select2me"></asp:DropDownList>
|
|
||||||
<label for="<%= DdlZonaHoraria.ClientID.ToString()%>">Zona Horaria:</label>
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator runat="server" Enabled="true" Display="None" ID="RfvDdlZonaHoraria" ControlToValidate="DdlZonaHoraria" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor seleccione uno." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VADdlZonaHoraria" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlZonaHoraria" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtIp" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="25"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVIp" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtIp" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''IP''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
|
||||||
<label for="<%= TxtIp.ClientID.ToString()%>">IP:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtPuerto" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="5" ></asp:TextBox>
|
|
||||||
<ajax:FilteredTextBoxExtender ID="FIETxtPuerto" TargetControlID="TxtPuerto" FilterType="Numbers" runat="server" />
|
|
||||||
<asp:RequiredFieldValidator ID="RFVPuerto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPuerto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puerto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
|
||||||
<label for="<%= TxtPuerto.ClientID.ToString()%>">Puerto:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
|
||||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
|
||||||
<i></i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:LinkButton ID="BtnAgregarChecadorEstaciones" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Agregar</asp:LinkButton>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
|
||||||
|
|
||||||
Partial Class RH_CatChecadorEstaciones
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
||||||
If Not Page.IsPostBack Then
|
|
||||||
CargaDdlChecadorTipo()
|
|
||||||
CargaDdlZonaHoraria()
|
|
||||||
CargaDatos()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
|
||||||
Dim ObjRH As New ClsRH()
|
|
||||||
HdnID.Value = -1
|
|
||||||
If ObjRH.ChecadorEstacionesGet(HdnID.Value, UsuarioActual.CveEmpresa) Then
|
|
||||||
GvChecadorEstaciones.DataSource = ObjRH.DtResultados
|
|
||||||
GvChecadorEstaciones.DataBind()
|
|
||||||
End If
|
|
||||||
ObjRH.Dispose()
|
|
||||||
UpDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDdlChecadorTipo()
|
|
||||||
Dim ObjRH As New ClsRH()
|
|
||||||
If ObjRH.DdlChecadorTipoGet(UsuarioActual.CveEmpresa) Then
|
|
||||||
DdlChecadorTipo.DataSource = ObjRH.DtResultados
|
|
||||||
DdlChecadorTipo.DataBind()
|
|
||||||
|
|
||||||
End If
|
|
||||||
ObjRH.Dispose()
|
|
||||||
UpDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDdlZonaHoraria()
|
|
||||||
Dim ObjRH As New ClsRH()
|
|
||||||
If ObjRH.DdlZonaHorariaGet() Then
|
|
||||||
DdlZonaHoraria.DataSource = ObjRH.DtResultados
|
|
||||||
DdlZonaHoraria.DataBind()
|
|
||||||
|
|
||||||
End If
|
|
||||||
ObjRH.Dispose()
|
|
||||||
UpDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub BtnAgregarChecadorEstaciones_Click(sender As Object, e As EventArgs) Handles BtnAgregarChecadorEstaciones.Click
|
|
||||||
Dim ObjRH As New ClsRH
|
|
||||||
Dim Estatus = 0
|
|
||||||
If ChkEstatus.Checked Then Estatus = 1
|
|
||||||
If HdnModalidad.Value = "A" Then
|
|
||||||
If ObjRH.ChecadorEstacionesAdd(DdlChecadorTipo.SelectedValue, DdlZonaHoraria.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtChecadorEstaciones.Text, TxtIp.Text, TxtPuerto.Text, Estatus) Then
|
|
||||||
CargaDatos()
|
|
||||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
|
||||||
ElseIf HdnModalidad.Value = "U" Then
|
|
||||||
If ObjRH.ChecadorEstacionesUpdate(HdnID.Value, DdlChecadorTipo.SelectedValue, DdlZonaHoraria.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtChecadorEstaciones.Text, TxtIp.Text, TxtPuerto.Text, Estatus) Then
|
|
||||||
CargaDatos()
|
|
||||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChecadorEstaciones"))
|
|
||||||
ObjRH.Dispose()
|
|
||||||
UpDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
|
||||||
HdnModalidad.Value = "U"
|
|
||||||
HdnID.Value = GvRow.DataKey("CveChecadorEstacion")
|
|
||||||
UpDatos.Update()
|
|
||||||
BtnAgregarChecadorEstaciones.Text = "Actualizar"
|
|
||||||
DdlChecadorTipo.SelectedValueExist(GvRow.DataKey("CveChecadorTipo"))
|
|
||||||
DdlZonaHoraria.SelectedValueExist(GvRow.DataKey("CveZonaHoraria"))
|
|
||||||
TxtChecadorEstaciones.Text = GvRow.DataKey("ChecadorEstacion")
|
|
||||||
TxtIp.Text = GvRow.DataKey("Ip")
|
|
||||||
TxtPuerto.Text = GvRow.DataKey("Puerto")
|
|
||||||
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
|
|
||||||
UpAddChecadorEstaciones.Update()
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChecadorEstaciones"))
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Sub Agregar()
|
|
||||||
HdnModalidad.Value = "A"
|
|
||||||
UpDatos.Update()
|
|
||||||
BtnAgregarChecadorEstaciones.Text = "Agregar"
|
|
||||||
TxtChecadorEstaciones.Text = ""
|
|
||||||
TxtIp.Text = ""
|
|
||||||
TxtPuerto.Text = ""
|
|
||||||
CargaDdlChecadorTipo()
|
|
||||||
CargaDdlZonaHoraria()
|
|
||||||
ChkEstatus.Checked = False
|
|
||||||
UpAddChecadorEstaciones.Update()
|
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChecadorEstaciones"))
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub Delete_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim ObjRH As New ClsRH()
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
|
||||||
HdnID.Value = GvRow.DataKey("CveChecadorEstacion")
|
|
||||||
UpDatos.Update()
|
|
||||||
If ObjRH.ChecadorEstacionesRemove(HdnID.Value) Then
|
|
||||||
CargaDatos()
|
|
||||||
|
|
||||||
End If
|
|
||||||
ObjRH.Dispose()
|
|
||||||
UpDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub LnkChecadorEstaciones_Click(sender As Object, e As EventArgs) Handles LnkChecadorEstaciones.Click
|
|
||||||
Agregar()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub GvChecadorEstaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChecadorEstaciones.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
If e.Row.DBCampo("Estatus") = True Then
|
|
||||||
e.Row.FCLabel("LblEstatus").Text = "Activo"
|
|
||||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
|
|
||||||
|
|
||||||
Else
|
|
||||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
|
||||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
@@ -64,9 +64,19 @@
|
|||||||
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
|
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCODdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCODdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="DdlModelo">Modelo:</label>
|
||||||
|
<asp:DropDownList ID="DdlModelo" Width="100%" runat="server" AppendDataBoundItems="true" ValidationGroup="GrpGuardar" CssClass="select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="zkteco" Value="1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlModelo" runat="server" ControlToValidate="DdlModelo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VceDdlModelo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtIPLocal" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtIPLocal" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RegularExpressionValidator ID="RfvTxtIPLocal" runat="server"
|
<asp:RegularExpressionValidator ID="RfvTxtIPLocal" runat="server"
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
{
|
{
|
||||||
TxtChecador.Text = "";
|
TxtChecador.Text = "";
|
||||||
DdlSubProyecto.SelectedValue = "-1";
|
DdlSubProyecto.SelectedValue = "-1";
|
||||||
|
DdlModelo.SelectedValue = "-1";
|
||||||
TxtIPLocal.Text = "";
|
TxtIPLocal.Text = "";
|
||||||
TxtPuerto.Text = "";
|
TxtPuerto.Text = "";
|
||||||
BtnChecadorAgregar.Text = "Agregar";
|
BtnChecadorAgregar.Text = "Agregar";
|
||||||
@@ -65,14 +66,14 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
ClsRH ObjRH = new ClsRH();
|
ClsRH ObjRH = new ClsRH();
|
||||||
if (BtnChecadorAgregar.Text == "Agregar")
|
if (BtnChecadorAgregar.Text == "Agregar")
|
||||||
{
|
{
|
||||||
if (ObjRH.AddChecadores(TxtChecador.Text, DdlSubProyecto.SelectedValue.ToEntero(), TxtIPLocal.Text, TxtPuerto.Text, UsuarioActual.CveUsuario))
|
if (ObjRH.AddChecadores(TxtChecador.Text, DdlSubProyecto.SelectedValue.ToEntero(), TxtIPLocal.Text, TxtPuerto.Text, UsuarioActual.CveUsuario,CveModelo:DdlModelo.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
Alert("Checador agregado correctamente");
|
Alert("Checador agregado correctamente");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ObjRH.UpdateChecadores(CveChecador,TxtChecador.Text,DdlSubProyecto.SelectedValue.ToEntero(),TxtIPLocal.Text,TxtPuerto.Text,Estatus: ChkEstatus.Checked))
|
if (ObjRH.UpdateChecadores(CveChecador,TxtChecador.Text,DdlSubProyecto.SelectedValue.ToEntero(),TxtIPLocal.Text,TxtPuerto.Text,Estatus: ChkEstatus.Checked, CveModelo: DdlModelo.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
Alert("Checador actualizado correctamente");
|
Alert("Checador actualizado correctamente");
|
||||||
}
|
}
|
||||||
@@ -90,6 +91,7 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
CveChecador = GvRow.DataKey("CveChecador").ToEntero();
|
CveChecador = GvRow.DataKey("CveChecador").ToEntero();
|
||||||
TxtChecador.Text = GvRow.DataKey("Checador");
|
TxtChecador.Text = GvRow.DataKey("Checador");
|
||||||
DdlSubProyecto.SelectedValue = GvRow.DataKey("CveSubProyecto");
|
DdlSubProyecto.SelectedValue = GvRow.DataKey("CveSubProyecto");
|
||||||
|
DdlModelo.SelectedValue = GvRow.DataKey("CveModelo");
|
||||||
TxtIPLocal.Text = GvRow.DataKey("IPLocal");
|
TxtIPLocal.Text = GvRow.DataKey("IPLocal");
|
||||||
TxtPuerto.Text = GvRow.DataKey("Puerto");
|
TxtPuerto.Text = GvRow.DataKey("Puerto");
|
||||||
BtnChecadorAgregar.Text = "Actualizar";
|
BtnChecadorAgregar.Text = "Actualizar";
|
||||||
|
|||||||
@@ -3738,7 +3738,7 @@
|
|||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
|
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal>
|
<asp:Literal ID="LtlFechaA" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -273,188 +273,210 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
if (!ErrorProceso)
|
if (!ErrorProceso)
|
||||||
{
|
{
|
||||||
//////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel ventas. ");
|
try
|
||||||
int count = 2;
|
|
||||||
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
|
||||||
var wsVentas = wbVentas.Worksheet(1);
|
|
||||||
|
|
||||||
foreach (DataRow DRow in DTVentas.Rows)
|
|
||||||
{
|
{
|
||||||
wsVentas.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
|
||||||
wsVentas.Cell(count, 2).Value = DRow["Branch"].ToString();
|
//////////////////////////////////////////////////////////////
|
||||||
wsVentas.Cell(count, 3).Value = "'" + DRow["Code"].ToString();
|
|
||||||
wsVentas.Cell(count, 4).Value = DRow["Sale Date"].ToString();
|
this.GuardaLog($"EjecutaThalamus: llenando archivo excel ventas. ");
|
||||||
wsVentas.Cell(count, 5).Value = DRow["Quantity"].ToString();
|
int count = 2;
|
||||||
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
var wbVentas = new ClosedXML.Excel.XLWorkbook(FormatoVentas);
|
||||||
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
this.GuardaLog($"EjecutaThalamus: archivo excel ventas cargado. ");
|
||||||
count++;
|
this.GuardaLog($"EjecutaThalamus: archivo excel ventas creando sheet.");
|
||||||
|
var wsVentas = wbVentas.Worksheet(1);
|
||||||
|
this.GuardaLog($"EjecutaThalamus: archivo excel ventas sheet creada.");
|
||||||
|
|
||||||
|
foreach (DataRow DRow in DTVentas.Rows)
|
||||||
|
{
|
||||||
|
wsVentas.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||||
|
wsVentas.Cell(count, 2).Value = DRow["Branch"].ToString();
|
||||||
|
wsVentas.Cell(count, 3).Value = "'" + DRow["Code"].ToString();
|
||||||
|
wsVentas.Cell(count, 4).Value = DRow["Sale Date"].ToString();
|
||||||
|
wsVentas.Cell(count, 5).Value = DRow["Quantity"].ToString();
|
||||||
|
wsVentas.Cell(count, 6).Value = DRow["Amount"].ToString();
|
||||||
|
wsVentas.Cell(count, 7).Value = DRow["Transaction ID"].ToString();
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
this.GuardaLog($"EjecutaThalamus: guardando archivo excel ventas " + RutaVentas + " ");
|
||||||
|
wbVentas.SaveAs(RutaVentas);
|
||||||
|
|
||||||
|
var wbAlmacenes = new ClosedXML.Excel.XLWorkbook(FormatoAlmacenes);
|
||||||
|
var wsAlmacenes = wbAlmacenes.Worksheet(1);
|
||||||
|
|
||||||
|
count = 2;
|
||||||
|
|
||||||
|
this.GuardaLog($"EjecutaThalamus: llenando archivo excel almacenes. ");
|
||||||
|
foreach (DataRow DRow in DTAlmacenes.Rows)
|
||||||
|
{
|
||||||
|
wsAlmacenes.Cell(count, 1).Value = "'" + DRow["Code"].ToString();
|
||||||
|
wsAlmacenes.Cell(count, 2).Value = DRow["Quantity"].ToString();
|
||||||
|
wsAlmacenes.Cell(count, 3).Value = DRow["Description"].ToString();
|
||||||
|
wsAlmacenes.Cell(count, 4).Value = DRow["Stock Date"].ToString();
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
this.GuardaLog($"EjecutaThalamus: guardando archivo excel alamcenes " + RutaAlmacenes + " ");
|
||||||
|
wbAlmacenes.SaveAs(RutaAlmacenes);
|
||||||
|
|
||||||
|
var wbAClientes = new ClosedXML.Excel.XLWorkbook(FormatoClientes);
|
||||||
|
var wsClientes = wbAClientes.Worksheet(1);
|
||||||
|
|
||||||
|
count = 2;
|
||||||
|
|
||||||
|
this.GuardaLog($"EjecutaThalamus: llenando archivo excel clientes. ");
|
||||||
|
foreach (DataRow DRow in DTClientes.Rows)
|
||||||
|
{
|
||||||
|
wsClientes.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
||||||
|
wsClientes.Cell(count, 2).Value = DRow["fiscalIdMex"].ToString();
|
||||||
|
wsClientes.Cell(count, 3).Value = DRow["fiscalName"].ToString();
|
||||||
|
wsClientes.Cell(count, 4).Value = DRow["email"].ToString();
|
||||||
|
wsClientes.Cell(count, 5).Value = DRow["address.countryId"].ToString();
|
||||||
|
wsClientes.Cell(count, 6).Value = DRow["address.stateId"].ToString();
|
||||||
|
wsClientes.Cell(count, 7).Value = DRow["address.city"].ToString();
|
||||||
|
wsClientes.Cell(count, 8).Value = DRow["address.street1"].ToString();
|
||||||
|
wsClientes.Cell(count, 9).Value = DRow["address.street2"].ToString();
|
||||||
|
wsClientes.Cell(count, 10).Value = "'" + DRow["address.postalCode"].ToString();
|
||||||
|
wsClientes.Cell(count, 11).Value = DRow["phone.intCode"].ToString();
|
||||||
|
wsClientes.Cell(count, 12).Value = DRow["phone.areaCode"].ToString();
|
||||||
|
wsClientes.Cell(count, 13).Value = "'" + DRow["phone.number"].ToString();
|
||||||
|
wsClientes.Cell(count, 14).Value = DRow["salesman"].ToString();
|
||||||
|
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.GuardaLog($"EjecutaThalamus: guardando archivo excel clientes " + RutaClientes + " ");
|
||||||
|
wbAClientes.SaveAs(RutaClientes);
|
||||||
|
|
||||||
|
var wbProductos = new ClosedXML.Excel.XLWorkbook(FormatoProductos);
|
||||||
|
var wsProductos = wbProductos.Worksheet(1);
|
||||||
|
|
||||||
|
count = 2;
|
||||||
|
this.GuardaLog($"EjecutaThalamus: llenando archivo excel productos. ");
|
||||||
|
foreach (DataRow DRow in DTProductos.Rows)
|
||||||
|
{
|
||||||
|
wsProductos.Cell(count, 1).Value = "'" + DRow["Código Producto Interno"].ToString();
|
||||||
|
wsProductos.Cell(count, 2).Value = DRow["Nombre del Producto"].ToString();
|
||||||
|
wsProductos.Cell(count, 3).Value = DRow["Presentación"].ToString();
|
||||||
|
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
this.GuardaLog($"EjecutaThalamus: guardando archivo excel productos " + RutaProductos + " ");
|
||||||
|
wbProductos.SaveAs(RutaProductos);
|
||||||
|
/////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
}
|
}
|
||||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel ventas " + RutaVentas + " ");
|
catch (Exception ex)
|
||||||
wbVentas.SaveAs(RutaVentas);
|
|
||||||
|
|
||||||
var wbAlmacenes = new ClosedXML.Excel.XLWorkbook(FormatoAlmacenes);
|
|
||||||
var wsAlmacenes = wbAlmacenes.Worksheet(1);
|
|
||||||
|
|
||||||
count = 2;
|
|
||||||
|
|
||||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel almacenes. ");
|
|
||||||
foreach (DataRow DRow in DTAlmacenes.Rows)
|
|
||||||
{
|
{
|
||||||
wsAlmacenes.Cell(count, 1).Value = "'" + DRow["Code"].ToString();
|
this.GuardaLog($"EjecutaThalamus: Error procesamiento archivos exel " + ex.StackTrace.ToString() + " ");
|
||||||
wsAlmacenes.Cell(count, 2).Value = DRow["Quantity"].ToString();
|
ErrorProceso = true;
|
||||||
wsAlmacenes.Cell(count, 3).Value = DRow["Description"].ToString();
|
Respuesta = false;
|
||||||
wsAlmacenes.Cell(count, 4).Value = DRow["Stock Date"].ToString();
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel alamcenes " + RutaAlmacenes + " ");
|
|
||||||
wbAlmacenes.SaveAs(RutaAlmacenes);
|
|
||||||
|
|
||||||
var wbAClientes = new ClosedXML.Excel.XLWorkbook(FormatoClientes);
|
|
||||||
var wsClientes = wbAClientes.Worksheet(1);
|
|
||||||
|
|
||||||
count = 2;
|
|
||||||
|
|
||||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel clientes. ");
|
|
||||||
foreach (DataRow DRow in DTClientes.Rows)
|
|
||||||
{
|
|
||||||
wsClientes.Cell(count, 1).Value = "'" + DRow["systemId"].ToString();
|
|
||||||
wsClientes.Cell(count, 2).Value = DRow["fiscalIdMex"].ToString();
|
|
||||||
wsClientes.Cell(count, 3).Value = DRow["fiscalName"].ToString();
|
|
||||||
wsClientes.Cell(count, 4).Value = DRow["email"].ToString();
|
|
||||||
wsClientes.Cell(count, 5).Value = DRow["address.countryId"].ToString();
|
|
||||||
wsClientes.Cell(count, 6).Value = DRow["address.stateId"].ToString();
|
|
||||||
wsClientes.Cell(count, 7).Value = DRow["address.city"].ToString();
|
|
||||||
wsClientes.Cell(count, 8).Value = DRow["address.street1"].ToString();
|
|
||||||
wsClientes.Cell(count, 9).Value = DRow["address.street2"].ToString();
|
|
||||||
wsClientes.Cell(count, 10).Value = "'" + DRow["address.postalCode"].ToString();
|
|
||||||
wsClientes.Cell(count, 11).Value = DRow["phone.intCode"].ToString();
|
|
||||||
wsClientes.Cell(count, 12).Value = DRow["phone.areaCode"].ToString();
|
|
||||||
wsClientes.Cell(count, 13).Value = "'" + DRow["phone.number"].ToString();
|
|
||||||
wsClientes.Cell(count, 14).Value = DRow["salesman"].ToString();
|
|
||||||
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel clientes " + RutaClientes + " ");
|
if (!ErrorProceso)
|
||||||
wbAClientes.SaveAs(RutaClientes);
|
|
||||||
|
|
||||||
var wbProductos= new ClosedXML.Excel.XLWorkbook(FormatoProductos);
|
|
||||||
var wsProductos = wbProductos.Worksheet(1);
|
|
||||||
|
|
||||||
count = 2;
|
|
||||||
this.GuardaLog($"EjecutaThalamus: llenando archivo excel productos. ");
|
|
||||||
foreach (DataRow DRow in DTProductos.Rows)
|
|
||||||
{
|
{
|
||||||
wsProductos.Cell(count, 1).Value = "'" + DRow["Código Producto Interno"].ToString();
|
var FInfoProductos = new FileInfo(RutaProductos);
|
||||||
wsProductos.Cell(count, 2).Value = DRow["Nombre del Producto"].ToString();
|
var FInfoVentas = new FileInfo(RutaVentas);
|
||||||
wsProductos.Cell(count, 3).Value = DRow["Presentación"].ToString();
|
var FInfoClientes = new FileInfo(RutaClientes);
|
||||||
|
var FInfoAlmacenes = new FileInfo(RutaAlmacenes);
|
||||||
|
|
||||||
count++;
|
bool CargaProductos = false;
|
||||||
}
|
bool CargaVentas = false;
|
||||||
this.GuardaLog($"EjecutaThalamus: guardando archivo excel productos " + RutaProductos + " ");
|
bool CargaClientes = false;
|
||||||
wbProductos.SaveAs(RutaProductos);
|
bool CargaAlmacenes = false;
|
||||||
/////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
var FInfoProductos = new FileInfo(RutaProductos);
|
SBLog.AppendLine("<b>Cargas</b><br>");
|
||||||
var FInfoVentas = new FileInfo(RutaVentas);
|
SBLog.AppendLine("<table border='1'> <tr><th>Archivo</th><th>Estado</th></tr>");
|
||||||
var FInfoClientes = new FileInfo(RutaClientes);
|
|
||||||
var FInfoAlmacenes = new FileInfo(RutaAlmacenes);
|
|
||||||
|
|
||||||
bool CargaProductos = false;
|
|
||||||
bool CargaVentas = false;
|
|
||||||
bool CargaClientes = false;
|
|
||||||
bool CargaAlmacenes = false;
|
|
||||||
|
|
||||||
SBLog.AppendLine("<b>Cargas</b><br>");
|
|
||||||
SBLog.AppendLine("<table border='1'> <tr><th>Archivo</th><th>Estado</th></tr>");
|
|
||||||
|
|
||||||
|
|
||||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. ");
|
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel productos a FTP. ");
|
||||||
CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass);
|
CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass);
|
||||||
|
|
||||||
if (CargaProductos)
|
if (CargaProductos)
|
||||||
{
|
{
|
||||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. ");
|
this.GuardaLog($"EjecutaThalamus: Verificando archivo productos. ");
|
||||||
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass);
|
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CargaProductos)
|
if (CargaProductos)
|
||||||
{
|
{
|
||||||
SBLog.AppendLine($"<tr><td>Productos</td><td>ok</td></tr>");
|
SBLog.AppendLine($"<tr><td>Productos</td><td>ok</td></tr>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SBLog.AppendLine($"<tr><td>Productos</td><td>Error carga</td></tr>");
|
SBLog.AppendLine($"<tr><td>Productos</td><td>Error carga</td></tr>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CargaProductos)
|
||||||
|
{
|
||||||
|
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel ventas a FTP. ");
|
||||||
|
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||||
|
if (CargaVentas)
|
||||||
|
{
|
||||||
|
this.GuardaLog($"EjecutaThalamus: Verificando archivo ventas. ");
|
||||||
|
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CargaProductos)
|
|
||||||
{
|
|
||||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel ventas a FTP. ");
|
|
||||||
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
|
||||||
if (CargaVentas)
|
if (CargaVentas)
|
||||||
{
|
{
|
||||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo ventas. ");
|
SBLog.AppendLine($"<tr><td>Ventas</td><td>ok</td></tr>");
|
||||||
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error carga</td></tr>");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (CargaVentas)
|
if (CargaProductos & CargaVentas)
|
||||||
{
|
{
|
||||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>ok</td></tr>");
|
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel clientes a FTP. ");
|
||||||
}
|
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||||
else
|
if (CargaClientes)
|
||||||
{
|
{
|
||||||
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error carga</td></tr>");
|
this.GuardaLog($"EjecutaThalamus: Verificando archivo clientes. ");
|
||||||
}
|
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CargaProductos & CargaVentas)
|
|
||||||
{
|
|
||||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel clientes a FTP. ");
|
|
||||||
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
|
||||||
if (CargaClientes)
|
if (CargaClientes)
|
||||||
{
|
{
|
||||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo clientes. ");
|
SBLog.AppendLine($"<tr><td>Clientes</td><td>ok</td></tr>");
|
||||||
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
|
||||||
if (CargaClientes)
|
|
||||||
{
|
|
||||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>ok</td></tr>");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error carga</td></tr>");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CargaProductos & CargaVentas & CargaClientes)
|
|
||||||
{
|
|
||||||
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel almacenes a FTP. ");
|
|
||||||
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
|
||||||
if (CargaClientes)
|
|
||||||
{
|
{
|
||||||
this.GuardaLog($"EjecutaThalamus: Verificando archivo almacenes. ");
|
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error carga</td></tr>");
|
||||||
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (CargaAlmacenes)
|
if (CargaProductos & CargaVentas & CargaClientes)
|
||||||
{
|
{
|
||||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>ok</td></tr>");
|
this.GuardaLog($"EjecutaThalamus: Cargando archivo excel almacenes a FTP. ");
|
||||||
}
|
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||||
else
|
if (CargaClientes)
|
||||||
{
|
{
|
||||||
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error carga</td></tr>");
|
this.GuardaLog($"EjecutaThalamus: Verificando archivo almacenes. ");
|
||||||
}
|
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CargaAlmacenes)
|
||||||
|
{
|
||||||
|
SBLog.AppendLine($"<tr><td>Almacenes</td><td>ok</td></tr>");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error carga</td></tr>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes)
|
if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes)
|
||||||
{
|
{
|
||||||
Respuesta = true;
|
Respuesta = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
Respuesta = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else
|
||||||
{
|
{
|
||||||
Respuesta = false;
|
Respuesta = false;
|
||||||
}
|
}
|
||||||
@@ -505,8 +527,8 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
|
|
||||||
ClsSisMail Correo = new ClsSisMail();
|
ClsSisMail Correo = new ClsSisMail();
|
||||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||||
// string Para = "oscar.irigoyen@adssistemas.mx";
|
// string Para = "oscar.irigoyen@adssistemas.mx";
|
||||||
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||||
|
|
||||||
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Correcto = ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
Correcto = ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
||||||
|
|
||||||
If Correcto Then
|
If Correcto Then
|
||||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row)
|
TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.DataKey("PS"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text)
|
||||||
Else
|
Else
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -418,6 +418,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||||
For Each row As DataRow In dt.Rows
|
For Each row As DataRow In dt.Rows
|
||||||
Dim Correcto As Boolean = False
|
Dim Correcto As Boolean = False
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa)).ToEntero
|
Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa)).ToEntero
|
||||||
Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero()
|
Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero()
|
||||||
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
||||||
@@ -429,6 +430,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||||
If Correcto Then
|
If Correcto Then
|
||||||
RowsCargados += 1
|
RowsCargados += 1
|
||||||
|
TieneError = ActualizarPreciosFranquicia(ObjPS, row(0).ToString(), row(1).ToString(), PrecioNuevo, 0, DdlPrecioListaCarga.SelectedItem.Text)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
||||||
@@ -527,28 +529,35 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, row As GridViewRow) As Boolean
|
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, PS As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String) As Boolean
|
||||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(137)
|
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||||
Dim Franquicias = FranquiciasStr.Split(","c)
|
Dim Franquicias = FranquiciasStr.Split(","c)
|
||||||
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||||
Dim Codigo As String = row.DataKey("Codigo")
|
Dim StrMsg As New StringBuilder
|
||||||
For Each Franquicia In Franquicias
|
For Each Franquicia In Franquicias
|
||||||
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
||||||
Dim CvePS As Integer = GlobalDTPS(CveFranquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo LIKE '%{0}%'", Codigo)).ToEntero
|
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
|
||||||
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", DdlPrecioLista.SelectedItem.Text)).ToEntero
|
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
|
||||||
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
|
||||||
If CvePS <= 0 Then
|
If CvePS <= 0 Then
|
||||||
Alert(String.Format("El producto '{0}' no se encuentra en la Franquicia '{1}'", row.DataKey("PS"), EmpresaFranquicia), TipoMensaje.MsgAdvertencia)
|
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||||
Return True
|
StrMsg.AppendFormat("El producto '{0}' no se encuentra en la Franquicia '{1}'", PS, EmpresaFranquicia)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If CvePrecioLisa <= 0 Then
|
If CvePrecioLisa <= 0 Then
|
||||||
Alert(String.Format("El precio lista '{0}' no existe en la Franquicia '{1}'", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia), TipoMensaje.MsgAdvertencia)
|
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||||
Return True
|
StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
|
||||||
End If
|
End If
|
||||||
If Not ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal) Then
|
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
||||||
Return True
|
StrMsg.AppendFormat("No se pudo actualizar el producto")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Return False
|
|
||||||
|
If StrMsg.ToString = "" Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
||||||
@@ -2055,7 +2055,7 @@ Partial Class Ventas
|
|||||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
|
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa <> 141 Then
|
If Not UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) Then
|
||||||
LnkAgregarCliente.Visible = False
|
LnkAgregarCliente.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user