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
|
||||
Dim objlist = _dicSessionobj.Values.ToList()
|
||||
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 tsessionID As String = user.SessionID
|
||||
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()))
|
||||
Case "ValidaCURP"
|
||||
context.Response.Write(ValidaCURP(context.Request("Curp").ToString()))
|
||||
Case "sendMail"
|
||||
context.Response.Write(sendMail(context))
|
||||
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
ex.GuardaLog(ex.Message)
|
||||
End Try
|
||||
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)
|
||||
Dim usuario As String = context.Request("usuario").ToString()
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
</asp:GridView>
|
||||
<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>
|
||||
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -236,6 +236,7 @@ Partial Class LogIn
|
||||
End If
|
||||
|
||||
Dim cookie = FormsAuthentication.GetAuthCookie(Encripta(Usuario.CveUsuario), False)
|
||||
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.SetAspSig, ASPSIG:=Request.Cookies.Get(".ASPXSIG").Value)
|
||||
Response.Cookies.Add(cookie)
|
||||
'RegistraScript(String.Format("iniciaSesion('{0}')", ReturnUrl.Replace("'", "\'")))
|
||||
Response.Redirect(ReturnUrl, True)
|
||||
|
||||
@@ -24,14 +24,6 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
#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
|
||||
Get
|
||||
Return DirectCast(ViewState("DTUsuarios"), DataTable)
|
||||
@@ -270,7 +262,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
column += 1
|
||||
libro.Cell(Fila, column).Value = "SD IMSS"
|
||||
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.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
||||
@@ -283,9 +275,9 @@ Partial Class RH_ActualizacionMasiva
|
||||
column = 1
|
||||
Fila = Fila + 1
|
||||
|
||||
libro.Cell(Fila, column).Value = dro("Codigo")
|
||||
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Codigo"))
|
||||
column += 1
|
||||
libro.Cell(Fila, column).Value = dro("Nombre")
|
||||
libro.Cell(Fila, column).Value = String.Format("'{0}", dro("Nombre"))
|
||||
column += 1
|
||||
libro.Column(column).Width = 35
|
||||
libro.Cell(Fila, column).Value = dro("SalarioDiario")
|
||||
@@ -322,7 +314,15 @@ Partial Class RH_ActualizacionMasiva
|
||||
Dim continuar As Boolean = Filesgral.Count > 0
|
||||
Dim stringError As String = ""
|
||||
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
|
||||
Dim FileExtension As String = fileItem.Extencion.ToUpper()
|
||||
|
||||
@@ -348,7 +348,7 @@ Partial Class RH_ActualizacionMasiva
|
||||
If continuar Then
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
Dim contador As Integer = 0
|
||||
Using ObjPersonal As ClsRH = New ClsRH()
|
||||
For Each Row As DataRow In DTEXcel.Rows
|
||||
If Row("Codigo").ToString() <> "" Then
|
||||
@@ -357,10 +357,9 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
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
|
||||
|
||||
contador = contador + 1
|
||||
Else
|
||||
OcurrioError = True
|
||||
ObjPersonal.RollBack()
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
@@ -369,12 +368,16 @@ Partial Class RH_ActualizacionMasiva
|
||||
|
||||
Next
|
||||
If Not OcurrioError Then
|
||||
'ObjPersonal.Commit()
|
||||
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
ObjPersonal.Commit()
|
||||
Alert(String.Format("La información se guardó correctamente.<br/> se registraron {0} empleados", contador), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjPersonal.RollBack()
|
||||
Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
Alert(stringError, TipoMensaje.MsgError)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
} else {
|
||||
let contenedor = document.getElementById('chart_div');
|
||||
contenedor.innerHTML = '';
|
||||
console.log('vacio')
|
||||
}
|
||||
},
|
||||
failure: function (r) {
|
||||
|
||||
@@ -52,9 +52,9 @@ Partial Class RH_Organigrama
|
||||
If Not IsPostBack Then
|
||||
txtNivel.Text = ""
|
||||
DdlSupervisorOrganigrama.SelectedIndex = 0
|
||||
Dim viewFlag As Integer = CveCabecera
|
||||
CargaSuperioresOrganigrama()
|
||||
End If
|
||||
Dim viewFlag As Integer = CveCabecera
|
||||
CargaSuperioresOrganigrama()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -4772,6 +4772,55 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
End Sub
|
||||
Protected Sub BtnCerrarSession_Click(sender As Object, e As EventArgs)
|
||||
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CerrarSession, CveUsuario:=CveUsuario)
|
||||
End Sub
|
||||
'ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CerrarSession, CveUsuario:=CveUsuario)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user