Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1026,6 +1026,24 @@ Public Class ClsClientes
|
||||
OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetListaSucursales(RFC As String, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_ClientesSucursalesGet")
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@RFC", SqlDbType.VarChar).Value = RFC
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el las Sucursales del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
@@ -216,7 +216,36 @@ Public Class ClsNominas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function Autorizaperiodoconta(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_Autorizaperiodoconta", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al autorizar periodo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function GetDispersiondenomina(CvePeriodo As Int32, CveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_PA_NomDispersiondenomina", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.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 layout de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function GetCalculoUtilidades(ejercicio As Int32, cveEmpresa As Int32, importe As Double, importeA As Double) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_NomCalcularUtilidades", CommandType.StoredProcedure)
|
||||
|
||||
@@ -5444,13 +5444,13 @@ Public Class ClsPaginas
|
||||
''' <param name="NombreArchivo">Opcional Nombre del archivo que se descarga</param>
|
||||
''' <param name="Formato">Optional, Formato de Generacion PDF o Excel</param>
|
||||
''' <remarks></remarks>
|
||||
Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
|
||||
Public Sub ImprimirPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing, Optional Content_Disposition As String = "attachment")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = RDSName
|
||||
rds.Value = DtDatos
|
||||
lrds.Add(rds)
|
||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
|
||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition)
|
||||
End Sub
|
||||
Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
|
||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
|
||||
@@ -5465,9 +5465,9 @@ Public Class ClsPaginas
|
||||
''' <param name="NombreArchivo">Opcional Nombre del archivo que se descarga</param>
|
||||
''' <param name="Formato">Optional, Formato de Generacion PDF o Excel</param>
|
||||
''' <remarks></remarks>
|
||||
Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing)
|
||||
Public Sub ImprimirPDF(RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional MR As ReportViewer = Nothing, Optional Content_Disposition As String = "attachment")
|
||||
'limpio ReportViwer
|
||||
ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato)
|
||||
ImprimirbytesPDF(StreamPDF(RutaReporte, DataSource, Parametros, NombreArchivo, Formato, MR), NombreArchivo, Formato, Content_Disposition:=Content_Disposition)
|
||||
End Sub
|
||||
Public Function StreamPDF(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) As Byte()
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
@@ -5857,7 +5857,7 @@ Public Class ClsPaginas
|
||||
''' <param name="NombreArchivo"></param>
|
||||
''' <param name="Formato"></param>
|
||||
''' <remarks></remarks>
|
||||
Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False)
|
||||
Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment")
|
||||
'limpio ReportViwer
|
||||
Dim mimeType As String = Nothing
|
||||
Dim extension As String = Nothing
|
||||
@@ -5880,7 +5880,7 @@ Public Class ClsPaginas
|
||||
Response.Buffer = True
|
||||
Response.Clear()
|
||||
Response.ContentType = mimeType
|
||||
Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.{1}", NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
|
||||
Response.AddHeader("content-disposition", String.Format("{0}; filename={1}.{2}", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
|
||||
Response.BinaryWrite(bytes) ' create the file
|
||||
Response.Flush() ' send it to the client to download
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
|
||||
@@ -240,7 +240,7 @@ Public Class LogicNominas
|
||||
For Each Row As DataRow In DtPercepciones.Rows
|
||||
If Row("Importe").ToString().ToDecimal > 0 AndAlso Row("SATCveConcepto").ToString().ToEntero() <> 17 Then
|
||||
If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For
|
||||
ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
|
||||
ObjPercepciones.Add(New CFDINominaPercepciones With {.TipoPercepcion = If(Row("SATCveConcepto").ToString() = "999", "038", Row("SATCveConcepto").ToString()), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
|
||||
.ImporteGravado = Row("ImporteGravado").ToString().ToDecimal(), .ImporteExento = Row("ImporteExento").ToString().ToDecimal()})
|
||||
End If
|
||||
'RMF, falta poner el numero de horas pagadas
|
||||
|
||||
@@ -968,25 +968,25 @@ Namespace Extensiones
|
||||
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function RoundAD(Valor As Double, Optional Decimales As Integer = 2) As Double
|
||||
Return Math.Round(Valor, Decimales)
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function RoundAD(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal
|
||||
Return Math.Round(Valor, Decimales)
|
||||
Public Function RoundAD(Valor As Double, Optional Decimales As Integer = 2) As Double
|
||||
Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function RoundAD(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal
|
||||
Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)
|
||||
End Function
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double
|
||||
'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)
|
||||
'primero, se redondea a 4, para que concuerde al redondeo de sql, si se redondea a 2 decimales por ejemplo
|
||||
Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero))
|
||||
Public Function RoundSQL(Valor As Double, Optional Decimales As Integer = 2) As Double
|
||||
'Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)
|
||||
'primero, se redondea a 4, para que concuerde al redondeo de sql, si se redondea a 2 decimales por ejemplo
|
||||
Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)
|
||||
End Function
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function RoundSQL(Valor As Decimal, Optional Decimales As Integer = 2) As Decimal
|
||||
'primero, se redondea a 4, para que concuerde al redondeo de sql
|
||||
Return If(Decimales < 4, Math.Round(Math.Round(Valor, 4, MidpointRounding.AwayFromZero), Decimales, MidpointRounding.AwayFromZero), Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero))
|
||||
Return Math.Round(Valor, Decimales, MidpointRounding.AwayFromZero)
|
||||
End Function
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function Abs(Valor As Double) As Double
|
||||
|
||||
315
Ashx/E141.ashx
315
Ashx/E141.ashx
@@ -4,6 +4,7 @@ Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Net.Http
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
@@ -66,6 +67,42 @@ Public Class E141 : Implements IHttpHandler
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
#Region "GLOBAL DT"
|
||||
Public Property GlobalDTSubProyectos(CveProyecto As Integer, Optional CveSubProyecto As Integer = -1, Optional CveEmpresa As Integer = -1, Optional Estatus As Integer = 1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then
|
||||
Dim P As New ClsSubProyectos
|
||||
If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
|
||||
P.Dispose()
|
||||
End If
|
||||
|
||||
If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then
|
||||
Dim StrSQL As New StringBuilder
|
||||
If CveProyecto <> -1 Then StrSQL.AppendFormat(" AND CveProyecto = {0}", CveProyecto)
|
||||
If CveSubProyecto <> -1 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0}", CveSubProyecto)
|
||||
If Estatus <> -1 Then StrSQL.AppendFormat(" AND CveEstatus = {0}", Estatus)
|
||||
If CveEmpresa <> -1 Then StrSQL.AppendFormat(" AND CveEmpresa = {0}", CveEmpresa)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), StrSQL.ToString.Trim.TrimStart("A"c, "N"c, "D"c), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTSubProyectos = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
Else
|
||||
GlobalDTSubProyectos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTSubProyectos-{0}", CveEmpresa)
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
Dim retorno As String = ""
|
||||
Try
|
||||
@@ -88,7 +125,56 @@ Public Class E141 : Implements IHttpHandler
|
||||
|
||||
Dim Codigo = If(context.Request("Sku") = Nothing, "", context.Request("Sku").ToString())
|
||||
retorno = GetExistencia(context, Codigo)
|
||||
ElseIf Metodo = "ConsultarRFC" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = ConsultaRFC(context)
|
||||
Else
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
End If
|
||||
|
||||
ElseIf Metodo = "ValidarCarrito" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = ValidarCarrito(context)
|
||||
Else
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
End If
|
||||
|
||||
ElseIf Metodo = "RegistrarPedido" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = RegistrarPedido(context)
|
||||
Else
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
End If
|
||||
|
||||
ElseIf Metodo = "RegistrarCotizacion" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = RegistrarCotizacion(context)
|
||||
Else
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
End If
|
||||
|
||||
ElseIf Metodo = "GetSucursales" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = GetSucursales(context)
|
||||
Else
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
End If
|
||||
context.Response.StatusCode = Auth.StatusCode
|
||||
Else
|
||||
context.Response.ContentType = "text/html"
|
||||
|
||||
@@ -132,11 +218,219 @@ Public Class E141 : Implements IHttpHandler
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage
|
||||
Dim unauthorized As Boolean = True
|
||||
Dim respuesta As New AuthMessage
|
||||
|
||||
Dim authHeader = context.Request.Headers("Authorization")
|
||||
If authHeader IsNot Nothing Then
|
||||
Dim basicAuth As String = authHeader.Replace("Basic ", "")
|
||||
|
||||
Dim usernamePasswordArray = Encoding.UTF8.GetString(Convert.FromBase64String(basicAuth)).Split(":"c)
|
||||
|
||||
Dim userName = usernamePasswordArray(0)
|
||||
Dim password = usernamePasswordArray(1)
|
||||
unauthorized = Not (userName = Me.UsuarioWSE141 AndAlso password = Me.PasswordWSE141)
|
||||
|
||||
Else
|
||||
respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña son requeridos"}
|
||||
respuesta.IsSucces = False
|
||||
respuesta.StatusCode = 401
|
||||
|
||||
Return respuesta
|
||||
End If
|
||||
|
||||
If unauthorized Then
|
||||
respuesta.ErrorMessage = New FidelityAppsResponseError() With {.message = "el usuario y/o contraseña no son validos"}
|
||||
respuesta.IsSucces = False
|
||||
respuesta.StatusCode = 401
|
||||
|
||||
Return respuesta
|
||||
Else
|
||||
respuesta.ErrorMessage = Nothing
|
||||
respuesta.IsSucces = True
|
||||
respuesta.StatusCode = 200
|
||||
|
||||
Return respuesta
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Private Function ConsultaRFC(ByVal context As HttpContext) As String
|
||||
Dim Respuesta As New FidelityAppsResponse
|
||||
Dim RespuestaError As New FidelityAppsResponseError
|
||||
Dim TieneError As Boolean = False
|
||||
Dim JsonRequest As JObject = Nothing
|
||||
|
||||
If context.Request.InputStream IsNot Nothing Then
|
||||
Using reader As New StreamReader(context.Request.InputStream)
|
||||
Dim json = reader.ReadToEnd
|
||||
|
||||
If Not String.IsNullOrEmpty(json) Then
|
||||
JsonRequest = JObject.Parse(json)
|
||||
If JsonRequest Is Nothing Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
End If
|
||||
|
||||
If Not TieneError AndAlso Not String.IsNullOrEmpty(JsonRequest("rfc").ToString().Trim()) Then
|
||||
|
||||
Dim data As New JArray
|
||||
Dim Nombre As String = "-1"
|
||||
Dim Codigo As String = "-1"
|
||||
Dim NombreCorto As String = "-1"
|
||||
Dim RFC As String = JsonRequest("rfc").ToString()
|
||||
Dim Telefono As String = "-1"
|
||||
Dim Mail As String = "-1"
|
||||
|
||||
Dim DtSucursales As DataTable = Nothing
|
||||
|
||||
Using ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetListaSucursales(RFC, CveEmpresa) Then
|
||||
DtSucursales = ObjClientes.DtResultados.Copy()
|
||||
End If
|
||||
End Using
|
||||
|
||||
If DtSucursales IsNot Nothing Then
|
||||
Try
|
||||
For Each Row As DataRow In DtSucursales.Rows
|
||||
Dim objSucursal As New JObject(
|
||||
New JProperty("Id", Row("CveCliente")),
|
||||
New JProperty("rfc", Row("RFC")),
|
||||
New JProperty("name", Row("SucursalCliente")),
|
||||
New JProperty("phone", Row("Telefono")),
|
||||
New JProperty("email", Row("Correo")),
|
||||
New JProperty("address", Row("Direccion")),
|
||||
New JProperty("int_number", Row("NoInt")),
|
||||
New JProperty("ext_number", Row("NoExt")),
|
||||
New JProperty("street", Row("Direccion")),
|
||||
New JProperty("between_streets", ""),
|
||||
New JProperty("city", Row("Localidad")),
|
||||
New JProperty("state", Row("Estado")),
|
||||
New JProperty("zip_code", Row("CP")),
|
||||
New JProperty("reference", ""),
|
||||
New JProperty("Branch_office_code", ""),
|
||||
New JProperty("Branch_office_name", ""),
|
||||
New JProperty("Branch_office_id", "")
|
||||
)
|
||||
data.Add(objSucursal)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
RespuestaError.message = "Ocurrió un error al obtener la sucursales"
|
||||
End Try
|
||||
DtSucursales.Dispose()
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If data.Count > 0 Then
|
||||
Respuesta.data = data
|
||||
End If
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
Else
|
||||
Return JsonConvert.SerializeObject(Respuesta)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function ValidarCarrito(ByVal context As HttpContext) As String
|
||||
Dim Respuesta As New FidelityAppsResponse
|
||||
Dim RespuestaError As New FidelityAppsResponseError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
|
||||
If TieneError Then
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
Else
|
||||
Return JsonConvert.SerializeObject(Respuesta)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function RegistrarPedido(ByVal context As HttpContext) As String
|
||||
Dim Respuesta As New FidelityAppsResponse
|
||||
Dim RespuestaError As New FidelityAppsResponseError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
|
||||
If TieneError Then
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
Else
|
||||
Return JsonConvert.SerializeObject(Respuesta)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function RegistrarCotizacion(ByVal context As HttpContext) As String
|
||||
Dim Respuesta As New FidelityAppsResponse
|
||||
Dim RespuestaError As New FidelityAppsResponseError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
|
||||
If TieneError Then
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
Else
|
||||
Return JsonConvert.SerializeObject(Respuesta)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetSucursales(ByVal context As HttpContext) As String
|
||||
Dim Respuesta As New FidelityAppsResponse
|
||||
Dim RespuestaError As New FidelityAppsResponseError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim data As New JArray
|
||||
|
||||
Dim DtSucursales As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltraParametros("EsSucursal = True")
|
||||
If DtSucursales IsNot Nothing Then
|
||||
Try
|
||||
For Each Row As DataRow In DtSucursales.Rows
|
||||
Dim objSucursal As New JObject(
|
||||
New JProperty("code", Row("CveSubProyecto")),
|
||||
New JProperty("name", Row("SubProyecto")),
|
||||
New JProperty("street", Row("Calle")),
|
||||
New JProperty("no_ext", Row("NoExt")),
|
||||
New JProperty("no_int", Row("NoInt")),
|
||||
New JProperty("zip", Row("CP")),
|
||||
New JProperty("neighborhood", Row("Colonia")),
|
||||
New JProperty("city", Row("Municipio")),
|
||||
New JProperty("phone", Row("Telefono")),
|
||||
New JProperty("email", Row("Correo")),
|
||||
New JProperty("geo_lat", ""),
|
||||
New JProperty("geo_lng", ""),
|
||||
New JProperty("image", "")
|
||||
)
|
||||
data.Add(objSucursal)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
RespuestaError.message = "Ocurrió un error al obtener la sucursales"
|
||||
End Try
|
||||
DtSucursales.Dispose()
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If data.Count > 0 Then
|
||||
Respuesta.data = data
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
Else
|
||||
Return JsonConvert.SerializeObject(Respuesta)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetExistencia(ByVal context As HttpContext, Codigo As String) As String
|
||||
Dim respuesta = New With {.isSuccess = False, .message = "", .products = New JArray}
|
||||
If String.IsNullOrEmpty(Codigo) OrElse Codigo = "-1" Then
|
||||
respuesta.message = "el parametro 'Sku' es invalido"
|
||||
respuesta.isSuccess = False
|
||||
Respuesta.isSuccess = False
|
||||
|
||||
Return JsonConvert.SerializeObject(respuesta)
|
||||
End If
|
||||
@@ -735,4 +1029,23 @@ Public Class E141 : Implements IHttpHandler
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Class FidelityAppsResponse
|
||||
Public Property status As String
|
||||
Public Property data As Object
|
||||
End Class
|
||||
|
||||
Private Class FidelityAppsResponseError
|
||||
Sub New()
|
||||
status = "error"
|
||||
End Sub
|
||||
Public Property status As String
|
||||
Public Property message As String
|
||||
End Class
|
||||
|
||||
Private Class AuthMessage
|
||||
Public Property IsSucces As Boolean
|
||||
Public Property ErrorMessage As FidelityAppsResponseError
|
||||
Public Property StatusCode As Integer
|
||||
End Class
|
||||
|
||||
End Class
|
||||
@@ -6960,8 +6960,31 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim DTDistinct = DT.Copy
|
||||
If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
|
||||
For Each drowdis As DataRow In DTDistinct.Rows
|
||||
If drowdis("CveTipoGasto").ToString = "" Then
|
||||
drowdis("CveTipoGasto") = 0
|
||||
End If
|
||||
If drowdis("TipoGasto").ToString.Trim = "" Then
|
||||
drowdis("TipoGasto") = "ND"
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF, 0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
Else
|
||||
|
||||
For Each drowdis As DataRow In DTDistinct.Rows
|
||||
If drowdis("CveTipoGasto").ToString = "" Then
|
||||
drowdis("CveTipoGasto") = 0
|
||||
End If
|
||||
If drowdis("TipoGasto").ToString.Trim = "" Then
|
||||
drowdis("TipoGasto") = "ND"
|
||||
|
||||
End If
|
||||
Next
|
||||
DTDistinct.AcceptChanges()
|
||||
|
||||
DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 And ISNULL(CveAlmacen,0) = 0 And ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"})
|
||||
End If
|
||||
'RMF, si es concepto relacionado a flete o importacion, no debe de afectar al gasto
|
||||
@@ -17816,6 +17839,8 @@ Partial Class Compras_Compras
|
||||
|
||||
If UsuarioActual.Empresa.Tipo_CentroCosto <> 1 And UsuarioActual.Empresa.Tipo_CentroCosto <> 2 Then
|
||||
DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto"))
|
||||
Else
|
||||
DdlProyecto.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -4696,7 +4696,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF")
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF", Content_Disposition:="inline")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -712,7 +712,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
|
||||
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
|
||||
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, DDlCheques.SelectedValue.ToEntero, -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovto, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
|
||||
MsgError = "Detalle"
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
width:100%;
|
||||
}
|
||||
.txtimporte{
|
||||
background: transparent;
|
||||
border: none;
|
||||
/*background: transparent;*/
|
||||
/*border: none;*/
|
||||
}
|
||||
|
||||
.txtcant,.txtimporte,
|
||||
@@ -183,14 +183,22 @@
|
||||
</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>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" 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>
|
||||
<asp:TextBox ID="TxtImporte" Text="" CssClass="txtimporte" data-cve='<%# Eval("CveContratoDetalle") %>' type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Procentaje">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPorcentaje" Text="" CssClass="txtporcentaje" data-cve='<%# Eval("CveContratoDetalle") %>' type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText=" ">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -254,115 +262,6 @@
|
||||
|
||||
|
||||
|
||||
<%-- <ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación" visible ="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
|
||||
<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" AutoPostBack="true" 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"
|
||||
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="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>
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-center">
|
||||
|
||||
<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>
|
||||
<asp:PostBackTrigger ControlID="BtnDescargarGenerado" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>--%>
|
||||
|
||||
|
||||
|
||||
@@ -473,6 +372,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function showmodalFile(obj) {
|
||||
$('#' + obj).data("append", 'my-dropzone');<% Dim url = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "")%>
|
||||
$('#' + obj).data("urlup", '<%= url%>/Ashx/SIGWeb.ashx?Metodo=Uploadfile');
|
||||
@@ -481,38 +381,92 @@
|
||||
ADDropzone(obj);
|
||||
$('#dropmodal').modal();
|
||||
}
|
||||
function ValidateCant(variable) {
|
||||
function ValidateCant(opcion, cve) {
|
||||
|
||||
var txt = $(variable);
|
||||
var max = txt.data('cantidad');
|
||||
var value = parseInt(txt.val());
|
||||
if (value > max) {
|
||||
txt.val(max);
|
||||
var txtimporte = $('.txtimporte[data-cve="' + cve + '"]');
|
||||
var txtPorcentaje = $('.txtporcentaje[data-cve="' + cve + '"]');
|
||||
var txtCantidad = $('.txtcant[data-cve="' + cve + '"]');
|
||||
|
||||
var max = parseFloat(txtCantidad.data('cantidad'));
|
||||
var pu = parseFloat(txtCantidad.data('pu'));
|
||||
var cantidad = parseFloat(txtCantidad.val());
|
||||
|
||||
|
||||
|
||||
|
||||
if (!Math.round10) {
|
||||
Math.round10 = function (value, exp) {
|
||||
return decimalAdjust('round', value, exp);
|
||||
};
|
||||
}
|
||||
|
||||
if (opcion == 2) {
|
||||
|
||||
if (txtimporte.val().toString().length > 0) {
|
||||
|
||||
var importe = parseFloat(txtimporte.val());
|
||||
cantidad = parseFloat(importe / pu);
|
||||
txtCantidad.val(cantidad);
|
||||
|
||||
}else{
|
||||
cantidad = 0.0
|
||||
txtCantidad.val('');
|
||||
|
||||
}
|
||||
}
|
||||
if (value < 0) {
|
||||
txt.val(0);
|
||||
|
||||
if (opcion == 3) {
|
||||
|
||||
if (txtPorcentaje.val().toString().length > 0) {
|
||||
var porcentaje = parseFloat(txtPorcentaje.val());
|
||||
cantidad = (porcentaje * max / 100);
|
||||
txtCantidad.val(cantidad);
|
||||
} else {
|
||||
cantidad = 0;
|
||||
txtCantidad.val('');
|
||||
}
|
||||
}
|
||||
var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]');
|
||||
|
||||
importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu')));
|
||||
|
||||
//FormatoMoneda2(importe);
|
||||
if (cantidad > max) {
|
||||
txtCantidad.val(max);
|
||||
cantidad = max;
|
||||
}
|
||||
if (cantidad < 0) {
|
||||
txtCantidad.val(0);
|
||||
}
|
||||
|
||||
//if (parseInt(txt.val()) > 0) {
|
||||
|
||||
// $($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
|
||||
|
||||
//} else {
|
||||
|
||||
// var ocultar = $($(txt.parent()).parent()).find(".linkfile");
|
||||
|
||||
// if (!ocultar.hasClass("hidden")) {
|
||||
// ocultar.addClass("hidden");
|
||||
// }
|
||||
//}
|
||||
|
||||
if (cantidad > 0) {
|
||||
txtimporte.val(cantidad * pu);
|
||||
txtPorcentaje.val(Math.round10(cantidad * 100 / max, -2));
|
||||
} else {
|
||||
txtimporte.val('');
|
||||
txtPorcentaje.val('');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//);
|
||||
|
||||
function decimalAdjust(type, value, exp) {
|
||||
// Si el exp no está definido o es cero...
|
||||
if (typeof exp === 'undefined' || +exp === 0) {
|
||||
return Math[type](value);
|
||||
}
|
||||
value = +value;
|
||||
exp = +exp;
|
||||
// Si el valor no es un número o el exp no es un entero...
|
||||
if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
|
||||
return NaN;
|
||||
}
|
||||
// Shift
|
||||
value = value.toString().split('e');
|
||||
value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
|
||||
// Shift back
|
||||
value = value.toString().split('e');
|
||||
return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -136,10 +136,8 @@ Partial Class Contratos_ContratoAvance
|
||||
|
||||
Private Sub CargaContrato()
|
||||
DdlContratos.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DdlContratos.DataBind()
|
||||
|
||||
'DDlContratosEstimaciones.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
'DDlContratosEstimaciones.DataBind()
|
||||
DdlContratos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -189,8 +187,16 @@ Partial Class Contratos_ContratoAvance
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = (fecha = "")
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = Not (fecha = "")
|
||||
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
If e.Row.DBCampo("CveContratoDetalle").ToString.ToEntero = 0 Then
|
||||
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = False
|
||||
e.Row.FCTextBox("TxtImporte").Visible = False
|
||||
e.Row.FCTextBox("TxtPorcentaje").Visible = False
|
||||
|
||||
|
||||
|
||||
|
||||
'txtimporte
|
||||
e.Row.FCLinkButton("LnkAnexo").Visible = False
|
||||
|
||||
If e.Row.DBCampo("CveSubFamilias").ToString.ToEntero = 0 Then
|
||||
@@ -221,9 +227,17 @@ Partial Class Contratos_ContratoAvance
|
||||
LnkGuardarAvance.Visible = True
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"ValidateCant(1,{e.Row.DataKey("CveContratoDetalle")})")
|
||||
e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"ValidateCant(2,{e.Row.DataKey("CveContratoDetalle")})")
|
||||
e.Row.FCTextBox("TxtPorcentaje").Attributes.Add("onkeyup", $"ValidateCant(3,{e.Row.DataKey("CveContratoDetalle")})")
|
||||
|
||||
|
||||
If e.Row.DataKey("CantidadMax").ToDouble = 0 Then
|
||||
LnkAnexo.Visible = False
|
||||
e.Row.FCTextBox("TxtCantidad").Visible = False
|
||||
e.Row.FCTextBox("TxtImporte").Visible = False
|
||||
e.Row.FCTextBox("TxtPorcentaje").Visible = False
|
||||
|
||||
LnkGuardarAvance.Visible = False
|
||||
|
||||
End If
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -962,7 +962,7 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Producto/Servicio" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Concepto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtPS" Text='<%# Eval("CodigoPS")%>' runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -953,6 +953,13 @@ Partial Class Contratos_ContratoObra
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtPorAmortizacionAnticipo.Text.ToDecimal < TxtPorAnticipo.Text.ToDecimal Then
|
||||
Alert("El porcentaje de amortización no debe de ser menor al porcentaje de anticipo.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim TieneError = False
|
||||
Dim Modificado = False
|
||||
' Dim Extension = Session("FileExtension").ToString
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/SiteGPS.master" AutoEventWireup="false" CodeFile="RepGeoReferencias.aspx.vb" Inherits="GPS_RepGeoReferencias" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/SiteGPS.master" AutoEventWireup="false" CodeFile="RepGeoReferencias.aspx.vb" Inherits="GPS_RepGeoReferencias" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
width: 100%;
|
||||
@@ -44,292 +44,304 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="H" ID="Content9" runat="server">
|
||||
<li>
|
||||
<a id="BtnDir" onclick="$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });CargaPickers();NuevaConsulta();">
|
||||
<i class='fa fa-exchange'></i><span>Volver a Consultar</span>
|
||||
</a>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
<div id="map"></div>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UPModalBusqueda">
|
||||
<ContentTemplate>
|
||||
<div id="dvConsulta" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UPConsulta" 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="myModalLabel2" runat="server">Consulta de GeoReferencias</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalBody" UpdateMode="conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-8 v-center">
|
||||
<lable>Estatus: </lable>
|
||||
<asp:CheckBox runat="server" ID="ChkEstatusGeocerca" AutoPostBack="true" CssClass="chksino" Checked="true" Text=" " OnCheckedChanged="ChkEstatusGeocerca_CheckedChanged" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVGeoreferencias.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVGeoreferencias.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GVGeoreferencias" runat="server" GridLines="None" data-height="200" DataKeyNames="Coordenadas,CveGeoReferencia,GeoReferencia, CveDispositivo,Tipo,Color,Estatus,FechaInicio,FechaFin,AplicaLunes,AplicaMartes,AplicaMiercoles,AplicaJueves,AplicaViernes,AplicaSabado,AplicaDomingo, HoraInicio, HoraFin, Tolerancia" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkGR" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Tipo" ItemStyle-Width="20%" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="GeoReferencia" ItemStyle-Width="20%" HeaderText="GeoReferencia" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Color" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgColor" HeaderText="Color" runat="server" Style="height: 20px;" Enabled="false" CausesValidation="False" CssClass="btn btn-circle btn-sm green" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'>></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" HeaderText="Eliminar" runat="server" AlternateText="Editar" OnClick="imgE_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" 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:UpdatePanel runat="server" ID="UpUp" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright v-center">
|
||||
<label>Ver Posición Dispositivos: </label>
|
||||
<asp:CheckBox ID="chkUp" onchange="DisplayGV();" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
|
||||
</div>
|
||||
<div id="dvDispositivos" style="display: none">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDispositivos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDispositivos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDispositivos" runat="server" GridLines="None" DataKeyNames="CveDispositivo,SerieVehiculo,DevID,NoEconomico,NombreVehiculo" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-height="120.8" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkDis" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="25%" HeaderText="Número Económico" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="ModeloVehiculo" ItemStyle-Width="25%" HeaderText="Modelo Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="AñoVehiculo" ItemStyle-Width="15%" HeaderText="Año Vehículo" ItemStyle-HorizontalAlign="center" />
|
||||
<asp:BoundField DataField="PlacasVehiculo" ItemStyle-Width="25%" HeaderText="Placas Vehículo" ItemStyle-HorizontalAlign="center" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-primary"></asp:LinkButton>
|
||||
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="dvEditar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAgregar" 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">Editar Georeferencia</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyGeoReferencia" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEstatusOS" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtNombre" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombre.ClientID.ToString()%>">Nombre Geocerca:</label>
|
||||
</div>
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="H" ID="Content9" runat="server">
|
||||
<li>
|
||||
<a id="BtnDir" onclick="$('#dvConsulta').modal({ backdrop: 'static', keyboard: false });CargaPickers();NuevaConsulta();">
|
||||
<i class='fa fa-exchange'></i><span>Volver a Consultar</span>
|
||||
</a>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
<div id="map"></div>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UPModalBusqueda">
|
||||
<ContentTemplate>
|
||||
<div id="dvConsulta" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UPConsulta" 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="myModalLabel2" runat="server">Consulta de GeoReferencias</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalBody" UpdateMode="conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-8 v-center">
|
||||
<lable>Estatus: </lable>
|
||||
<asp:CheckBox runat="server" ID="ChkEstatusGeocerca" AutoPostBack="true" CssClass="chksino" Checked="true" Text=" " OnCheckedChanged="ChkEstatusGeocerca_CheckedChanged" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVGeoreferencias.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVGeoreferencias.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GVGeoreferencias" runat="server" PageSize="300" GridLines="None" data-height="200" DataKeyNames="Coordenadas,CveGeoReferencia,GeoReferencia, CveDispositivo,Tipo,Color,Estatus,FechaInicio,FechaFin,AplicaLunes,AplicaMartes,AplicaMiercoles,AplicaJueves,AplicaViernes,AplicaSabado,AplicaDomingo, HoraInicio, HoraFin, Tolerancia" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkGR" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Tipo" ItemStyle-Width="10%" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="GeoReferencia" ItemStyle-Width="50%" HeaderText="GeoReferencia" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Color" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgColor" HeaderText="Color" runat="server" Style="height: 20px;" Enabled="false" CausesValidation="False" CssClass="btn btn-circle btn-sm green" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'>></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" HeaderText="Eliminar" runat="server" AlternateText="Editar" OnClick="imgE_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" 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>
|
||||
<div id="DivPaginacion" runat="server" visible="false" class="row">
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblRegistros" runat="server" Style="display: inline-block;"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-4" style="display: inline-block; position: relative; text-align:end">
|
||||
<asp:HiddenField ID="HdnIndexPage" runat="server" ClientIDMode="Static" Value="0" />
|
||||
<asp:LinkButton ID="btnPagePrev" runat="server" Style="vertical-align: top;" Text="<i class='fa fa-angle-left' style='font-size:24px' aria-hidden='true'></i> Anterior" OnClick="btnPagePrev_Click" Enabled="false" />
|
||||
<asp:LinkButton ID="btnPageNext" runat="server" Style="vertical-align: top;" Text="Siguiente <i class='fa fa-angle-right' aria-hidden='true' style='font-size:24px'></i>" OnClick="btnPageNext_Click" />
|
||||
</div>
|
||||
</div>
|
||||
<asp:UpdatePanel runat="server" ID="UpUp" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright v-center">
|
||||
<label>Ver Posición Dispositivos: </label>
|
||||
<asp:CheckBox ID="chkUp" onchange="DisplayGV();" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
|
||||
</div>
|
||||
<div id="dvDispositivos" style="display: none">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDispositivos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDispositivos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDispositivos" runat="server" GridLines="None" DataKeyNames="CveDispositivo,SerieVehiculo,DevID,NoEconomico,NombreVehiculo" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-height="120.8" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkDis" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="25%" HeaderText="Número Económico" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="ModeloVehiculo" ItemStyle-Width="25%" HeaderText="Modelo Vehículo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="AñoVehiculo" ItemStyle-Width="15%" HeaderText="Año Vehículo" ItemStyle-HorizontalAlign="center" />
|
||||
<asp:BoundField DataField="PlacasVehiculo" ItemStyle-Width="25%" HeaderText="Placas Vehículo" ItemStyle-HorizontalAlign="center" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-primary"></asp:LinkButton>
|
||||
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="dvEditar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAgregar" 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">Editar Georeferencia</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyGeoReferencia" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombre" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEstatusOS" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtNombre" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombre.ClientID.ToString()%>">Nombre Geocerca:</label>
|
||||
</div>
|
||||
<%--<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEquipo" Width="230px" runat="server" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlEquipo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEquipo.ClientID.ToString()%>">Equipo:</label>
|
||||
</div>--%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTolerancia" runat="server" Style="width: 50%; display: inline-block" CssClass="form-control" CausesValidation="true"></asp:TextBox><asp:Literal runat="server" Text="mts"></asp:Literal>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtTolerancia" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTolerancia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tolerancia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBSerie" runat="server" TargetControlID="TxtTolerancia" FilterType="Numbers" />
|
||||
<label for="<%= TxtTolerancia.ClientID.ToString()%>" style="width: 50%">Tolerancia:</label>
|
||||
</div>
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: 15px; margin-left: 0px;">
|
||||
</div>--%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTolerancia" runat="server" Style="width: 50%; display: inline-block" CssClass="form-control" CausesValidation="true"></asp:TextBox><asp:Literal runat="server" Text="mts"></asp:Literal>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtTolerancia" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTolerancia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tolerancia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBSerie" runat="server" TargetControlID="TxtTolerancia" FilterType="Numbers" />
|
||||
<label for="<%= TxtTolerancia.ClientID.ToString()%>" style="width: 50%">Tolerancia:</label>
|
||||
</div>
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: 15px; margin-left: 0px;">
|
||||
<li>Fecha I.:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>Fecha F.:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: 15px; margin-left: 0px;">
|
||||
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="list-inline" style="font-size: 12px; margin-top: 15px; margin-left: 0px;">
|
||||
<li>Aplica Días:
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="L" ID="chkLunes" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="M" ID="chkMartes" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="M" ID="chkMiercoles" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="J" ID="chkJueves" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="V" ID="chkViernes" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="S" ID="chkSabado" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="D" ID="chkDomingo" />
|
||||
</li>
|
||||
</ul>
|
||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<div class="col-md-1">Hora Inicio:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="TxtHoraI" runat="server" CssClass="form-control input-sm hora" CausesValidation="true" MaxLength="18" Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">Hora Fin:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="TxtHoraF" runat="server" CssClass="form-control input-sm hora" CausesValidation="true" MaxLength="18" Width="75px "></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Activo: </label>
|
||||
<br />
|
||||
<asp:CheckBox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlGrupo" Width="230px" runat="server" DataTextField="Nombre" DataValueField="CveDispositivosGrupos" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlGrupo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarGrupo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlGrupo.ClientID.ToString()%>">Grupo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 12px; text-align: right;">
|
||||
<asp:LinkButton ID="LnkAgregarGrupo" runat="server" CssClass="btn btn-sm btn-success" OnClick="LnkAgregarGrupo_Click" ValidationGroup="GrpAgregarGrupo"><i class='fa fa-plus' aria-hidden='true'></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEquipoD" Width="230px" runat="server" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVEquipoD" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlEquipoD" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarVehiculo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEquipoD.ClientID.ToString()%>">Equipo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 12px; text-align: right;">
|
||||
<asp:LinkButton ID="LnkAgregarDisp" runat="server" CssClass="btn btn-sm btn-success" OnClick="LnkAgregarDisp_Click" ValidationGroup="GrpAgregarVehiculo"><i class='fa fa-plus' aria-hidden='true'></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvEquiposDetalle" runat="server" GridLines="None" data-height="200" DataKeyNames="CveDispositivo, NoEconomico,CveDispositivoGeoreferenciaDetalle" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" OnRowDeleting="GvEquiposDetalle_RowDeleting" EmptyDataText="Seleccione el vehiculo y presione agregar.">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="20%" HeaderText="NoEconomico" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Acciones" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnBorrarDispositivo" runat="server" AlternateText="Eliminar" 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="¿Desea eliminar este dispositivo?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="BtnActualizarGeoreferencia" OnClick="BtnActualizarGeoreferencia_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio">Actualizar</asp:LinkButton>
|
||||
<button id="btnCancelarTE" class="btn btn-default" data-dismiss="modal" value="Cancelar">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade bottom in" style="bottom: unset" id="h">
|
||||
<div class="modal-dialog" style="position: fixed; bottom: 0; margin: 0px,0px,0px,0px; width: 100%; padding: 0px, 0px, 0px, 0px; border-style: solid; border-color: rgb(68, 77, 88); z-index: 539;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body" style="padding: 5px;">
|
||||
<asp:UpdatePanel runat="server" ID="UPGV" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBarra" runat="server" GridLines="None" data-height="200" DataKeyNames="Nombre, Posicion" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Nombre" ItemStyle-Width="100%" HeaderText="GeoReferencia" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="../Metronic/assets/layouts/layout3/scripts/jquery.datetimepicker.full.js"></script>
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="L" ID="chkLunes" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="M" ID="chkMartes" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="M" ID="chkMiercoles" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="J" ID="chkJueves" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="V" ID="chkViernes" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="S" ID="chkSabado" />
|
||||
</li>
|
||||
<li>
|
||||
<asp:CheckBox runat="server" Text="D" ID="chkDomingo" />
|
||||
</li>
|
||||
</ul>
|
||||
<div class="row" style="margin-top: 10px; margin-bottom: 20px;">
|
||||
<div class="col-md-1">Hora Inicio:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="TxtHoraI" runat="server" CssClass="form-control input-sm hora" CausesValidation="true" MaxLength="18" Width="75px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">Hora Fin:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="TxtHoraF" runat="server" CssClass="form-control input-sm hora" CausesValidation="true" MaxLength="18" Width="75px "></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Activo: </label>
|
||||
<br />
|
||||
<asp:CheckBox ID="chkEstatus" Text=" " runat="server" CssClass="chksino" Width="250px"></asp:CheckBox>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlGrupo" Width="230px" runat="server" DataTextField="Nombre" DataValueField="CveDispositivosGrupos" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlGrupo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarGrupo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlGrupo.ClientID.ToString()%>">Grupo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 12px; text-align: right;">
|
||||
<asp:LinkButton ID="LnkAgregarGrupo" runat="server" CssClass="btn btn-sm btn-success" OnClick="LnkAgregarGrupo_Click" ValidationGroup="GrpAgregarGrupo"><i class='fa fa-plus' aria-hidden='true'></i></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEquipoD" Width="230px" runat="server" DataTextField="Display" DataValueField="CveDispositivo" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVEquipoD" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlEquipoD" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarVehiculo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlEquipoD.ClientID.ToString()%>">Equipo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 12px; text-align: right;">
|
||||
<asp:LinkButton ID="LnkAgregarDisp" runat="server" CssClass="btn btn-sm btn-success" OnClick="LnkAgregarDisp_Click" ValidationGroup="GrpAgregarVehiculo"><i class='fa fa-plus' aria-hidden='true'></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvEquiposDetalle" runat="server" GridLines="None" data-height="200" DataKeyNames="CveDispositivo, NoEconomico,CveDispositivoGeoreferenciaDetalle" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" OnRowDeleting="GvEquiposDetalle_RowDeleting" EmptyDataText="Seleccione el vehiculo y presione agregar.">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="NoEconomico" ItemStyle-Width="20%" HeaderText="NoEconomico" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Acciones" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnBorrarDispositivo" runat="server" AlternateText="Eliminar" 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="¿Desea eliminar este dispositivo?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="BtnActualizarGeoreferencia" OnClick="BtnActualizarGeoreferencia_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio">Actualizar</asp:LinkButton>
|
||||
<button id="btnCancelarTE" class="btn btn-default" data-dismiss="modal" value="Cancelar">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade bottom in" style="bottom: unset" id="h">
|
||||
<div class="modal-dialog" style="position: fixed; bottom: 0; margin: 0px,0px,0px,0px; width: 100%; padding: 0px, 0px, 0px, 0px; border-style: solid; border-color: rgb(68, 77, 88); z-index: 539;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body" style="padding: 5px;">
|
||||
<asp:UpdatePanel runat="server" ID="UPGV" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBarra" runat="server" GridLines="None" data-height="200" DataKeyNames="Nombre, Posicion" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Nombre" ItemStyle-Width="100%" HeaderText="GeoReferencia" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="../Metronic/assets/layouts/layout3/scripts/jquery.datetimepicker.full.js"></script>
|
||||
<script>
|
||||
var map;
|
||||
function initMap() {
|
||||
@@ -622,7 +634,7 @@
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"></script>
|
||||
</asp:Content>
|
||||
|
||||
</script>
|
||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"></script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -12,6 +12,14 @@ Partial Class GPS_RepGeoReferencias
|
||||
Set(value As Integer)
|
||||
ViewState("CveGeoReferencia") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtGeoReferencias As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtGeoReferencias"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtGeoReferencias") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtPosiciones As DataTable
|
||||
Get
|
||||
@@ -49,13 +57,27 @@ Partial Class GPS_RepGeoReferencias
|
||||
|
||||
Private Sub CargaGeoReferencias()
|
||||
Dim Estatus = If(ChkEstatusGeocerca.Checked, 1, 0)
|
||||
Dim GPS As New ClsGPS
|
||||
If GPS.GeoReferenciaGet(-1, Estatus, "-1", UsuarioActual.CveCliente) Then
|
||||
GVGeoreferencias.DataSource = GPS.DtResultados
|
||||
Else
|
||||
GVGeoreferencias.DataSource = Nothing
|
||||
|
||||
Using GPS As New ClsGPS
|
||||
If GPS.GeoReferenciaGet(-1, Estatus, "-1", UsuarioActual.CveCliente) Then
|
||||
DtGeoReferencias = GPS.DtResultados.Copy()
|
||||
End If
|
||||
End Using
|
||||
|
||||
If DtGeoReferencias IsNot Nothing Then
|
||||
Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count
|
||||
Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize
|
||||
If TotalRegistros > TotalRowsPage Then
|
||||
GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(0, TotalRowsPage - 1)
|
||||
DivPaginacion.Visible = True
|
||||
LblRegistros.Text = $"Distribución de datos desde 0 hasta {TotalRowsPage.ToString().ToDecimal().FormatoNumero(0)}. Total de registros: {TotalRegistros.ToString().ToDecimal().FormatoNumero(0)}"
|
||||
Else
|
||||
GVGeoreferencias.DataSource = DtGeoReferencias
|
||||
End If
|
||||
Else
|
||||
GVGeoreferencias.DataSource = DtGeoReferencias
|
||||
End If
|
||||
GPS.Dispose()
|
||||
|
||||
GVGeoreferencias.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaDispositivos()
|
||||
@@ -190,16 +212,11 @@ Partial Class GPS_RepGeoReferencias
|
||||
TxtHoraF.Text = GvRow.DataKey("HoraFin").ToString.ToDateTime.ToString("HH:mm")
|
||||
|
||||
Using ObjGPS As New ClsGPS
|
||||
If ObjGPS.GetReferenciaDetalle(-1, CveGeoReferencia, -1, UsuarioActual.CveCliente) Then
|
||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
||||
DtDetalle = ObjGPS.DtResultados
|
||||
GvEquiposDetalle.DataSource = DtDetalle
|
||||
Else
|
||||
DtDetalle = Nothing
|
||||
DtDetalleEliminar = Nothing
|
||||
GvEquiposDetalle.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If ObjGPS.GetReferenciaDetalle(-1, CveGeoReferencia, -1, UsuarioActual.CveCliente) Then
|
||||
DtDetalle = ObjGPS.DtResultados.Copy()
|
||||
DtDetalleEliminar = ObjGPS.DtResultados.Copy()
|
||||
|
||||
GvEquiposDetalle.DataSource = DtDetalle
|
||||
End If
|
||||
End Using
|
||||
GvEquiposDetalle.DataBind()
|
||||
@@ -239,27 +256,22 @@ Partial Class GPS_RepGeoReferencias
|
||||
Dim HoraF As Date = ($"{Date.Now.ToString("dd/MM/yyyy")} {TxtHoraF.Text}").ToDate
|
||||
|
||||
If ObjGPS.GeoReferenciaUpdate(CveGeoReferencia, TxtNombre.Text, -1, chkEstatus.Checked, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked,
|
||||
chkSabado.Checked, chkDomingo.Checked, HoraI, HoraF, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
Dim CveGeoReferenciaDetalle = Dr("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero
|
||||
If CveGeoReferenciaDetalle > 0 Then
|
||||
If Not ObjGPS.UpdateReferenciaDetalle(CveGeoReferenciaDetalle, CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
If Not ObjGPS.AddGeoReferenciaDetalle(CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
chkSabado.Checked, chkDomingo.Checked, HoraI, HoraF, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||
If Not TieneError Then
|
||||
For Each DrE As DataRow In DtDetalleEliminar.Rows
|
||||
TieneError = Not ObjGPS.RemoveferenciaDetalle(DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero)
|
||||
If DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero > 0 Then
|
||||
TieneError = Not ObjGPS.RemoveferenciaDetalle(DrE("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
For Each Dr As DataRow In DtDetalle.Rows
|
||||
If Not ObjGPS.AddGeoReferenciaDetalle(CveGeoReferencia, Dr("CveDispositivo").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
@@ -336,14 +348,15 @@ Partial Class GPS_RepGeoReferencias
|
||||
Dim Dr As DataRow = DtDetalle.Rows(e.RowIndex)
|
||||
Dim CveGeoReferenciaDetalle = Dr("CveDispositivoGeoreferenciaDetalle").ToString.ToEntero
|
||||
If CveGeoReferenciaDetalle > 0 Then
|
||||
|
||||
Dim DrEliminar = DtDetalleEliminar.NewRow
|
||||
DrEliminar("CveDispositivoGeoreferenciaDetalle") = CveGeoReferenciaDetalle
|
||||
DrEliminar("CveDispositivo") = Dr("CveDispositivo").ToString.ToEntero
|
||||
DrEliminar("NoEconomico") = Dr("NoEconomico").ToString
|
||||
DtDetalleEliminar.Rows.Add(DrEliminar)
|
||||
DtDetalleEliminar.AcceptChanges()
|
||||
|
||||
If DtDetalleEliminar.COUNT("CveDispositivo", $"CveDispositivoGeoreferenciaDetalle={CveGeoReferenciaDetalle}") <= 0 Then
|
||||
Dim DrEliminar = DtDetalleEliminar.NewRow
|
||||
DrEliminar("CveDispositivoGeoreferenciaDetalle") = CveGeoReferenciaDetalle
|
||||
DrEliminar("CveDispositivo") = Dr("CveDispositivo").ToString.ToEntero
|
||||
DrEliminar("NoEconomico") = Dr("NoEconomico").ToString
|
||||
DtDetalleEliminar.Rows.Add(DrEliminar)
|
||||
DtDetalleEliminar.AcceptChanges()
|
||||
End If
|
||||
|
||||
End If
|
||||
DtDetalle.Rows.RemoveAt(e.RowIndex)
|
||||
|
||||
@@ -415,5 +428,63 @@ Partial Class GPS_RepGeoReferencias
|
||||
|
||||
Protected Sub ChkEstatusGeocerca_CheckedChanged(sender As Object, e As EventArgs)
|
||||
CargaGeoReferencias()
|
||||
End Sub
|
||||
|
||||
Protected Sub btnPagePrev_Click(sender As Object, e As EventArgs)
|
||||
Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count
|
||||
Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize
|
||||
Dim PrevIndex As Integer = HdnIndexPage.Value.ToEntero - 1
|
||||
Dim CurrentIndex As Integer = PrevIndex + 1
|
||||
|
||||
Dim PrevIndexDT As Integer = (TotalRowsPage) * PrevIndex
|
||||
Dim CurrentIndexDT As Integer = (TotalRowsPage) * CurrentIndex
|
||||
|
||||
HdnIndexPage.Value = PrevIndex.ToString
|
||||
|
||||
If Not btnPageNext.Enabled Then
|
||||
btnPageNext.Enabled = True
|
||||
End If
|
||||
|
||||
If PrevIndexDT <= 0 Then
|
||||
btnPagePrev.Enabled = False
|
||||
GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(0, CurrentIndexDT)
|
||||
LblRegistros.Text = $"Distribución de datos desde 0 hasta {CurrentIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}"
|
||||
Else
|
||||
LblRegistros.Text = $"Distribución de datos desde {PrevIndexDT.ToString.FormatoNumero(0)} hasta {CurrentIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}"
|
||||
GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(PrevIndexDT, CurrentIndexDT)
|
||||
End If
|
||||
|
||||
GVGeoreferencias.DataBind()
|
||||
UPGV.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub btnPageNext_Click(sender As Object, e As EventArgs)
|
||||
Dim TotalRegistros As Integer = DtGeoReferencias.Rows.Count
|
||||
Dim TotalRowsPage As Integer = GVGeoreferencias.PageSize
|
||||
Dim Index As Integer = HdnIndexPage.Value.ToEntero + 1
|
||||
Dim NextIndex As Integer = Index + 1
|
||||
|
||||
Dim CurrentIndexDT As Integer = (TotalRowsPage) * Index
|
||||
Dim NextIndexDT As Integer = (TotalRowsPage) * NextIndex
|
||||
|
||||
HdnIndexPage.Value = Index.ToString
|
||||
|
||||
If Not btnPagePrev.Enabled Then
|
||||
btnPagePrev.Enabled = True
|
||||
End If
|
||||
|
||||
If NextIndexDT >= TotalRegistros Then
|
||||
btnPageNext.Enabled = False
|
||||
GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(CurrentIndexDT, TotalRegistros - 1)
|
||||
LblRegistros.Text = $"Distribución de datos desde {CurrentIndexDT.ToString.FormatoNumero(0)} hasta {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}"
|
||||
Else
|
||||
GVGeoreferencias.DataSource = DtGeoReferencias.FiltraPorIndices(CurrentIndexDT, NextIndexDT)
|
||||
LblRegistros.Text = $"Distribución de datos desde {CurrentIndexDT.ToString.FormatoNumero(0)} hasta {NextIndexDT.ToString.FormatoNumero(0)}. Total de registros: {DtGeoReferencias.Rows.Count.ToString.FormatoNumero(0)}"
|
||||
End If
|
||||
|
||||
GVGeoreferencias.DataBind()
|
||||
UPGV.Update()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -8,350 +8,385 @@
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Periodos
|
||||
Catálogo de periodos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="110px">
|
||||
<asp:LinkButton ID="LbTipoPeriodo" runat="server" CausesValidation="false" Text="" CommandArgument="TipoPeriodo" OnClick="LbOrden_Click">
|
||||
Tipo
|
||||
<asp:Literal ID="ImgTipoPeriodo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEjercicio" runat="server" CausesValidation="false" Text="" CommandArgument="Ejercicio" OnClick="LbOrden_Click">
|
||||
Ej.
|
||||
<asp:Literal ID="ImgEjercicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbMes" runat="server" CausesValidation="false" Text="" CommandArgument="Mes" OnClick="LbOrden_Click">
|
||||
Mes
|
||||
<asp:Literal ID="ImgMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbNumero" runat="server" CausesValidation="false" Text="" CommandArgument="Numero" OnClick="LbOrden_Click">
|
||||
No.
|
||||
<asp:Literal ID="ImgNumero" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaInicio" runat="server" CausesValidation="false" Text="" CommandArgument="FechaInicio" OnClick="LbOrden_Click">
|
||||
Fecha Ini
|
||||
<asp:Literal ID="ImgFechaInicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaFin" runat="server" CausesValidation="false" Text="" CommandArgument="FechaFin" OnClick="LbOrden_Click">
|
||||
Fecha Fin
|
||||
<asp:Literal ID="ImgFechaFin" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsInicioMes" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioMes" OnClick="LbOrden_Click">
|
||||
Ini. Mes
|
||||
<asp:Literal ID="ImgEsInicioMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsFinMes" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinMes" OnClick="LbOrden_Click">
|
||||
Fin Mes
|
||||
<asp:Literal ID="ImgEsFinMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsInicioSS" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioSS" OnClick="LbOrden_Click">
|
||||
Ini. SS
|
||||
<asp:Literal ID="ImgEsInicioSS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsFinSS" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinSS" OnClick="LbOrden_Click">
|
||||
Fin SS
|
||||
<asp:Literal ID="ImgEsFinSS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsInicioAño" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioAño" OnClick="LbOrden_Click">
|
||||
Ini. Año
|
||||
<asp:Literal ID="ImgEsInicioAño" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsFinAño" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinAño" OnClick="LbOrden_Click">
|
||||
Fin Año
|
||||
<asp:Literal ID="ImgEsFinAño" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFueCalculado" runat="server" CausesValidation="false" Text="" CommandArgument="FueCalculado" OnClick="LbOrden_Click">
|
||||
Calculado
|
||||
<asp:Literal ID="ImgFueCalculado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<%--<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton> <asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<%-- <td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton> <asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th width="119">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPeriodo" runat="server" ControlToValidate="DdlTipoPeriodo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoPeriodo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPeriodo" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtEjercicio" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVEjercicio" runat="server" ControlToValidate="TxtEjercicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEjercicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVEjercicio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtMes" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVMes" runat="server" ControlToValidate="TxtMes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMes" runat="server" HighlightCssClass="vco" TargetControlID="RFVMes" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtNumero" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumero" runat="server" ControlToValidate="TxtNumero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNumero" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" MaxLength="10" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgFechaInicio2" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="13px" Height="13px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</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="VCOFechaInicio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicio2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" MaxLength="10" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgFechaFin2" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="13px" Height="13px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</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="VCOFechaFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" />
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" />
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" />
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" />
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" />
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" />
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="Estatus" DataValueField="CveEstatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo" EmptyDataText="No se encontraron Tipo de Periodo Registrados" ToolTip="Listado de Tipo de Periodo" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoPeriodo" runat="server" Text='<%# Eval("TipoPeriodo", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" DataValueField="CveTipoPeriodo" DataTextField="TipoPeriodo" Width="80px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEjercicio" runat="server" Text='<%# Eval("Ejercicio", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtEjercicio" runat="server" CausesValidation="true" MaxLength="80" Text='<%# Eval("Ejercicio") %>' ValidationGroup="GrpGV" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEjercicio" runat="server" ControlToValidate="TxtEjercicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEjercicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVEjercicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMes" runat="server" Text='<%# Eval("Mes", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMes" runat="server" CausesValidation="true" MaxLength="80" Text='<%# Eval("Mes") %>' ValidationGroup="GrpGV" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMes" runat="server" ControlToValidate="TxtMes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMes" runat="server" HighlightCssClass="vco" TargetControlID="RFVMes" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNumero" runat="server" Text='<%# Eval("Numero", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNumero" runat="server" CausesValidation="true" MaxLength="80" Text='<%# Eval("Numero") %>' ValidationGroup="GrpGV" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumero" runat="server" ControlToValidate="TxtNumero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNumero" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaInicio" runat="server" Text='<%# Eval("FechaInicio", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CausesValidation="true" Text='<%# Eval("FechaInicio") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFin" runat="server" Text='<%# Eval("FechaFin", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CausesValidation="true" Text='<%# Eval("FechaFin") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" Checked='<%# If (Eval("EsInicioMes").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" Checked='<%# If (Eval("EsInicioMes").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" Checked='<%# If (Eval("EsFinMes").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" Checked='<%# If (Eval("EsFinMes").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" Checked='<%# If (Eval("EsInicioSS").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" Checked='<%# If (Eval("EsInicioSS").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" Checked='<%# If (Eval("EsFinSS").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" Checked='<%# If (Eval("EsFinSS").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" Checked='<%# If (Eval("EsInicioAño").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" Checked='<%# If (Eval("EsInicioAño").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" Checked='<%# If (Eval("EsFinAño").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" Checked='<%# If (Eval("EsFinAño").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" Checked='<%# If (Eval("FueCalculado").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" Checked='<%# If (Eval("FueCalculado").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="Estatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField>
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-yellow-gold"></i>
|
||||
<span class="caption-subject font-yellow-gold bold uppercase">Periodos</span>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<asp:TextBox CssClass="TxtBusqueda form-control input-sm" runat="server" onkeyup="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" Style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
|
||||
<a href="javascript:;" onclick="FiltrarTablaV2('.TxtBusqueda','.GvDatos')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover mysmallbtn Widthall tableheader">
|
||||
<thead>
|
||||
<tr class="Titulos ADtr">
|
||||
<th width="110px">
|
||||
<asp:LinkButton ID="LbTipoPeriodo" runat="server" CausesValidation="false" Text="" CommandArgument="TipoPeriodo" OnClick="LbOrden_Click">
|
||||
Tipo
|
||||
<asp:Literal ID="ImgTipoPeriodo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEjercicio" runat="server" CausesValidation="false" Text="" CommandArgument="Ejercicio" OnClick="LbOrden_Click">
|
||||
Ej.
|
||||
<asp:Literal ID="ImgEjercicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbMes" runat="server" CausesValidation="false" Text="" CommandArgument="Mes" OnClick="LbOrden_Click">
|
||||
Mes
|
||||
<asp:Literal ID="ImgMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbNumero" runat="server" CausesValidation="false" Text="" CommandArgument="Numero" OnClick="LbOrden_Click">
|
||||
No.
|
||||
<asp:Literal ID="ImgNumero" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaInicio" runat="server" CausesValidation="false" Text="" CommandArgument="FechaInicio" OnClick="LbOrden_Click">
|
||||
Fecha Ini
|
||||
<asp:Literal ID="ImgFechaInicio" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaFin" runat="server" CausesValidation="false" Text="" CommandArgument="FechaFin" OnClick="LbOrden_Click">
|
||||
Fecha Fin
|
||||
<asp:Literal ID="ImgFechaFin" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsInicioMes" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioMes" OnClick="LbOrden_Click">
|
||||
Ini. Mes
|
||||
<asp:Literal ID="ImgEsInicioMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsFinMes" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinMes" OnClick="LbOrden_Click">
|
||||
Fin Mes
|
||||
<asp:Literal ID="ImgEsFinMes" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsInicioSS" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioSS" OnClick="LbOrden_Click">
|
||||
Ini. SS
|
||||
<asp:Literal ID="ImgEsInicioSS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsFinSS" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinSS" OnClick="LbOrden_Click">
|
||||
Fin SS
|
||||
<asp:Literal ID="ImgEsFinSS" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsInicioAño" runat="server" CausesValidation="false" Text="" CommandArgument="EsInicioAño" OnClick="LbOrden_Click">
|
||||
Ini. Año
|
||||
<asp:Literal ID="ImgEsInicioAño" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEsFinAño" runat="server" CausesValidation="false" Text="" CommandArgument="EsFinAño" OnClick="LbOrden_Click">
|
||||
Fin Año
|
||||
<asp:Literal ID="ImgEsFinAño" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFueCalculado" runat="server" CausesValidation="false" Text="" CommandArgument="FueCalculado" OnClick="LbOrden_Click">
|
||||
Calculado
|
||||
<asp:Literal ID="ImgFueCalculado" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<%--<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton> <asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<%-- <td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton> <asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th style="width: 10px;" colspan="2">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="ADtr">
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" CssClass="select2me form-control" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPeriodo" runat="server" ControlToValidate="DdlTipoPeriodo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoPeriodo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPeriodo" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtEjercicio" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVEjercicio" runat="server" ControlToValidate="TxtEjercicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEjercicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVEjercicio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtMes" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVMes" runat="server" ControlToValidate="TxtMes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMes" runat="server" HighlightCssClass="vco" TargetControlID="RFVMes" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtNumero" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumero" runat="server" ControlToValidate="TxtNumero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNumero" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</th>
|
||||
<th>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaInicio2" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</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="VCOFechaInicio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicio2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</th>
|
||||
<th>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin2" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</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="VCOFechaFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" />
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="select2me form-control" runat="server" AppendDataBoundItems="true" DataTextField="Estatus" DataValueField="CveEstatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</th>
|
||||
<th style="text-align: center" colspan="2">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader"
|
||||
EmptyDataText="No se encontraron Tipo de Periodo Registrados" ToolTip="Listado de Tipo de Periodo" Style="margin-top: -10px;" GridLines="None" data-rows="0" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="250px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoPeriodo" runat="server" Text='<%# Eval("TipoPeriodo", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" CssClass="select2me form-control" runat="server" DataValueField="CveTipoPeriodo" DataTextField="TipoPeriodo" Width="80px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEjercicio" runat="server" Text='<%# Eval("Ejercicio", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtEjercicio" CssClass="form-control" runat="server" CausesValidation="true" MaxLength="4" Text='<%# Eval("Ejercicio") %>' ValidationGroup="GrpGV" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEjercicio" runat="server" ControlToValidate="TxtEjercicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEjercicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVEjercicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMes" runat="server" Text='<%# Eval("Mes", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtMes" runat="server" CausesValidation="true" MaxLength="80" Text='<%# Eval("Mes") %>' ValidationGroup="GrpGV" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVMes" runat="server" ControlToValidate="TxtMes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMes" runat="server" HighlightCssClass="vco" TargetControlID="RFVMes" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNumero" runat="server" Text='<%# Eval("Numero", " {0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtNumero" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="80" Text='<%# Eval("Numero") %>' ValidationGroup="GrpGV" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumero" runat="server" ControlToValidate="TxtNumero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNumero" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaInicio" runat="server" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFechaInicio" CssClass="form-control" runat="server" CausesValidation="true" Text='<%# Eval("FechaInicio") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFin" runat="server" Text='<%# Eval("FechaFin", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtFechaFin" CssClass="form-control" runat="server" CausesValidation="true" Text='<%# Eval("FechaFin") %>' ValidationGroup="GrpGV" MaxLength="10" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Días de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" Checked='<%# If (Eval("EsInicioMes").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" Checked='<%# If (Eval("EsInicioMes").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" Checked='<%# If (Eval("EsFinMes").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" Checked='<%# If (Eval("EsFinMes").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" Checked='<%# If (Eval("EsInicioSS").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" Checked='<%# If (Eval("EsInicioSS").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" Checked='<%# If (Eval("EsFinSS").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" Checked='<%# If (Eval("EsFinSS").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" Checked='<%# If (Eval("EsInicioAño").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" Checked='<%# If (Eval("EsInicioAño").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" Checked='<%# If (Eval("EsFinAño").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" Checked='<%# If (Eval("EsFinAño").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" Checked='<%# If (Eval("FueCalculado").ToString = "Si", True, False) %>' />
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" Checked='<%# If (Eval("FueCalculado").ToString = "Si", True, False) %>' />
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me form-control" AppendDataBoundItems="true" DataTextField="Estatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<%-- <asp:TemplateField>
|
||||
<%-- <asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<center>
|
||||
<asp:ImageButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" ValidationGroup="GrpGV" />
|
||||
<asp:ImageButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" />
|
||||
</center>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10px">
|
||||
<EditItemTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:LinkButton CssClass="btn btn-circle btn-sm green mysmallbtn" Text="<i class='fa fa-check'></i>" ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ValidationGroup="GrpGV"></asp:LinkButton>
|
||||
<asp:LinkButton CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='fa fa-ban'></i>" ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"></asp:LinkButton>
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:LinkButton ID="imgE" CssClass="btn btn-circle btn-sm blue mysmallbtn" Text="<i class='fa fa-pencil'></i>" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="10px">
|
||||
<ItemTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:LinkButton ID="imgD" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='icon-trash'></i>" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" OnClientClick="javascript:return C();"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>function ADSBegin() { FiltrarTablaV2('.TxtBusqueda', '.GvDatos') }</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -62,14 +62,14 @@ Partial Class Nomina_CatPeriodos
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, ChkEsInicioSS.Checked, ChkEsFinAño.Checked, ChkEsInicioAño.Checked, ChkEsFinAño.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -87,22 +87,22 @@ Partial Class Nomina_CatPeriodos
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(9).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(10).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(11).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(12).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(13).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(14).Width = Unit.Pixel(53)
|
||||
e.Row.Cells(15).Width = Unit.Pixel(68)
|
||||
'e.Row.Cells(0).Width = Unit.Pixel(100)
|
||||
'e.Row.Cells(1).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(2).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(8).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(9).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(10).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(11).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(12).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(13).Width = Unit.Pixel(100)
|
||||
'e.Row.Cells(14).Width = Unit.Pixel(53)
|
||||
'e.Row.Cells(15).Width = Unit.Pixel(68)
|
||||
'e.Row.Cells(15).Width = Unit.Pixel(100)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
@@ -81,7 +81,9 @@
|
||||
<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>
|
||||
<div class="row ">
|
||||
<div class="col-sm-6 ">
|
||||
<%--class="col-md-6 col-md-offset-3 col-sm-10 col-sm-offset-1"--%>
|
||||
@@ -370,7 +372,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="ModalEmpleados" class="modal ADS fade " role="dialog" data-backdrop="static" data-keyboard="false">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEmpleados" UpdateMode="Conditional">
|
||||
@@ -402,6 +404,8 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using static Extensiones.ModExtensiones;
|
||||
|
||||
public partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
@@ -42,6 +43,38 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
get { return ViewState["DtAltas"] != null ? (DataTable)ViewState["DtAltas"] : null; }
|
||||
set { ViewState["DtAltas"] = value; }
|
||||
}
|
||||
|
||||
private DataTable dtConceptos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtConceptos"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtConceptos"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtConceptos"] = value; }
|
||||
}
|
||||
|
||||
private DataTable dtempleadosConceptos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtempleadosConceptos"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtempleadosConceptos"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtempleadosConceptos"] = value; }
|
||||
}
|
||||
private DataTable dtempleados
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["dtempleados"] == null) { return null; }
|
||||
else { return (DataTable)ViewState["dtempleados"]; }
|
||||
}
|
||||
|
||||
set { ViewState["dtempleados"] = value; }
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -154,6 +187,7 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
protected void LnkConcepto_Click(object sender, EventArgs e)
|
||||
{
|
||||
Alert("x");
|
||||
//SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
|
||||
//SRTipoConcepto = ((LinkButton)sender).CommandArgument;
|
||||
//#region carga conceptos
|
||||
@@ -296,9 +330,32 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
|
||||
protected void LnkTimbrar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Alert("El finiquito se ha timbrado satisfactoriamente");
|
||||
LnkTimbrar.Visible = false;
|
||||
{
|
||||
int CvePeriodo = CvePeriodoFiniquito;
|
||||
|
||||
string[] getcolumnas = new string[] { "CvePersonal", "CveMetodoPago", "CveNomina", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" };
|
||||
|
||||
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", CvePersonal), "", getcolumnas);
|
||||
int CveNomina = dtr.Rows[0]["CveNomina"].ToString().ToEntero();
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
|
||||
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual);
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ Alert(Msg, TipoMensaje.MsgAdvertencia); }
|
||||
else
|
||||
{
|
||||
ClsNominas ObjPeriodo = new ClsNominas();
|
||||
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
ObjPeriodo.Dispose();
|
||||
//Alert("Se ha timbrado correctamente");
|
||||
|
||||
Alert("El finiquito se ha timbrado satisfactoriamente");
|
||||
LnkTimbrar.Visible = false;
|
||||
loadsobrerecibo(); UPDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
|
||||
@@ -461,6 +518,10 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
ObjPersonal.Commit();
|
||||
}
|
||||
@@ -472,31 +533,20 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
UPDatos.Update();
|
||||
}
|
||||
public void loadsobrerecibo()
|
||||
{
|
||||
List<NConcepto> finordin = null;
|
||||
List<NConcepto> finindem = null;
|
||||
|
||||
/*
|
||||
DataTable dtConceptos = null;
|
||||
DataTable dtempleadosConceptos = null;
|
||||
DataTable dtempleados = null;
|
||||
|
||||
|
||||
*/
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
}
|
||||
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
|
||||
{
|
||||
finordin = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
}
|
||||
dtempleadosConceptos = null;
|
||||
dtempleados = null;
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoIndemnizacion, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
@@ -507,23 +557,183 @@ public partial class Nomina_Finiquito : ClsPaginas
|
||||
{
|
||||
finindem = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
}
|
||||
dtempleadosConceptos = null;
|
||||
dtempleados = null;
|
||||
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[3];
|
||||
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0);
|
||||
LnkGuardarDatos.Enabled = LnkAutorizar.Visible;
|
||||
LnkTimbrar.Visible = !(LnkAutorizar.Visible) && (dtempleados.COUNT("CvePersonal", "SeTimbro=0") > 0);
|
||||
UpAcciones.Update();
|
||||
dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[0];
|
||||
}
|
||||
if (dtConceptos != null && dtempleadosConceptos != null && dtempleados != null)
|
||||
{
|
||||
finordin = cargasobrericiboconceptos(dtConceptos, dtempleadosConceptos, dtempleados);
|
||||
}
|
||||
|
||||
}
|
||||
GvFinOrdinario.DataSource = finordin;
|
||||
GVFinIndemnizacion.DataSource = finindem;
|
||||
GvFinOrdinario.DataBind();
|
||||
GVFinIndemnizacion.DataBind();
|
||||
LnkGuardarDatos.Enabled = false;
|
||||
LnkGuardarDatos.CssClass = "btn btn-default";
|
||||
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
|
||||
//LnkGuardarDatos.Enabled = false;
|
||||
if (!(LnkGuardarDatos.Enabled))
|
||||
{
|
||||
|
||||
LnkGuardarDatos.CssClass = "btn btn-default";
|
||||
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
|
||||
}
|
||||
LnkAutorizar.Visible = true;
|
||||
}
|
||||
|
||||
protected void LnkAutorizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
autorizarNomina(CvePersonal);
|
||||
UPDatos.Update();
|
||||
//Alert("El finiquito se ha autorizado satisfactoriamente.");
|
||||
//LnkAutorizar.Visible = false;
|
||||
//LnkTimbrar.Visible = true;
|
||||
}
|
||||
|
||||
Alert("El finiquito se ha autorizado satisfactoriamente.");
|
||||
LnkAutorizar.Visible = false;
|
||||
LnkTimbrar.Visible = true;
|
||||
|
||||
private void autorizarNomina(int FiltroCvePersonal)
|
||||
{
|
||||
|
||||
bool continuar = true;
|
||||
string[] getcolumnas = new string[] { "CvePersonal", "CveMetodoPago", "SumaPercepciones", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" };
|
||||
|
||||
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", FiltroCvePersonal), "", getcolumnas);
|
||||
DataTable dtconp = null;
|
||||
int CvePeriodoSeleccionado = CvePeriodoFiniquito;//cambiar reparar
|
||||
#region PropNomina
|
||||
int CvePersonal = 0;
|
||||
int CveNomina = 0;
|
||||
int CveMetodoPago = 0;
|
||||
double SubTotal = 0;
|
||||
double Total = 0;
|
||||
int CveMoneda = 1;
|
||||
#endregion
|
||||
#region PropNominaDetalle
|
||||
int CveConcepto = 0;
|
||||
decimal ImporteConcepto = 0, ImporteGravadoConcepto = 0, ImporteExentoConcepto = 0, ImporteValor = 0;
|
||||
#endregion
|
||||
|
||||
|
||||
using (ClsNominas objNomina = new ClsNominas())
|
||||
{
|
||||
objNomina.IniciaTransacSQL();
|
||||
foreach (DataRow rtemp in dtr.Rows)
|
||||
{
|
||||
CveNomina = 0;
|
||||
CvePersonal = rtemp["CvePersonal"].ToString().ToEntero();
|
||||
CveMetodoPago = rtemp["CveMetodoPago"].ToString().ToEntero();
|
||||
SubTotal = rtemp["SumaPercepciones"].ToString().ToDouble();
|
||||
Total = rtemp["Total"].ToString().ToDouble();
|
||||
if (CvePersonal > 0)
|
||||
{
|
||||
if (continuar)
|
||||
{
|
||||
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
|
||||
if (objNomina.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoSeleccionado, SubTotal, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
|
||||
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CveNomina = objNomina.CveNomina;
|
||||
}
|
||||
else
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CveNomina == 0)
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
dtconp = dtempleadosConceptos.FiltraParametros(string.Format("CvePersonal={0} AND Importe<>0", CvePersonal));
|
||||
foreach (DataRow rcon in dtconp.Rows)
|
||||
{
|
||||
|
||||
CveConcepto = rcon["CveConcepto"].ToString().ToEntero();
|
||||
ImporteConcepto = rcon["Importe"].ToString().ToDecimal();
|
||||
ImporteGravadoConcepto = rcon["ImporteGravado"].ToString().ToDecimal();
|
||||
ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
|
||||
ImporteValor = rcon["Valor"].ToString().ToDecimal();
|
||||
if (continuar)
|
||||
{
|
||||
|
||||
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario))
|
||||
{
|
||||
continuar = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (continuar)
|
||||
{
|
||||
decimal SalarioDiario = rtemp["SalarioDiario"].ToString().ToEntero();
|
||||
decimal SalarioDiarioIMSS = rtemp["SalarioDiarioIMSS"].ToString().ToEntero();
|
||||
decimal SalarioDiarioIntegrado = rtemp["SalarioDiarioIntegrado"].ToString().ToEntero();
|
||||
int DiasLaborados = rtemp["DiasLaborados"].ToString().ToEntero();
|
||||
int DiasFaltados = rtemp["DiasFaltados"].ToString().ToEntero();
|
||||
int DiasVacaciones = rtemp["DiasVacaciones"].ToString().ToEntero();
|
||||
int DiasIncapacidad = rtemp["DiasIncapacidad"].ToString().ToEntero();
|
||||
continuar = objNomina.PA_Nom_NominasAutorizarUP(CvePersonal, CvePeriodoSeleccionado, SalarioDiario, SalarioDiarioIMSS, SalarioDiarioIntegrado, 0, 0, Total, SubTotal, DiasLaborados, DiasFaltados, DiasVacaciones, DiasIncapacidad);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
continuar = objNomina.AutorizaNom_Nominas(-1, CvePeriodoSeleccionado, true);
|
||||
}
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
objNomina.Commit();
|
||||
LnkAutorizar.Visible = false;
|
||||
LnkTimbrar.Visible = true;
|
||||
|
||||
LnkGuardarDatos.Enabled = false;
|
||||
|
||||
LnkGuardarDatos.CssClass = "btn btn-default";
|
||||
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
|
||||
Alert("La nomina se autorizó correctamente.");
|
||||
}
|
||||
else
|
||||
{
|
||||
objNomina.RollBack();
|
||||
|
||||
}
|
||||
}
|
||||
if (dtr != null)
|
||||
{
|
||||
dtr.Dispose();
|
||||
|
||||
}
|
||||
if (dtconp != null)
|
||||
{
|
||||
dtconp.Dispose();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2406,6 +2406,102 @@ Partial Class Nomina_Nomina
|
||||
|
||||
EnvioMasivoCorreo()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CrearLayout(DTNomina As DataTable)
|
||||
|
||||
Dim sb As New StringBuilder
|
||||
Dim SbErrores As New StringBuilder
|
||||
Dim ErroresValidaciones As Boolean = False
|
||||
|
||||
|
||||
SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout")
|
||||
|
||||
For Each dRow As DataRow In DTNomina.Rows
|
||||
|
||||
Dim RFC As String = dRow("RFC").ToString()
|
||||
Dim Nombre As String = dRow("Nombre").ToString()
|
||||
Dim BancoNumCuenta As String = dRow("BancoNumCuenta").ToString()
|
||||
Dim Importe As Decimal = dRow("Importe").ToString().ToDecimal
|
||||
|
||||
|
||||
|
||||
If RFC.Trim().Length = 0 Then
|
||||
SbErrores.AppendLine($"El RFC es requerido del empleado {Nombre}<br/>")
|
||||
End If
|
||||
|
||||
Dim Coincidencia As Match = System.Text.RegularExpressions.Regex.Match(RFC, "/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/")
|
||||
If Not Coincidencia.Success Then
|
||||
SbErrores.AppendLine($"El RFC {RFC} del empleado {Nombre} no es valido <br/>")
|
||||
ErroresValidaciones = True
|
||||
End If
|
||||
|
||||
If BancoNumCuenta.Trim().Length <> 10 Then
|
||||
SbErrores.AppendLine($"Empleado {Nombre} numero de cuenta incorrecto, la cuenta debe de tener 10 caracteres<br/>") 'Bancomer 10 caracteres
|
||||
ErroresValidaciones = True
|
||||
End If
|
||||
|
||||
|
||||
If Importe <= 0 Then
|
||||
SbErrores.AppendLine($"Empleado {Nombre} el importe debe de ser mayor a 0 importe {Importe}") 'importe mayot a 0
|
||||
ErroresValidaciones = True
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
ErroresValidaciones = False
|
||||
|
||||
If Not ErroresValidaciones Then
|
||||
|
||||
Dim Count As Integer = 1
|
||||
For Each dRow As DataRow In DTNomina.Rows
|
||||
|
||||
Dim SbLinea As New StringBuilder
|
||||
|
||||
Dim RFC As String = dRow("RFC").ToString()
|
||||
Dim Nombre As String = dRow("Nombre").ToString()
|
||||
Dim BancoNumCuenta As String = dRow("BancoNumCuenta").ToString()
|
||||
Dim Importe As Decimal = dRow("Importe").ToString().ToDecimal.RoundSQL(2)
|
||||
|
||||
SbLinea.Append(Count.ToString("000000000"))
|
||||
SbLinea.Append(RFC.Trim().PadRight(16))
|
||||
SbLinea.Append("03")
|
||||
SbLinea.Append(BancoNumCuenta.Trim().PadRight(20))
|
||||
SbLinea.Append(Importe.ToString("0000000000000.00").Replace(".", ""))
|
||||
|
||||
|
||||
If Nombre.Trim().Length > 40 Then
|
||||
Nombre = Nombre.Substring(0, 40)
|
||||
End If
|
||||
|
||||
SbLinea.Append(Nombre.Trim().PadRight(40))
|
||||
|
||||
SbLinea.Append("012")
|
||||
SbLinea.Append("000")
|
||||
|
||||
sb.AppendLine(SbLinea.ToString())
|
||||
|
||||
|
||||
Count = Count + 1
|
||||
Next
|
||||
|
||||
|
||||
Response.Clear()
|
||||
Response.ClearHeaders()
|
||||
Response.AppendHeader("Content-Length", sb.ToString())
|
||||
Response.ContentType = "text/plain"
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=""Nomina{Now.ToString("yyyyMMddhhmmss").ToString()}.txt""")
|
||||
Response.Write(sb.ToString())
|
||||
Response.End()
|
||||
|
||||
|
||||
Else
|
||||
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EnvioMasivoCorreo()
|
||||
|
||||
@@ -149,6 +149,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkConceptoEmpleado" OnClick="LnkConceptoEmpleado_Click" runat="server" ><i class="fa fa-plus"></i> Empleado concepto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCargaAsistenciaMasiva" OnClick="LnkCargaAsistenciaMasiva_Click" runat="server"><i class="fa fa-check" aria-hidden="true"></i>Carga masiva de asistencia</asp:LinkButton>
|
||||
</li>
|
||||
@@ -462,7 +465,7 @@
|
||||
<ItemTemplate>
|
||||
<div style="width: 100px; text-align: right; white-space: nowrap; padding-right: 10px;">
|
||||
<asp:HyperLink ID="HypXml" Visible="false" NavigateUrl="#" runat="server">XML</asp:HyperLink>
|
||||
<asp:HyperLink ID="HypPDF" Visible="false" NavigateUrl="#" runat="server"><i class="fa fa-ad-pdf"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="HypPDF" CssClass="btn btn-circle btn-sm blue mysmallbtn" Visible="false" NavigateUrl="#" runat="server"><i class="fa fa-ad-pdf"></i></asp:HyperLink>
|
||||
<asp:LinkButton runat="server" ID="LnkTimbrar" CssClass="btn btn-circle btn-sm blue mysmallbtn" Text="<i class='fa fa-bell'></i>" OnClick="LnkTimbrar_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Timbrar?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton runat="server" ID="ImgDelete" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='icon-trash'></i>" OnClick="ImgDelete_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && Eval("SeTimbro").ToString() == "False"? true :false)%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la nómina?" data-btn-ok-label="si" />
|
||||
<asp:LinkButton runat="server" ID="LnkCancelar" CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='fa fa-ban'></i>" OnClick="LnkCancelar_Click" CommandArgument='<%# Eval("CveNomina") %>' Visible='<%# (Eval("CveNomina").ToString() != "" && PermisoCancelarEmitido && Eval("SeTimbro").ToString() == "True"? true :false)%>' data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar la nómina?" data-btn-ok-label="si" />
|
||||
@@ -1378,6 +1381,12 @@
|
||||
<asp:Label ID="LblConceptoMod" runat="server" Text=""></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div runat="server" Visible="<%# (SRCvePersonal <=0) %>" class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlmcPersonal" Enabled="false" Text="Empleado"></asp:Label>
|
||||
<asp:DropDownList ID="DdlmcPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" AssociatedControlID="DdlmcConceptos" Enabled="false" Text="Concepto"></asp:Label>
|
||||
<asp:DropDownList ID="DdlmcConceptos" CssClass="select2me form-control" Width="100%" DataValueField="CveConcepto" DataTextField="CodigoConcepto" OnSelectedIndexChanged="DdlmcConceptos_SelectedIndexChanged" AutoPostBack=" true" runat="server">
|
||||
@@ -1891,6 +1900,7 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="2">Salario</th>
|
||||
<th colspan="2">Días</th>
|
||||
<th colspan="2">Cuota Fija</th>
|
||||
<th colspan="2">Cuota Excedente</th>
|
||||
<th colspan="2">Prestaciones en Dinero</th>
|
||||
@@ -1920,6 +1930,16 @@
|
||||
<asp:Label runat="server" Text='<%# Eval("SalarioSIG","{0:N2}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("DiasMes","{0:N0}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("DiasAsistio","{0:N0}")%>'> </asp:Label></td>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SUA">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CuotaFijaSUA","{0:N2}")%>'> </asp:Label></td>
|
||||
|
||||
@@ -370,9 +370,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DataRow drow = objnom.DtResultados.Rows[0];
|
||||
int Estatus = drow["Estatus"].ToString().ToEntero();
|
||||
int CvePrePolizaProvision = drow["CvePrePolizaProvision"].ToString().ToEntero();
|
||||
|
||||
LnkConceptoEmpleado.Visible = true;
|
||||
LnkAutorizar.Visible = (Estatus == 1);
|
||||
LnkRegistrarProvision.Visible = (Estatus > 2);
|
||||
LnkRegistrarProvision.Visible = (Estatus > 2) && CvePrePolizaProvision<0;
|
||||
LnkConceptoEmpleado.Visible = (Estatus < 2);
|
||||
LnkCargaAsistenciaMasiva.Visible = (Estatus < 2);
|
||||
LnkModalPlantillaNomina.Visible = (Estatus < 2);
|
||||
LnkTimbrarTodos.Visible = (Estatus > 1);
|
||||
|
||||
LnkProvisionNomina.Visible = CvePrePolizaProvision > 0;
|
||||
@@ -393,6 +396,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
continuar = true;
|
||||
}
|
||||
|
||||
LnkTimbrarTodos.Visible = dtempleados.Rows.Count >0 && dtempleados.COUNT("CvePersonal", "SeTimbro=0 AND CvePersonal >0")>0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -949,7 +953,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
|
||||
e.Row.FCHyperLink("HypPDF").Attributes.Add("onclick", string.Format("GETPDF({0},{1})", -1, CvePeriodoSeleccionado));
|
||||
e.Row.FindControl("HypPDF").Visible = true;
|
||||
e.Row.FindControl("HypPDF").Visible = false;
|
||||
e.Row.CssClass = "SubTotales";
|
||||
}
|
||||
e.Row.FindControl("LnkSobreRecibo").Visible = false;
|
||||
@@ -1062,7 +1066,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
string RFCEmisor = UsuarioActual.Empresa.RFC;
|
||||
|
||||
|
||||
if (ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor,4))
|
||||
if (ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, RFCEmisor, 4))
|
||||
{
|
||||
Nom.UpdateEstatusNomNominas(2, UsuarioActual.Empresa.CvePAC, "", "", ("01/01/2000").ToDate(), CveNomina, 0, 0, 0, 0, 0);
|
||||
|
||||
@@ -1553,6 +1557,43 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
UPpanelModalUpConcepto.Update();
|
||||
}
|
||||
|
||||
protected void LnkConceptoEmpleado_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
SRCveConcepto = -1;
|
||||
SRTipoConcepto = "P";
|
||||
SRCvePersonal = -1;
|
||||
|
||||
using (ClsRH ObjPersonal = new ClsRH())
|
||||
{
|
||||
if (ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlmcPersonal.DataSource = ObjPersonal.DtResultados;
|
||||
DdlmcPersonal.DataBind();
|
||||
}
|
||||
}
|
||||
#region carga conceptos
|
||||
DataTable dtCon;
|
||||
|
||||
dtCon = dtConceptos.FiltraParametros("Tipo IN('P','D') AND EsPadre = 1 ").Copy();
|
||||
dtCon.Columns.Add(new DataColumn("CodigoConcepto"));
|
||||
foreach (DataRow trow in dtCon.Rows)
|
||||
{
|
||||
trow["CodigoConcepto"] = string.Format("{0} - {1}", trow["Codigo"], trow["Concepto"]);
|
||||
}
|
||||
dtCon.AcceptChanges();
|
||||
#endregion
|
||||
DdlmcConceptos.DataSource = dtCon;
|
||||
DdlmcConceptos.DataBind();
|
||||
if (SRCveConcepto > 0)
|
||||
{
|
||||
DdlmcConceptos.SelectedValueExist(SRCveConcepto);
|
||||
}
|
||||
|
||||
DdlmcConceptos_SelectedIndexChanged(DdlmcConceptos, null);
|
||||
RegistraScript(string.Format("$('#ModalUpConcepto').on('shown.bs.modal', function () {{$('#{0}').trigger('focus')}});$('#ModalUpConcepto').modal();", TxtmcImporte.ClientID));
|
||||
UPpanelModalUpConcepto.Update();
|
||||
}
|
||||
protected void DdlmcConceptos_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int CvePersonal = SRCvePersonal;
|
||||
@@ -1587,8 +1628,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CveMoneda = 1;
|
||||
int CveMetodoPago = 0;
|
||||
int CvePersonal = SRCvePersonal;
|
||||
if (CvePersonal <= 0)
|
||||
{
|
||||
CvePersonal = DdlmcPersonal.SelectedValue.ToEntero();
|
||||
}
|
||||
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
|
||||
if (CveConcepto > 0)
|
||||
if (CveConcepto > 0 && CvePersonal > 0)
|
||||
{
|
||||
decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal();
|
||||
decimal ImporteGravadoConcepto = TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
|
||||
@@ -1655,8 +1700,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
|
||||
|
||||
if (CveConcepto > 0)
|
||||
{
|
||||
Alert("Debe seleccionar un empleado.", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4783,27 +4834,30 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
range.Value = "Salario";
|
||||
range = libro.Range(Fila, 4, Fila, 5);
|
||||
range.Merge();
|
||||
range.Value = "Cuota Fija";
|
||||
range.Value = "Días";
|
||||
range = libro.Range(Fila, 6, Fila, 7);
|
||||
range.Merge();
|
||||
range.Value = "Cuota Excedente";
|
||||
range.Value = "Cuota Fija";
|
||||
range = libro.Range(Fila, 8, Fila, 9);
|
||||
range.Merge();
|
||||
range.Value = "Prestaciones en Dinero";
|
||||
range.Value = "Cuota Excedente";
|
||||
range = libro.Range(Fila, 10, Fila, 11);
|
||||
range.Merge();
|
||||
range.Value = "Gastos Medicos";
|
||||
range.Value = "Prestaciones en Dinero";
|
||||
range = libro.Range(Fila, 12, Fila, 13);
|
||||
range.Merge();
|
||||
range.Value = "Riesgos de Trabajo";
|
||||
range.Value = "Gastos Medicos";
|
||||
range = libro.Range(Fila, 14, Fila, 15);
|
||||
range.Merge();
|
||||
range.Value = "Invalidez y Vida";
|
||||
range.Value = "Riesgos de Trabajo";
|
||||
range = libro.Range(Fila, 16, Fila, 17);
|
||||
range.Merge();
|
||||
range.Value = "Guarderia";
|
||||
range.Value = "Invalidez y Vida";
|
||||
range = libro.Range(Fila, 18, Fila, 19);
|
||||
range.Merge();
|
||||
range.Value = "Guarderia";
|
||||
range = libro.Range(Fila, 20, Fila, 21);
|
||||
range.Merge();
|
||||
range.Value = "Retiro";
|
||||
Fila = Fila + 1;
|
||||
libro.Cell(Fila, 1).Value = "Empleado";
|
||||
@@ -4825,6 +4879,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
libro.Cell(Fila, 17).Value = "SIG";//GuarderiaSIG
|
||||
libro.Cell(Fila, 18).Value = "SUA";//RetiroSUA
|
||||
libro.Cell(Fila, 19).Value = "SIG";//RetiroSIG
|
||||
libro.Cell(Fila, 20).Value = "SUA";//RetiroSUA
|
||||
libro.Cell(Fila, 21).Value = "SIG";//RetiroSIG
|
||||
|
||||
|
||||
libro.Cell(1, 1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||
@@ -4840,22 +4896,24 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
libro.Cell(Fila, 1).Value = erow["CodigoNombreCompleto"];
|
||||
libro.Cell(Fila, 2).Value = string.Format("{0:N2}", erow["SalarioSUA"]);
|
||||
libro.Cell(Fila, 3).Value = string.Format("{0:N2}", erow["SalarioSIG"]);
|
||||
libro.Cell(Fila, 4).Value = string.Format("{0:N2}", erow["CuotaFijaSUA"]);
|
||||
libro.Cell(Fila, 5).Value = string.Format("{0:N2}", erow["CuotaFijaSIG"]);
|
||||
libro.Cell(Fila, 6).Value = string.Format("{0:N2}", erow["CuotaExcedenteSUA"]);
|
||||
libro.Cell(Fila, 7).Value = string.Format("{0:N2}", erow["CuotaExcedenteSIG"]);
|
||||
libro.Cell(Fila, 8).Value = string.Format("{0:N2}", erow["PrestacionesDineroSUA"]);
|
||||
libro.Cell(Fila, 9).Value = string.Format("{0:N2}", erow["PrestacionesSIG"]);
|
||||
libro.Cell(Fila, 10).Value = string.Format("{0:N2}", erow["GastosMedPenSUA"]);
|
||||
libro.Cell(Fila, 11).Value = string.Format("{0:N2}", erow["GastosMedicosSIG"]);
|
||||
libro.Cell(Fila, 12).Value = string.Format("{0:N2}", erow["RiesgosdeTrabajoSUA"]);
|
||||
libro.Cell(Fila, 13).Value = string.Format("{0:N2}", erow["RiesgoTrabajoSIG"]);
|
||||
libro.Cell(Fila, 14).Value = string.Format("{0:N2}", erow["InvalidezyVidaSUA"]);
|
||||
libro.Cell(Fila, 15).Value = string.Format("{0:N2}", erow["InvalidezyVidaSIG"]);
|
||||
libro.Cell(Fila, 16).Value = string.Format("{0:N2}", erow["GuarderiaSUA"]);
|
||||
libro.Cell(Fila, 17).Value = string.Format("{0:N2}", erow["GuarderiaSIG"]);
|
||||
libro.Cell(Fila, 18).Value = string.Format("{0:N2}", erow["RetiroSUA"]);
|
||||
libro.Cell(Fila, 19).Value = string.Format("{0:N2}", erow["RetiroSIG"]);
|
||||
libro.Cell(Fila, 4).Value = string.Format("{0:N2}", erow["DiasMes"]);
|
||||
libro.Cell(Fila, 5).Value = string.Format("{0:N2}", erow["DiasAsistio"]);
|
||||
libro.Cell(Fila, 6).Value = string.Format("{0:N2}", erow["CuotaFijaSUA"]);
|
||||
libro.Cell(Fila, 7).Value = string.Format("{0:N2}", erow["CuotaFijaSIG"]);
|
||||
libro.Cell(Fila, 8).Value = string.Format("{0:N2}", erow["CuotaExcedenteSUA"]);
|
||||
libro.Cell(Fila, 9).Value = string.Format("{0:N2}", erow["CuotaExcedenteSIG"]);
|
||||
libro.Cell(Fila, 10).Value = string.Format("{0:N2}", erow["PrestacionesDineroSUA"]);
|
||||
libro.Cell(Fila, 11).Value = string.Format("{0:N2}", erow["PrestacionesSIG"]);
|
||||
libro.Cell(Fila, 12).Value = string.Format("{0:N2}", erow["GastosMedPenSUA"]);
|
||||
libro.Cell(Fila, 13).Value = string.Format("{0:N2}", erow["GastosMedicosSIG"]);
|
||||
libro.Cell(Fila, 14).Value = string.Format("{0:N2}", erow["RiesgosdeTrabajoSUA"]);
|
||||
libro.Cell(Fila, 15).Value = string.Format("{0:N2}", erow["RiesgoTrabajoSIG"]);
|
||||
libro.Cell(Fila, 16).Value = string.Format("{0:N2}", erow["InvalidezyVidaSUA"]);
|
||||
libro.Cell(Fila, 17).Value = string.Format("{0:N2}", erow["InvalidezyVidaSIG"]);
|
||||
libro.Cell(Fila, 18).Value = string.Format("{0:N2}", erow["GuarderiaSUA"]);
|
||||
libro.Cell(Fila, 19).Value = string.Format("{0:N2}", erow["GuarderiaSIG"]);
|
||||
libro.Cell(Fila, 20).Value = string.Format("{0:N2}", erow["RetiroSUA"]);
|
||||
libro.Cell(Fila, 21).Value = string.Format("{0:N2}", erow["RetiroSIG"]);
|
||||
}
|
||||
//libro.Row(2).SetAutoFilter();
|
||||
|
||||
@@ -5045,7 +5103,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
List<byte[]> pdfs = new List<byte[]>();
|
||||
//byte[] pdf2 = new byte[1]; bool notfirst = false;
|
||||
foreach (DataRow dr in dtempleados.Rows)
|
||||
foreach (DataRow dr in dtempleados.FiltraParametros("", "CveSubProyecto").Rows)
|
||||
{
|
||||
CvePersonal = dr["CvePersonal"].ToString().ToEntero();
|
||||
if (CvePersonal > 0)
|
||||
@@ -5169,9 +5227,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
mimeType = MimeMapping.GetMimeMapping(PathXML);
|
||||
}
|
||||
catch (Exception )
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
// Response.Write(path)
|
||||
Response.Clear();
|
||||
@@ -5197,4 +5255,5 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
||||
|
||||
foreach (GridViewRow item in GVCalculosSBC.Rows)
|
||||
{
|
||||
int CvePersonal = item.DataKey("Movtotxt").ToEntero();//,,,
|
||||
int CvePersonal = item.DataKey("CvePersonal").ToEntero();//,,,
|
||||
double SalarioDiario = item.DataKey("SalarioDiario").ToDouble();
|
||||
double SDINuevo = item.DataKey("SDINuevo").ToDouble();
|
||||
double SalarioDiarioSSNuevo = Math.Round(item.DataKey("SalarioDiarioSSNuevo").ToDouble(),2);
|
||||
|
||||
163
RH/Personal.aspx
163
RH/Personal.aspx
@@ -38,11 +38,14 @@
|
||||
<asp:LinkButton ID="LbGafete" runat="server" CssClass="" Text="Gafete" />
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Lnkopenaddcuentabancaria" OnClick="Lnkopenaddcuentabancaria_Click" Visible="true" runat="server"> <i class="fa fa-plus"></i> Agregar cuenta bancaria</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<asp:UpdatePanel ID="UpBuzon" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkBuzonDeCalidad" Visible="true" runat="server"> <i class="fa fa-sticky-note"></i> Agregar Buzón de Calidad</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkBuzonDeCalidad" Visible="true" runat="server"> <i class="fa fa-sticky-note"></i> Agregar buzón de calidad</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -50,7 +53,7 @@
|
||||
<asp:UpdatePanel ID="UpSaldoI" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSaldoI" Visible="true" runat="server"> <i class="fa fa-plus"></i> Carga Saldo Inicial</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSaldoI" Visible="true" runat="server"> <i class="fa fa-plus"></i> Carga saldo inicial</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -58,7 +61,7 @@
|
||||
<asp:UpdatePanel ID="UpDescargaConsumos" runat="server" Visible="false">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDFConsumo" runat="server" OnClick="LnkImprimirPDFConsumo_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Consumo</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImprimirPDFConsumo" runat="server" OnClick="LnkImprimirPDFConsumo_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF consumo</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
@@ -69,7 +72,7 @@
|
||||
<asp:UpdatePanel ID="UpLnkAddLicencias" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddLicencias" runat="server"><i class="fa fa-list-alt"></i> Registrar Licencias</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAddLicencias" runat="server"><i class="fa fa-list-alt"></i> Registrar licencias</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -82,10 +85,10 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCalcularFactor" OnClick="LnkCalcularFactor_Click" runat="server"><i class="fa fa-list-alt"></i> Calcular Factor de integracion</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCalcularFactor" OnClick="LnkCalcularFactor_Click" runat="server"><i class="fa fa-list-alt"></i> Calcular factor de integracion</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModsalario" OnClick="LnkModsalario_Click" runat="server"><i class="fa fa-pencil"></i>Modificar Salario </asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkModsalario" OnClick="LnkModsalario_Click" runat="server"><i class="fa fa-pencil"></i>Modificar salario </asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -755,29 +758,29 @@
|
||||
<i class="icon-user-following font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Contable:</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:Button ID="BtnCargarCuentas" runat="server" ClientIDMode="Static" Text="CargaCuentas" CssClass="help-block errorimput" class="btn btn-success" Style="display: none;" />
|
||||
<asp:HiddenField ID="HdnCuenta" runat="server" ClientIDMode="Static" Value="0" />
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:Button ID="BtnCargarCuentas" runat="server" ClientIDMode="Static" Text="CargaCuentas" CssClass="help-block errorimput" class="btn btn-success" Style="display: none;" />
|
||||
<asp:HiddenField ID="HdnCuenta" runat="server" ClientIDMode="Static" Value="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="form-group input-iconright">
|
||||
<label for="<%= DdlViaticos.ClientID.ToString()%>">Viáticos:</label>
|
||||
<asp:DropDownList Width="100%" ID="DdlViaticos" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" CssClass="form-control input-sm ">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="form-group input-iconright">
|
||||
<label for="<%= DdlViaticos.ClientID.ToString()%>">Viáticos:</label>
|
||||
<asp:DropDownList Width="100%" ID="DdlViaticos" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" CssClass="form-control input-sm ">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<i></i>
|
||||
|
||||
</div>
|
||||
<div class="form-group input-iconright">
|
||||
<label for="<%= DdlPrestamos.ClientID.ToString()%>">Préstamos:</label>
|
||||
<asp:DropDownList Width="100%" ID="DdlPrestamos" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" CssClass="form-control input-sm ">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group input-iconright">
|
||||
<label for="<%= DdlPrestamos.ClientID.ToString()%>">Préstamos:</label>
|
||||
<asp:DropDownList Width="100%" ID="DdlPrestamos" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" CssClass="form-control input-sm ">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -903,7 +906,7 @@
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpTitulosCuentasBancos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table style="border: 1px solid #D3D3D3; table-layout: fixed;" class="table table-striped table-hover Widthall">
|
||||
<%-- <table style="border: 1px solid #D3D3D3; table-layout: fixed;" class="table table-striped table-hover Widthall">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="7%">
|
||||
@@ -963,26 +966,18 @@
|
||||
<th width="7%">
|
||||
<asp:LinkButton ID="LbMoneda" runat="server" CausesValidation="false" Text="" OnClick="LbOrden_Click" CommandArgument="Moneda0;0">
|
||||
Moneda
|
||||
|
||||
<asp:Literal ID="ImgMoneda0" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton></th>
|
||||
<th id="THEstatus" runat="server" style="width: 7%;">
|
||||
<asp:LinkButton ID="LbEstatusPE" runat="server" CausesValidation="false" Text="Estatus Layout" OnClick="LbOrden_Click" CommandArgument="Estatus"></asp:LinkButton> <asp:ImageButton ID="ImgEstatusPE" OnClick="LbOrden_Click" CommandArgument="Estatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></th>
|
||||
<th width="7%">BBVA Alias
|
||||
</td>
|
||||
|
||||
|
||||
<th id="THEstatusTexto" runat="server" style="width: 7%;">
|
||||
<asp:LinkButton ID="LbEstatusTexto" runat="server" CausesValidation="false" Text="Estatus" CommandArgument="EstatusTexto"></asp:LinkButton> <asp:ImageButton ID="ImageButton5" OnClick="LbOrden_Click" CommandArgument="Estatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></th>
|
||||
<th style="text-align: center;" width="14%">Comandos</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<td align="center" width="7%">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtNombreBanco" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco" Width="90%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreBanco" runat="server" ControlToValidate="TxtNombreBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''NombreBanco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
|
||||
@@ -1007,7 +1002,6 @@
|
||||
</td>
|
||||
<td align="center" width="7%">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtConvenioCIE" runat="server" CausesValidation="true" MaxLength="8" ValidationGroup="GrpAgregarBanco" Width="90%"></asp:TextBox>
|
||||
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
|
||||
</td>
|
||||
<td align="center" width="7%">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtReferenciaCB" runat="server" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco" Width="90%"></asp:TextBox>
|
||||
@@ -1025,29 +1019,24 @@
|
||||
<td align="center" width="7%">
|
||||
<asp:TextBox ID="TxtBBVAAlias" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="30" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="Flter" runat="server" TargetControlID="TxtBBVAAlias" FilterType="UppercaseLetters,LowercaseLetters,Numbers" InvalidChars="-+.," />
|
||||
|
||||
</td>
|
||||
|
||||
<td id="TDEstatusTexto" runat="server" visible="false" width="7%">
|
||||
<%--<asp:CheckBox ID ="ChkEstatus" runat="server" Checked="true"></asp:CheckBox>--%>
|
||||
</td>
|
||||
<td id="TD1" runat="server" visible="true" width="7%">
|
||||
<%--<asp:CheckBox ID ="ChkEstatus" runat="server" Checked="true"></asp:CheckBox>--%>
|
||||
</td>
|
||||
<td align="center" width="7%">
|
||||
|
||||
<asp:LinkButton ID="LbAgregarCuentaBanco" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpAgregarBanco" OnClick="LbAgregarCuentaBanco_Click"></asp:LinkButton>
|
||||
</td>
|
||||
</table>
|
||||
</table>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpCuentasBancos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" CssClass="table table-striped table-hover Widthall" Style="table-layout: fixed" runat="server"
|
||||
DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
|
||||
DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" ShowHeaderWhenEmpty="true">
|
||||
<%--<asp:GridView ID="GvBancosCuentas" runat="server" DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias" CssClass="table table-striped table-advance table-hover" Style="table-layout: fixed" BorderWidth="0" GridLines="None">--%>
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Banco">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtNombreBanco" runat="server" data-toggle="tooltip" title='<%# Eval("BancoNombre")%>' Text='<%# Eval("BancoNombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1057,7 +1046,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtNumeroSucursal" runat="server" data-toggle="tooltip" title='<%# Eval("Sucursal")%>' Text='<%# Eval("Sucursal")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1065,7 +1054,7 @@
|
||||
<asp:TextBox CssClass="form-control" ID="TxtNumeroSucursal" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Sucursal")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Cuenta">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtNumeroCuenta" runat="server" data-toggle="tooltip" title='<%# Eval("Cuenta")%>' Text='<%# Eval("Cuenta")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1075,7 +1064,7 @@
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" HeaderText="Clabe">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtCLABE" runat="server" data-toggle="tooltip" title='<%# Eval("CLABE")%>' Text='<%# Eval("CLABE")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1085,7 +1074,7 @@
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtSWIFT" runat="server" data-toggle="tooltip" title='<%# Eval("SWIFT")%>' Text='<%# Eval("SWIFT")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1093,7 +1082,7 @@
|
||||
<asp:TextBox CssClass="form-control" ID="TxtSWIFT" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("SWIFT")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtPlaza" runat="server" data-toggle="tooltip" title='<%# Eval("Plaza")%>' Text='<%# Eval("Plaza")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1101,7 +1090,7 @@
|
||||
<asp:TextBox CssClass="form-control" ID="TxtPlaza" runat="server" CausesValidation="true" MaxLength="100" Text='<%# Eval("Plaza")%>' ValidationGroup="GrpEditarCuentaBanco" Width="90%"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtConvenioCIE" runat="server" data-toggle="tooltip" title='<%# Eval("CIE")%>' Text='<%# Eval("CIE")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1110,7 +1099,7 @@
|
||||
<%--<ajax:FilteredTextBoxExtender ID="SoloNumeros3" runat="server" TargetControlID="TxtConvenioCIE" FilterType="Numbers" />--%>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtReferencia" runat="server" data-toggle="tooltip" title='<%# Eval("Referencia")%>' Text='<%# Eval("Referencia")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1119,7 +1108,7 @@
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtRefCrediProveedor" runat="server" data-toggle="tooltip" title='<%# Eval("RefCrediProveedor")%>' Text='<%# Eval("RefCrediProveedor")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1140,7 +1129,7 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblBBVAAlias" runat="server" data-toggle="tooltip" title='<%# Eval("BBVAAlias")%>' Text='<%# Eval("BBVAAlias")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
@@ -1165,7 +1154,7 @@
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# IIf(Eval("EstatusTexto").ToString = "Activo", True, False)%>' Visible="false"></asp:CheckBox>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="7%" ItemStyle-CssClass="Excede">
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="7%" ItemStyle-CssClass="Excede" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditarCuentaBanco" />
|
||||
@@ -1932,31 +1921,31 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Asistencia</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoAsistencias" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlTipoAsistencias" runat="server" TabIndex="2" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>% Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtPorPago" runat="server" MaxLength="3" Text="100" Width="44px"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtPorPago" TabIndex="1" runat="server" MaxLength="3" Text="100" Width="44px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Hrs Dob.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtHorasDobles" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtHorasDobles" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Hrs Trip.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtHorasTriples" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtHorasTriples" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Motivo H. Extras</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlMotivoHoraExtra" runat="server" AppendDataBoundItems="true" DataTextField="MotivoHoraExtra" DataValueField="CveMotivoHoraExtra" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
|
||||
<asp:DropDownList ID="DdlMotivoHoraExtra" runat="server" TabIndex="2" AppendDataBoundItems="true" DataTextField="MotivoHoraExtra" DataValueField="CveMotivoHoraExtra" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
@@ -1964,7 +1953,7 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Obs.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtObservaciones" runat="server" Width="84px" MaxLength="150"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtObservaciones" TabIndex="3" runat="server" Width="84px" MaxLength="150"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" Visible="false">
|
||||
@@ -3976,6 +3965,60 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivCuentasVancarias" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 400px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpCuentasVancarias" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlCuentasvancarias" runat="server">Cuentas bancarias</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlBancoSat" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="Banco" DataValueField="CveSATBanco" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlBancoSat" Text="Banco:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVBancoSat" runat="server" InitialValue="-1" ControlToValidate="DdlBancoSat" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoBancoSat" runat="server" HighlightCssClass="vco" TargetControlID="RFVBancoSat" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtNumeroCuenta" runat="server"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtNumeroCuenta" Text="Cuenta:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVNumeroCuenta" runat="server" InitialValue="-1" ControlToValidate="TxtNumeroCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoNumeroCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtCLABECB" runat="server" MaxLength="20"></asp:TextBox>
|
||||
<asp:Label runat="server" AssociatedControlID="TxtCLABECB" Text="CLABE:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVCLABECB" runat="server" InitialValue="-1" ControlToValidate="TxtCLABECB" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CLABE''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoCLABECB" runat="server" HighlightCssClass="vco" TargetControlID="RFVCLABECB" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList Width="100%" ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Class="form-control input-sm select2me" Style="width: 90% !important;"></asp:DropDownList>
|
||||
<asp:Label runat="server" AssociatedControlID="DdlMoneda" Text="Moneda:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVMonedax" runat="server" InitialValue="-1" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMonedax" runat="server" HighlightCssClass="vco" TargetControlID="RFVMonedax" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div>
|
||||
<asp:Label runat="server" AssociatedControlID="ChkEstatus" Text="Activo:"></asp:Label><br />
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked="true" Visible="false"></asp:CheckBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarCuentaBanco" OnClick="LbAgregarCuentaBanco_Click" UseSubmitBehavior="false" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpAgregarBanco" />
|
||||
<button id="Button5" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="divEditarDiaVacacion" class="modal ADS fade" role="dialog">
|
||||
<div id="dvEdicion" runat="server" class="modal-dialog" style="width: 400px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalEditarDiaVacacion" UpdateMode="Conditional">
|
||||
@@ -4255,7 +4298,7 @@
|
||||
</td>
|
||||
<td style="width: 33%!important; vertical-align: top!important">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<ADS:Dropdownlost CssClassDdl="form-control input-sm select2me" ID="DdlClienteBuzon" Width="100%" data-metodo="getcliente" runat="server" DataTextField="Nombre" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost CssClassDdl="form-control input-sm select2me" ID="DdlClienteBuzon" Width="100%" data-metodo="getcliente" runat="server" DataTextField="Nombre" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlClienteBuzon" AutoPostBack="true" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" ValidationGroup="GrpAgragarBuzonCalidad" Width="200px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione uno" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
|
||||
@@ -947,12 +947,17 @@ Partial Class RH_Personal
|
||||
Dim fechainicioasistencia As String
|
||||
Dim fechaFinasistencia As String
|
||||
If Now.Day >= 15 Then
|
||||
'fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now)
|
||||
'fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now)
|
||||
fechainicioasistencia = String.Format("{0:16/MM/yyyy}", Now)
|
||||
Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddMonths(1).AddDays(-1)
|
||||
fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis)
|
||||
Else
|
||||
'Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddDays(-1)
|
||||
'fechainicioasistencia = String.Format("{0:16/MM/yyyy}", dateendasis)
|
||||
'fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis)
|
||||
fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now)
|
||||
fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now)
|
||||
Else
|
||||
Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddDays(-1)
|
||||
fechainicioasistencia = String.Format("{0:16/MM/yyyy}", dateendasis)
|
||||
fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis)
|
||||
End If
|
||||
If Request("FechaI") IsNot Nothing AndAlso IsDate(Request("FechaI")) Then
|
||||
txtFechaI.Text = Request("FechaI")
|
||||
@@ -1195,7 +1200,9 @@ Partial Class RH_Personal
|
||||
|
||||
Private Sub CargaBancos()
|
||||
DdlBanco.DataSource = GlobalDTNomSatBancos
|
||||
DdlBancoSat.DataSource = GlobalDTNomSatBancos
|
||||
DdlBanco.DataBind()
|
||||
DdlBancoSat.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaEstados(pCvePais As Integer)
|
||||
@@ -1265,7 +1272,11 @@ Partial Class RH_Personal
|
||||
|
||||
Protected Sub CargaGvAsistencias(Optional Orden As String = "")
|
||||
Dim objpersonal As New ClsRH
|
||||
If objpersonal.GetAsistencias(CvePersonal, DdlClienteAsistenciaC.SelectedValue.ToEntero, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveCliente As Integer = DdlClienteAsistenciaC.SelectedValue.ToEntero()
|
||||
If CveCliente <= 0 Then
|
||||
CveCliente = -1
|
||||
End If
|
||||
If objpersonal.GetAsistencias(CvePersonal, CveCliente, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL")
|
||||
Else
|
||||
GVAsistencia.DataSource = Nothing
|
||||
@@ -2878,10 +2889,16 @@ Partial Class RH_Personal
|
||||
DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub Lnkopenaddcuentabancaria_Click(sender As Object, e As EventArgs)
|
||||
BtnAgregarCuentaBanco.Visible = False
|
||||
BtnAgregarCuentaBanco.Visible = True
|
||||
|
||||
RegistraScript("$('#DivCuentasVancarias').modal();")
|
||||
End Sub
|
||||
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||
Dim EsBancomer = False
|
||||
|
||||
If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
||||
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
|
||||
If nombrebanco.ToUpper.Contains("BBVA") Or nombrebanco.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
||||
EsBancomer = True
|
||||
End If
|
||||
|
||||
@@ -2914,23 +2931,19 @@ Partial Class RH_Personal
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'SI CIE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 6 Y REFERENCIA OBLIGATORIA
|
||||
If (TxtConvenioCIE.Text.Trim.Length <> 0 And TxtConvenioCIE.Text.Trim.Length <> 6) Or (TxtConvenioCIE.Text.Trim.Length = 6 And TxtReferenciaCB.Text.Trim.Length < 3) Then
|
||||
Alert("El Convenio CIE debe tener una longitud de 6 dígitos y se debe especificar una referencia. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
|
||||
If EsBancomer AndAlso Not (TxtNumeroCuenta.Text.Trim.Length = 10 Or TxtConvenioCIE.Text.Trim.Length = 6) Then
|
||||
Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
''CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"
|
||||
'If EsBancomer AndAlso Not (TxtNumeroCuenta.Text.Trim.Length = 10 Or TxtConvenioCIE.Text.Trim.Length = 6) Then
|
||||
' Alert("Para cuentas BBVA BANCOMER es obligatorio el Número de Cuenta o CIE.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABECB.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta.Text.Trim, TxtConvenioCIE.Text.Trim, TxtReferenciaCB.Text.Trim, DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, TxtBBVAAlias.Text)
|
||||
AgregarCuentaBanco(nombrebanco, "", TxtCLABECB.Text.Trim, "", "", TxtNumeroCuenta.Text.Trim, "", "", DdlMoneda.SelectedValue.ToEntero, DdlMoneda.SelectedItem.Text, "", DdlBancoSat.SelectedValue.ToEntero())
|
||||
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
||||
End Sub
|
||||
Private Sub CargaGridCuentasBancos(Orden As String)
|
||||
If CvePersonal > 0 Then
|
||||
If Orden <> String.Empty Then
|
||||
If Not String.IsNullOrEmpty(Orden) Then
|
||||
Dim DV As New DataView(DTCuentasBancos, "", Orden, DataViewRowState.CurrentRows)
|
||||
GvBancosCuentas.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
@@ -2938,7 +2951,7 @@ Partial Class RH_Personal
|
||||
GvBancosCuentas.DataSource = DTCuentasBancos
|
||||
End If
|
||||
Else
|
||||
If Orden <> String.Empty Then
|
||||
If Not String.IsNullOrEmpty(Orden) Then
|
||||
Dim DV As New DataView(TempDTCuentasBancos, "", Orden, DataViewRowState.CurrentRows)
|
||||
GvBancosCuentas.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
@@ -2950,13 +2963,13 @@ Partial Class RH_Personal
|
||||
GvBancosCuentas.DataBind()
|
||||
UpCuentasBancos.Update()
|
||||
End Sub
|
||||
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String)
|
||||
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, CveMoneda As Integer, Moneda As String, BBVAAlias As String, CveSATBanco As Integer)
|
||||
|
||||
Dim Row As DataRow
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias) Then
|
||||
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco) Then
|
||||
DTCuentasBancos.Clear()
|
||||
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))
|
||||
|
||||
@@ -2991,14 +3004,8 @@ Partial Class RH_Personal
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiaCuentasBancarias()
|
||||
TxtNombreBanco.Text = ""
|
||||
TxtNumeroSucursal.Text = ""
|
||||
TxtCLABECB.Text = ""
|
||||
TxtSWIFT.Text = ""
|
||||
TxtPlaza.Text = ""
|
||||
TxtNumeroCuenta.Text = ""
|
||||
TxtConvenioCIE.Text = ""
|
||||
TxtReferenciaCB.Text = ""
|
||||
End Sub
|
||||
Private Sub CargaCuentasBancarias()
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
@@ -6263,6 +6263,13 @@
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function httpGet() {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.open("GET", "http://localhost:85/ashx/SIGWeb.ashx?metodo=GetTokenAngular", false); // false for synchronous request
|
||||
xmlHttp.send(null);
|
||||
return xmlHttp.responseText;
|
||||
}
|
||||
|
||||
function CargaGraficaCompratamientoSaldoMensual(data, graph) {
|
||||
var chart = AmCharts.makeChart("chartdiv4", {
|
||||
"type": "serial",
|
||||
|
||||
@@ -7,7 +7,14 @@ Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
Imports System.Globalization
|
||||
|
||||
Imports System.Net.Http
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Threading.Tasks
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports System.Net
|
||||
Imports System.Collections.Generic
|
||||
Imports Newtonsoft.Json.Serialization
|
||||
|
||||
Partial Class Clientes
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1797,22 +1804,27 @@ Partial Class Clientes
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
'Carga Grid
|
||||
DTHistorialVentas = ObjClientes.DtResultados
|
||||
GVHistorial.DataSource = ObjClientes.DtResultados
|
||||
Else
|
||||
GVHistorial.DataSource = Nothing
|
||||
End If
|
||||
Else
|
||||
GVHistorial.DataSource = Nothing
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
GVHistorial.DataBind()
|
||||
DTHistorialVentas = ObjClientes.DtResultados
|
||||
GVHistorial.DataSource = ObjClientes.DtResultados
|
||||
Else
|
||||
GVHistorial.DataSource = Nothing
|
||||
End If
|
||||
Else
|
||||
GVHistorial.DataSource = Nothing
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
GVHistorial.DataBind()
|
||||
|
||||
'DTHistorialVentas = ConsultarHistorial()
|
||||
'GVHistorial.DataSource = DTHistorialVentas
|
||||
'GVHistorial.DataBind()
|
||||
|
||||
End Sub
|
||||
Private Function CargaCxC(Optional CveClienteSucursal As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -10348,5 +10360,125 @@ Partial Class Clientes
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
End Sub
|
||||
|
||||
Public Function ConsultarHistorial2(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1) As DataTable
|
||||
Dim retorno As DataTable = Nothing
|
||||
|
||||
Using cliente As New HttpClient()
|
||||
cliente.Timeout = New TimeSpan(0, 0, 15)
|
||||
cliente.DefaultRequestHeaders.Add("Accept", "application/json")
|
||||
|
||||
Try
|
||||
|
||||
Dim Parametros As JObject = New JObject(
|
||||
New JProperty("CveCliente", CveCliente),
|
||||
New JProperty("SelectTop", SelectTop),
|
||||
New JProperty("CveClienteSucursal", CveClienteSucursal),
|
||||
New JProperty("TipoDocto", "-1")
|
||||
)
|
||||
|
||||
Dim Url = New Uri(String.Format("{0}api/cliente/GetHistorialVentas?CveCliente={1}&SelectTop={2}&CveClienteSucursal={3}&TipoDocto={4}", "https://localhost:5001/", CveCliente, SelectTop, CveClienteSucursal, "-1"))
|
||||
|
||||
Dim response = cliente.GetAsync(Url).Result
|
||||
|
||||
If response.StatusCode = 200 Then
|
||||
Dim json = response.Content.ReadAsStringAsync().Result
|
||||
retorno = Newtonsoft.Json.JsonConvert.DeserializeObject(Of DataTable)(json)
|
||||
End If
|
||||
|
||||
Url = Nothing
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el historial de ventas", ex)
|
||||
End Try
|
||||
End Using
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function ConsultarHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1) As DataTable
|
||||
Dim retorno As DataTable = Nothing
|
||||
|
||||
Using cliente As New HttpClient()
|
||||
cliente.Timeout = New TimeSpan(0, 0, 15)
|
||||
cliente.DefaultRequestHeaders.Add("Authorization", String.Format("Bearer {0}", GetTokenAngular()))
|
||||
Try
|
||||
|
||||
Dim Parametros As JObject = New JObject(
|
||||
New JProperty("CveCliente", CveCliente),
|
||||
New JProperty("SelectTop", SelectTop),
|
||||
New JProperty("CveClienteSucursal", CveClienteSucursal),
|
||||
New JProperty("TipoDocto", "-1")
|
||||
)
|
||||
System.Net.ServicePointManager.SecurityProtocol = DirectCast(3072, SecurityProtocolType)
|
||||
|
||||
Dim Url = New Uri(String.Format("{0}api/cliente/GetHistorialVentas", "http://localhost:5000/"))
|
||||
|
||||
Dim response = cliente.PostAsync(Url, New StringContent(Parametros.ToString(), Encoding.UTF8, "application/json")).Result
|
||||
|
||||
If response.StatusCode = 200 Then
|
||||
Dim json = response.Content.ReadAsStringAsync().Result
|
||||
|
||||
Dim result = JsonConvert.DeserializeObject(Of MResult)(json)
|
||||
|
||||
If result.isSuccess Then
|
||||
|
||||
'Dim contractResolver = New DefaultContractResolver With
|
||||
'{
|
||||
' .NamingStrategy = New KebabCaseNamingStrategy()
|
||||
'}
|
||||
'Dim options = New JsonSerializerSettings() With
|
||||
'{
|
||||
' .ContractResolver = contractResolver,
|
||||
' .Formatting = Formatting.Indented
|
||||
'}
|
||||
|
||||
retorno = JsonConvert.DeserializeObject(Of DataTable)(result.result.ToString())
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
response.Dispose()
|
||||
|
||||
Url = Nothing
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el historial de ventas", ex)
|
||||
End Try
|
||||
End Using
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Property Token As String = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDdmVQbGF0YWZvcm1hIjoiMSIsIkN2ZVVzdWFyaW8iOiIxNTM4IiwiQ3ZlRW1wcmVzYSI6IjIiLCJDdmVSb2wiOiIxIiwiRmVjaGEiOiJzw6FiYWRvLCAyMCBkZSBtYXJ6byBkZSAyMDIxIiwibmJmIjoxNjE2MjYzMzg2LCJleHAiOjE2MTYyNzQxODYsImlhdCI6MTYxNjI2MzM4Nn0.N_4yHZ0J41GgcXbAFfvyLvXiV-U8nRm85LoZhG1riNc"
|
||||
|
||||
Public Class MResult
|
||||
Public Property isSuccess As Boolean
|
||||
Public Property message As String
|
||||
Public Property result As JArray
|
||||
End Class
|
||||
|
||||
Public Function GetTokenAngular() As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
Using cliente As New HttpClient()
|
||||
|
||||
cliente.Timeout = New TimeSpan(0, 0, 15)
|
||||
cliente.DefaultRequestHeaders.Add("Accept", "text/json")
|
||||
|
||||
Try
|
||||
Dim Url = New Uri(String.Format("{0}ashx/SIGWeb.ashx?metodo=GetTokenAngular", "http://localhost:85/"))
|
||||
|
||||
Dim response = cliente.GetAsync(Url).Result
|
||||
|
||||
If response.StatusCode = 200 Then
|
||||
retorno = response.Content.ReadAsStringAsync().Result
|
||||
End If
|
||||
|
||||
Url = Nothing
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el token", ex)
|
||||
End Try
|
||||
End Using
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1950,14 +1950,13 @@
|
||||
<td colspan="1">
|
||||
<asp:Label runat="server" Text="Código de Acceso:" Font-Bold="true" Width="120px" />
|
||||
</td>
|
||||
<td colspan="1">
|
||||
<td colspan="1" style="text-align:center">
|
||||
<asp:TextBox ID="TxtCodigoAcceso" runat="server" type="password"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCodigoAcceso" runat="server" ControlToValidate="TxtCodigoAcceso" Display="None" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Código de Acceso''</b> es necesario.</span></span>" ValidationGroup="GrpValidarCodigo"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="2" > <span class='has-error'><span id='username-error' class='help-block'><asp:Literal ID="LtlMensajeBloqueo" runat="server" Text=""></asp:Literal></span></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:Button ID="BtnCambiar" runat="server" CssClass="btn btn-success btn-sm" Text="Desbloquear" ValidationGroup="GrpValidarCodigo" OnClick="BtnCambiar_Click" />
|
||||
|
||||
@@ -1017,15 +1017,16 @@ Partial Class PV
|
||||
DivBloqueo.Visible = False
|
||||
Dim strScript As New StringBuilder
|
||||
strScript.Append("window.onload = function MuestraBloqueo() { document.getElementById(""C_BtnShowBloqueo"").click(); setTimeout(function(){ $('#C_TxtCodigoAcceso').focus(); ")
|
||||
'If UsuarioActual.ErrorDesbloqueo Then
|
||||
If UsuarioActual.ErrorDesbloqueo Then
|
||||
LtlMensajeBloqueo.Text = UsuarioActual.MsgErrorDesbloqueo
|
||||
'strScript.AppendFormat("alert('{0}');", UsuarioActual.MsgErrorDesbloqueo)
|
||||
'End If
|
||||
End If
|
||||
strScript.Append("}, 500); }")
|
||||
RegistraScript(strScript.ToString())
|
||||
|
||||
UsuarioActual.SesionBloqueada = True
|
||||
'UsuarioActual.ErrorDesbloqueo = False
|
||||
'UsuarioActual.MsgErrorDesbloqueo = ""
|
||||
UsuarioActual.ErrorDesbloqueo = False
|
||||
UsuarioActual.MsgErrorDesbloqueo = ""
|
||||
|
||||
BtnEmitirImprimir.Visible = False
|
||||
Exit Sub
|
||||
@@ -7449,13 +7450,13 @@ Partial Class PV
|
||||
End Sub
|
||||
Protected Sub BtnCambiar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'UsuarioActual.ErrorDesbloqueo = False
|
||||
'UsuarioActual.MsgErrorDesbloqueo = ""
|
||||
UsuarioActual.ErrorDesbloqueo = False
|
||||
UsuarioActual.MsgErrorDesbloqueo = ""
|
||||
|
||||
If String.IsNullOrEmpty(TxtCodigoAcceso.Text.Trim) Then
|
||||
UsuarioActual.SesionBloqueada = True
|
||||
'UsuarioActual.ErrorDesbloqueo = True
|
||||
'UsuarioActual.MsgErrorDesbloqueo = "Es necesario un código de acceso"
|
||||
UsuarioActual.ErrorDesbloqueo = True
|
||||
UsuarioActual.MsgErrorDesbloqueo = "Es necesario un código de acceso"
|
||||
|
||||
Response.Redirect($"~/Ventas/PV.aspx")
|
||||
Exit Sub
|
||||
@@ -7527,8 +7528,8 @@ Partial Class PV
|
||||
Response.Redirect($"~/Ventas/PV.aspx")
|
||||
Else
|
||||
UsuarioActual.SesionBloqueada = True
|
||||
'UsuarioActual.ErrorDesbloqueo = True
|
||||
'UsuarioActual.MsgErrorDesbloqueo = "El código de acceso no es correcto"
|
||||
UsuarioActual.ErrorDesbloqueo = True
|
||||
UsuarioActual.MsgErrorDesbloqueo = "El código de acceso no es correcto"
|
||||
|
||||
Response.Redirect($"~/Ventas/PV.aspx")
|
||||
End If
|
||||
|
||||
@@ -3946,7 +3946,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Dim ObjUsados As New ClsVentas
|
||||
|
||||
If ObjUsados.GetVentasUsados(CveVenta, DdlSubProyectoDatos.SelectedValue.ToEntero(), DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
If ObjUsados.GetVentasUsados(CveVenta, -1, DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
DtUsados = ObjUsados.DtResultados
|
||||
End If
|
||||
ObjUsados.Dispose()
|
||||
@@ -4308,7 +4308,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
If CveEmpresaCRM > 0 And Not CveCliente > 0 Then
|
||||
If CveEmpresaCRM > 0 Then
|
||||
CargaEmpresaCRM(CveEmpresaCRM)
|
||||
Else
|
||||
CveEmpresaCRM = IIf(CveEmpresaCRM > 0, CveEmpresaCRM, 0).ToString().ToEntero()
|
||||
@@ -11299,6 +11299,9 @@ Partial Class Ventas
|
||||
Dim CveCuentaIVAxTrasladar As Integer = 0
|
||||
Dim CveCuentaIVATrasladado As Integer = 0
|
||||
Dim SeContabiliza As Boolean = True
|
||||
|
||||
Dim SimplificarPrePoliza As Boolean = False
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(343) = "1" AndAlso ObjFactura.TipoDocto = "Ant") Or (ChkAntEspecial.Checked AndAlso ObjFactura.TipoDocto = "Ant") Then
|
||||
SeContabiliza = False
|
||||
End If
|
||||
@@ -12614,7 +12617,7 @@ Partial Class Ventas
|
||||
If CveIEPago > 0 Then
|
||||
|
||||
importeMovimiento = DrPago("Importe").ToString().ToDecimal * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
@@ -12633,20 +12636,61 @@ Partial Class Ventas
|
||||
' CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero())
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
'MONEDA EXTRANJERA
|
||||
If ObjFactura.CveMoneda > 1 Then
|
||||
'BANCOS
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMovimiento, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'BANCOS COMPLEMENTARIA
|
||||
If UsaComplementariaClientes Then
|
||||
Dim ImporteComplementaria As Decimal = ((importeMovimiento * tipoCambio) - importeMovimiento).RoundSQL
|
||||
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 204, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 204, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEPago, ImporteMX:=ImporteComplementaria, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, TipoCambioPago:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'PAGO CLIENTES
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 2, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 2, Concepto, Fecha, IdCtaContableCliente, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMovimiento, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'PAGO CLIENTES COMPLEMENTARIA
|
||||
If UsaComplementariaClientes Then
|
||||
Dim ImporteComplementaria As Decimal = ((importeMovimiento * tipoCambio) - importeMovimiento).RoundSQL
|
||||
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 207, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, 0, Referencia, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEPago, ImporteMX:=ImporteComplementaria, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, TipoCambioPago:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
SimplificarPrePoliza = True
|
||||
|
||||
Else
|
||||
'BANCOS
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'PAGO CLIENTES
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 2, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 2, Concepto, Fecha, IdCtaContableCliente, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'BANCOS
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'CLIENTES
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 2, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 2, Concepto, Fecha, IdCtaContableCliente, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaCliente, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
If ObjFactura.IVA <> 0 Then
|
||||
@@ -12795,7 +12839,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
'Simplificacion de PrePolizas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") OrElse SimplificarPrePoliza Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -27328,11 +27372,29 @@ Partial Class Ventas
|
||||
|
||||
RemisionesLista.Clear()
|
||||
|
||||
Dim MsgUsados As New StringBuilder
|
||||
Dim UsadosValidados As Boolean = True
|
||||
|
||||
If dtSeleccionadas.Rows.Count > 0 Then
|
||||
Select Case RblTipo.SelectedValue
|
||||
Case "1" 'T O T A L G E N E R A L
|
||||
For Each row As DataRow In dtSeleccionadas.Rows
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Using ObjUsados As New ClsVentas
|
||||
If ObjUsados.GetVentasUsados(row("CveVenta").ToString().ToEntero(), -1, row("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
If ObjUsados.DtResultados.Rows.Count > 0 Then
|
||||
UsadosValidados = False
|
||||
MsgUsados.AppendFormat("{0},", row("Folio").ToString())
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
If UsadosValidados Then
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
Next
|
||||
IsTotalxConcepto = False
|
||||
Dim PU As Decimal = dtSeleccionadas.SUM("SubTotal").ToDecimal
|
||||
@@ -27347,7 +27409,22 @@ Partial Class Ventas
|
||||
CalculaTotalesVenta()
|
||||
Case "2" 'T O T A L X R E M I S I O N
|
||||
For Each row As DataRow In dtSeleccionadas.Rows
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Using ObjUsados As New ClsVentas
|
||||
If ObjUsados.GetVentasUsados(row("CveVenta").ToString().ToEntero(), -1, row("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
If ObjUsados.DtResultados.Rows.Count > 0 Then
|
||||
UsadosValidados = False
|
||||
MsgUsados.AppendFormat("{0},", row("Folio").ToString())
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
If UsadosValidados Then
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
End If
|
||||
|
||||
Next
|
||||
Dim PS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa)(0)
|
||||
Dim rowSP As DataRow = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)(0)
|
||||
@@ -27368,17 +27445,51 @@ Partial Class Ventas
|
||||
For Each row As DataRow In dtSeleccionadas.Rows
|
||||
sb.Append($"{row("CveVentaDetalle").ToString()},")
|
||||
Next
|
||||
For Each row As DataRow In dtSeleccionadas.FiltraParametros("", DistinctColumns:={"CveVenta"}).Rows
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
For Each row As DataRow In dtSeleccionadas.FiltraParametros("", DistinctColumns:={"CveVenta", "Fecha", "Folio"}).Rows
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Using ObjUsados As New ClsVentas
|
||||
If ObjUsados.GetVentasUsados(row("CveVenta").ToString().ToEntero(), -1, row("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
If ObjUsados.DtResultados.Rows.Count > 0 Then
|
||||
UsadosValidados = False
|
||||
MsgUsados.AppendFormat("{0},", row("Folio").ToString())
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
If UsadosValidados Then
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
For Each row As DataRow In dtSeleccionadas.Rows
|
||||
sb.Append($"{row("CveVenta").ToString()},")
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Using ObjUsados As New ClsVentas
|
||||
If ObjUsados.GetVentasUsados(row("CveVenta").ToString().ToEntero(), -1, row("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
|
||||
If ObjUsados.DtResultados.Rows.Count > 0 Then
|
||||
UsadosValidados = False
|
||||
MsgUsados.AppendFormat("{0},", row("Folio").ToString())
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
If UsadosValidados Then
|
||||
RemisionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
sb.Remove(sb.Length - 1, 1)
|
||||
CargaConceptosRemisionPorFacturar(sb.ToString(), If(ChkRemProductos.Checked, 2, 1))
|
||||
|
||||
If UsadosValidados Then
|
||||
CargaConceptosRemisionPorFacturar(sb.ToString(), If(ChkRemProductos.Checked, 2, 1))
|
||||
End If
|
||||
|
||||
sb.Clear()
|
||||
End Select
|
||||
|
||||
@@ -27430,6 +27541,15 @@ Partial Class Ventas
|
||||
ObsPedido.Clear()
|
||||
ObsInv.Clear()
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Not UsadosValidados Then
|
||||
If MsgUsados.Length > 0 Then
|
||||
MsgUsados.Remove(MsgUsados.Length - 1, 1)
|
||||
End If
|
||||
Alert($"Las siguientes remisiones no se pueden facturar porque no se ha recibido el usado correspondiente:<br/><b>{MsgUsados.ToString()}<b/>", TipoMensaje.MsgAdvertencia)
|
||||
BtnEmitirImprimir.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
TxtFechaPago.Text = If(EsDiasCreditoFijo, Now.AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text)
|
||||
@@ -28570,7 +28690,10 @@ Partial Class Ventas
|
||||
Else
|
||||
Row("PorcentajeIVA") = DrPS("IVA")
|
||||
End If
|
||||
Dim TotalCalculableImpuestos As Decimal = (Row("Cantidad").ToString().ToDecimal * Row("PU").ToString().ToDecimal) - Row("Descuento").ToString().ToDecimal
|
||||
|
||||
Dim PU = Row("PU").ToString().ToDecimal().RoundSQL(6) ' el precio unitario puede llevar hasta 6 decimales permitidos
|
||||
|
||||
Dim TotalCalculableImpuestos As Decimal = (Row("Cantidad").ToString().ToDecimal * PU) - Row("Descuento").ToString().ToDecimal
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString().ToDecimal)
|
||||
|
||||
Row("IVA") = Row("PorcentajeIVA").ToString().ToDouble
|
||||
|
||||
@@ -194,6 +194,14 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user