Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -201,7 +201,7 @@ Namespace ADSSession
|
|||||||
Case OpcionSession.CerrarSession
|
Case OpcionSession.CerrarSession
|
||||||
Dim objlist = _dicSessionobj.Values.ToList()
|
Dim objlist = _dicSessionobj.Values.ToList()
|
||||||
For Each user As ADSSession.ADSSessionObj In objlist
|
For Each user As ADSSession.ADSSessionObj In objlist
|
||||||
If CveUsuario = user.CveUsuario AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then
|
If CveUsuario = user.CveUsuario Then 'AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then
|
||||||
Dim taspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95"
|
Dim taspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95"
|
||||||
Dim tsessionID As String = user.SessionID
|
Dim tsessionID As String = user.SessionID
|
||||||
Dim url = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString()
|
Dim url = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString()
|
||||||
|
|||||||
@@ -47,12 +47,47 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
|||||||
context.Response.Write(GettingCURP(context.Request("Curp").ToString(), context.Request("year").ToString().ToEntero()))
|
context.Response.Write(GettingCURP(context.Request("Curp").ToString(), context.Request("year").ToString().ToEntero()))
|
||||||
Case "ValidaCURP"
|
Case "ValidaCURP"
|
||||||
context.Response.Write(ValidaCURP(context.Request("Curp").ToString()))
|
context.Response.Write(ValidaCURP(context.Request("Curp").ToString()))
|
||||||
|
Case "sendMail"
|
||||||
|
context.Response.Write(sendMail(context))
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ex.GuardaLog(ex.Message)
|
ex.GuardaLog(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Function sendMail(context As HttpContext) As String
|
||||||
|
Dim retorno As String = "true"
|
||||||
|
Dim nombre As String = ""
|
||||||
|
Dim correo As String = ""
|
||||||
|
Dim sitio As String = ""
|
||||||
|
Dim cuerpo As String = ""
|
||||||
|
Dim obj = context.Request("Nombre")
|
||||||
|
If Not IsNothing(obj) Then
|
||||||
|
nombre = obj.ToString()
|
||||||
|
End If
|
||||||
|
obj = context.Request("Correo")
|
||||||
|
If Not IsNothing(obj) Then
|
||||||
|
correo = obj.ToString()
|
||||||
|
End If
|
||||||
|
obj = context.Request("Sitio")
|
||||||
|
If Not IsNothing(obj) Then
|
||||||
|
sitio = obj.ToString()
|
||||||
|
End If
|
||||||
|
obj = context.Request("Cuerpo")
|
||||||
|
If Not IsNothing(obj) Then
|
||||||
|
cuerpo = obj.ToString()
|
||||||
|
End If
|
||||||
|
Dim Body As String = String.Format("Nombre : {0}<br/>Nombre : {0}<br/>Correo : {1}<br/>Sitio : {2}<br/><br/>{3}", nombre, correo, sitio, cuerpo)
|
||||||
|
Dim para As String = "rene.molina@adssistemas.mx,sig.buzon@gmail.com,julian@adssistemas.mx;paola@adssistemas.mx;"
|
||||||
|
para = "caudillo.90d@gmail.com"
|
||||||
|
Dim Mail As New ClsSisMail()
|
||||||
|
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, para, "NotificaciónProspecto", Body) Then
|
||||||
|
retorno = "true"
|
||||||
|
Else
|
||||||
|
retorno = "false"
|
||||||
|
End If
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub GetUser(ByVal context As HttpContext)
|
Private Sub GetUser(ByVal context As HttpContext)
|
||||||
Dim usuario As String = context.Request("usuario").ToString()
|
Dim usuario As String = context.Request("usuario").ToString()
|
||||||
|
|||||||
@@ -298,7 +298,7 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GvGastosMesH" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastosMesH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
<asp:GridView ID="GvGastosMesH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta" OnRowDataBound="GvGastosMesH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -236,6 +236,7 @@ Partial Class LogIn
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim cookie = FormsAuthentication.GetAuthCookie(Encripta(Usuario.CveUsuario), False)
|
Dim cookie = FormsAuthentication.GetAuthCookie(Encripta(Usuario.CveUsuario), False)
|
||||||
|
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.SetAspSig, ASPSIG:=Request.Cookies.Get(".ASPXSIG").Value)
|
||||||
Response.Cookies.Add(cookie)
|
Response.Cookies.Add(cookie)
|
||||||
'RegistraScript(String.Format("iniciaSesion('{0}')", ReturnUrl.Replace("'", "\'")))
|
'RegistraScript(String.Format("iniciaSesion('{0}')", ReturnUrl.Replace("'", "\'")))
|
||||||
Response.Redirect(ReturnUrl, True)
|
Response.Redirect(ReturnUrl, True)
|
||||||
|
|||||||
@@ -24,14 +24,6 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
|
|
||||||
Private Property DTEmpleados As DataTable
|
|
||||||
Get
|
|
||||||
Return DirectCast(ViewState("DTEmpleados"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("DTEmpleados") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private ReadOnly Property DTUsuarios As DataTable
|
Private ReadOnly Property DTUsuarios As DataTable
|
||||||
Get
|
Get
|
||||||
Return DirectCast(ViewState("DTUsuarios"), DataTable)
|
Return DirectCast(ViewState("DTUsuarios"), DataTable)
|
||||||
@@ -270,7 +262,7 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
column += 1
|
column += 1
|
||||||
libro.Cell(Fila, column).Value = "SD IMSS"
|
libro.Cell(Fila, column).Value = "SD IMSS"
|
||||||
column += 1
|
column += 1
|
||||||
DTEmpleados = New DataTable()
|
Dim DTEmpleados As New DataTable()
|
||||||
|
|
||||||
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White
|
||||||
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
||||||
@@ -283,9 +275,9 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
column = 1
|
column = 1
|
||||||
Fila = Fila + 1
|
Fila = Fila + 1
|
||||||
|
|
||||||
libro.Cell(Fila, column).Value = dro("Codigo")
|
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Codigo"))
|
||||||
column += 1
|
column += 1
|
||||||
libro.Cell(Fila, column).Value = dro("Nombre")
|
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Nombre"))
|
||||||
column += 1
|
column += 1
|
||||||
libro.Column(column).Width = 35
|
libro.Column(column).Width = 35
|
||||||
libro.Cell(Fila, column).Value = dro("SalarioDiario")
|
libro.Cell(Fila, column).Value = dro("SalarioDiario")
|
||||||
@@ -322,7 +314,15 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
Dim continuar As Boolean = Filesgral.Count > 0
|
Dim continuar As Boolean = Filesgral.Count > 0
|
||||||
Dim stringError As String = ""
|
Dim stringError As String = ""
|
||||||
Dim fileItem As Archivo = If(continuar, Filesgral(0), Nothing)
|
Dim fileItem As Archivo = If(continuar, Filesgral(0), Nothing)
|
||||||
|
Dim DTEmpleados As New DataTable()
|
||||||
|
Using ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.GetPersonalMasivo(-1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DTEmpleados = ObjPersonal.DtResultados
|
||||||
|
Else
|
||||||
|
continuar = False
|
||||||
|
stringError = "Ocurrio un Error al procesar el excel "
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
If continuar Then
|
If continuar Then
|
||||||
Dim FileExtension As String = fileItem.Extencion.ToUpper()
|
Dim FileExtension As String = fileItem.Extencion.ToUpper()
|
||||||
|
|
||||||
@@ -348,7 +348,7 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
If continuar Then
|
If continuar Then
|
||||||
|
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
|
Dim contador As Integer = 0
|
||||||
Using ObjPersonal As ClsRH = New ClsRH()
|
Using ObjPersonal As ClsRH = New ClsRH()
|
||||||
For Each Row As DataRow In DTEXcel.Rows
|
For Each Row As DataRow In DTEXcel.Rows
|
||||||
If Row("Codigo").ToString() <> "" Then
|
If Row("Codigo").ToString() <> "" Then
|
||||||
@@ -357,10 +357,9 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
|
|
||||||
Dim CvePersonal As Integer = drow("CvePersonal").ToString().ToEntero()
|
Dim CvePersonal As Integer = drow("CvePersonal").ToString().ToEntero()
|
||||||
If ObjPersonal.UpdateSalarios(CvePersonal, DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(), Row("SD IMSS").ToString().ToDecimal(), Row("SDD").ToString().ToDecimal()) Then
|
If ObjPersonal.UpdateSalarios(CvePersonal, DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(), Row("SD IMSS").ToString().ToDecimal(), Row("SDD").ToString().ToDecimal()) Then
|
||||||
|
contador = contador + 1
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
ObjPersonal.RollBack()
|
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -369,12 +368,16 @@ Partial Class RH_ActualizacionMasiva
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
'ObjPersonal.Commit()
|
ObjPersonal.Commit()
|
||||||
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert(String.Format("La información se guardó correctamente.<br/> se registraron {0} empleados", contador), TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
|
ObjPersonal.RollBack()
|
||||||
Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
Else
|
||||||
|
Alert(stringError, TipoMensaje.MsgError)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
} else {
|
} else {
|
||||||
let contenedor = document.getElementById('chart_div');
|
let contenedor = document.getElementById('chart_div');
|
||||||
contenedor.innerHTML = '';
|
contenedor.innerHTML = '';
|
||||||
|
console.log('vacio')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
failure: function (r) {
|
failure: function (r) {
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ Partial Class RH_Organigrama
|
|||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
txtNivel.Text = ""
|
txtNivel.Text = ""
|
||||||
DdlSupervisorOrganigrama.SelectedIndex = 0
|
DdlSupervisorOrganigrama.SelectedIndex = 0
|
||||||
|
Dim viewFlag As Integer = CveCabecera
|
||||||
|
CargaSuperioresOrganigrama()
|
||||||
End If
|
End If
|
||||||
Dim viewFlag As Integer = CveCabecera
|
|
||||||
CargaSuperioresOrganigrama()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4772,6 +4772,55 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnCerrarSession_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCerrarSession_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CerrarSession, CveUsuario:=CveUsuario)
|
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CerrarSession, CveUsuario:=CveUsuario)
|
||||||
End Sub
|
Dim objlist As List(Of ADSSession.ADSSessionObj) = DirectCast(ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.getListasession, CveUsuario:=CveUsuario), List(Of ADSSession.ADSSessionObj))
|
||||||
|
|
||||||
|
For Each user As ADSSession.ADSSessionObj In objlist
|
||||||
|
If CveUsuario = user.CveUsuario Then 'AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then
|
||||||
|
Dim taspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95"
|
||||||
|
Dim tsessionID As String = user.SessionID
|
||||||
|
Dim url = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString()
|
||||||
|
Dim cookie As String = String.Format("ASP.NET_SessionId={0};.ASPXSIG={1}", tsessionID, taspsig)
|
||||||
|
sendURL(url, cookie)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Alert("Sessión Cerrada")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Shared Function sendURL(ByVal URL As String, ByVal Optional Cookie As String = "", ByVal Optional maxTimeMilliseconds As Integer = 120000) As String
|
||||||
|
Dim resultado As String = ""
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
Dim request As Net.HttpWebRequest = CType(Net.HttpWebRequest.Create(URL), Net.HttpWebRequest)
|
||||||
|
request.Timeout = maxTimeMilliseconds
|
||||||
|
request.Method = "POST"
|
||||||
|
request.ContentType = "text/xml; charset=utf-8"
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(Cookie) Then
|
||||||
|
request.Headers.Add("Cookie", Cookie)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Using stream As IO.Stream = request.GetRequestStream()
|
||||||
|
|
||||||
|
Using stmw As IO.StreamWriter = New IO.StreamWriter(stream)
|
||||||
|
stmw.Write("")
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Using response As Net.WebResponse = CType(request.GetResponse(), Net.WebResponse)
|
||||||
|
Using sr As IO.StreamReader = New IO.StreamReader(response.GetResponseStream())
|
||||||
|
|
||||||
|
resultado = sr.ReadToEnd()
|
||||||
|
sr.Close()
|
||||||
|
End Using
|
||||||
|
|
||||||
|
End Using
|
||||||
|
request = Nothing
|
||||||
|
Catch ex As Exception
|
||||||
|
'Extenciones.ApplicationParameter.GuardaLogEx(ex, $"SOAPAction : {SOAPAction} XML : {xml}")
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return resultado
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user