Exemplo n.º 1
0
        public static eAjax fnEliminaEmpresa(int iIdEmpresa)
        {
            eAjax        oAjax   = new eAjax();
            EmpresaDAOcs dao     = new EmpresaDAOcs();
            int          sresult = dao.fnEliminaEmpresa(iIdEmpresa);

            oAjax.iTipoResultado = 1;
            return(oAjax);
        }
Exemplo n.º 2
0
        public static eAjax fnListaUbigeo()
        {
            eAjax        oAjax   = new eAjax();
            EmpresaDAOcs dao     = new EmpresaDAOcs();
            string       sresult = dao.fnListaUbigeo();

            oAjax.iTipoResultado = 1;
            oAjax.sValor1        = sresult;

            return(oAjax);
        }
Exemplo n.º 3
0
        public static eAjax fnValida(string sUsuario, string sClave)
        {
            eAjax        oAjax = new eAjax();
            EmpresaDAOcs dao   = new EmpresaDAOcs();

            string sresult = dao.fnValidaInicio(sUsuario, sClave);

            if (sresult != "")
            {
                var vsplit = sresult.Split('|');
                System.Web.HttpContext context = System.Web.HttpContext.Current;
                context.Response.ContentType = "application/json";

                List <eSeguridad> leSeguridad = new List <eSeguridad>();
                eSeguridad        oe          = new eSeguridad();
                oe.strUsuario       = vsplit[0];
                oe.strPassword      = vsplit[1];
                oe.sPersonal        = vsplit[2];
                oe.iIdrol           = Convert.ToInt32(vsplit[3]);
                oe.iIdCargo         = Convert.ToInt32(vsplit[4]);
                oe.iIdEmpresa       = Convert.ToInt32(vsplit[5]);
                oe.sNombreEmpresa   = Convert.ToString(vsplit[6]);
                oe.iIdTrabajador    = Convert.ToInt32(vsplit[7]);
                oe.sRutaCertificado = Convert.ToString(vsplit[8]);
                leSeguridad.Add(oe);
                HttpContext.Current.Session["leSeguridad"] = leSeguridad;
                oAjax.sValor1        = vsplit[3] + '|' + vsplit[4];
                oAjax.iTipoResultado = 1;
            }
            else
            {
                oAjax.iTipoResultado = -1;
                oAjax.sMensajeError  = "Usuario Contrasena Incorrecto";
            }


            return(oAjax);
        }