-- cambio de clase de validación de usuario
This commit is contained in:
@@ -340,8 +340,8 @@ public class TareasJam : IHttpHandler
|
||||
wsClientes.Cell(count, 5).Value = DRow["address.countryId"].ToString();
|
||||
wsClientes.Cell(count, 6).Value = DRow["address.stateId"].ToString();
|
||||
wsClientes.Cell(count, 7).Value = DRow["address.city"].ToString();
|
||||
|
||||
wsClientes.Cell(count, 8).Value = DRow["address.street1"].ToString();
|
||||
|
||||
wsClientes.Cell(count, 8).Value = DRow["address.street1"].ToString();
|
||||
wsClientes.Cell(count, 9).Value = DRow["address.street2"].ToString();
|
||||
wsClientes.Cell(count, 10).Value = "'" + DRow["address.postalCode"].ToString();
|
||||
wsClientes.Cell(count, 11).Value = DRow["phone.intCode"].ToString();
|
||||
@@ -642,27 +642,19 @@ public class TareasJam : IHttpHandler
|
||||
private Usuario ValidaUsuarioSistema(int CveUsuario, int CveEmpresa)
|
||||
{
|
||||
Usuario UsuarioActual = null/* TODO Change to default(_) if this is not a reference type */;
|
||||
ClsSisUsuarios ObjUsuarios = new ClsSisUsuarios();
|
||||
|
||||
string NombreCadena = ClsPaginas.get_GlobalNombreCadenaConexion(CveEmpresa);
|
||||
ClsSisUsuarioAutenticacion ObjUsuarios = new ClsSisUsuarioAutenticacion(NombreCadena:NombreCadena);
|
||||
UsuarioActual = ObjUsuarios.GetUsuarioDetalle(CveUsuario);
|
||||
|
||||
if (ObjUsuarios.GetUsuarios(CveUsuario))
|
||||
{
|
||||
if (ObjUsuarios.DtResultados.Rows.Count > 0)
|
||||
if (UsuarioActual != null)
|
||||
{
|
||||
if( HttpContext.Current.Session == null)
|
||||
{
|
||||
string Usuario = ObjUsuarios.DtResultados.Rows[0]["Usuario"].ToString();
|
||||
string Contrasenia = ObjUsuarios.DtResultados.Rows[0]["Contraseña"].ToString();
|
||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, CveEmpresa: CveEmpresa);
|
||||
UsuarioActual.CveEmpresa = CveEmpresa;
|
||||
|
||||
if( HttpContext.Current.Session == null)
|
||||
{
|
||||
// CrearHttpContextArtificial();
|
||||
CrearHttpContextConSession();
|
||||
|
||||
|
||||
}
|
||||
|
||||
HttpContext.Current.Session["UsuarioSIG"] = UsuarioActual;
|
||||
// CrearHttpContextArtificial();
|
||||
CrearHttpContextConSession();
|
||||
}
|
||||
HttpContext.Current.Session["UsuarioSIG"] = UsuarioActual;
|
||||
}
|
||||
|
||||
ObjUsuarios.Dispose();
|
||||
|
||||
33
TareasProgramadas/TareasJam.ashx
Normal file
33
TareasProgramadas/TareasJam.ashx
Normal file
@@ -0,0 +1,33 @@
|
||||
<%@ WebHandler Language="C#" Class="TareasJam" %>
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using Extensiones;
|
||||
|
||||
public class TareasJam : IHttpHandler
|
||||
{
|
||||
|
||||
public void ProcessRequest(HttpContext context)
|
||||
{
|
||||
context.Response.ContentType = "text/plain";
|
||||
//context.Response.Write("Hello World");
|
||||
string Metodo = context.Request["Metodo"] ==null?"": context.Request["Metodo"];
|
||||
string CveEmpresa =context.Request["CveEmpresa"] ==null?"": context.Request["CveEmpresa"];
|
||||
string cveTareaProgramada =context.Request["cveTareaProgramada"] ==null?"": context.Request["cveTareaProgramada"];
|
||||
string CveTareaProgramadaHistorial =context.Request["CveTareaProgramadaHistorial"] ==null?"": context.Request["CveTareaProgramadaHistorial"];
|
||||
switch (Metodo)
|
||||
{
|
||||
case "Alamo":
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ModExtensiones.GuardaLogAD(string.Format("{3} CveEmpresa={0} cveTareaProgramada={1} CveTareaProgramadaHistorial={2}", CveEmpresa, cveTareaProgramada, CveTareaProgramadaHistorial, Metodo), "Tareas Programadas");
|
||||
}
|
||||
|
||||
public bool IsReusable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8361,8 +8361,8 @@ Partial Class PV
|
||||
tUsuario = DrUsuario("Usuario").ToString
|
||||
tContraseña = DrUsuario("Contraseña").ToString
|
||||
tCveEmpresa = DrUsuario("CveEmpresa").ToString.ToEntero
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexion(tCveEmpresa)
|
||||
Dim ObjUsuario As New ClsSisUsuarioAutenticacion
|
||||
Dim Usuario As Usuario
|
||||
|
||||
Usuario = ObjUsuario.ValidaUsuario(tUsuario, tContraseña, CveEmpresa:=tCveEmpresa)
|
||||
|
||||
Reference in New Issue
Block a user