Beispiel #1
0
    public static string WEliminarRutas(string Id)
    {
        JavaScriptSerializer scriptSerializer = new JavaScriptSerializer();
        List <string>        Lista            = new List <string>();
        Usuario usr = new Usuario();

        if (!UtilWeb.CheckSession(Lista, ref usr, HttpContext.Current))
        {
            return(scriptSerializer.Serialize(Lista.ToArray()));
        }

        try
        {
            if (Id.Trim().Length != 0)
            {
                Ruta rutas = new Ruta(usr);
                rutas.Delete(Id);

                string html = "";
                WLeerRutas_Internal(usr, ref html);

                Lista.Add("Exito");
                Lista.Add(html);
            }
        }
        catch (Exception ex)
        {
            Lista.Add("Exception");
            Lista.Add(ex.Message);
            Lista.Add("Hubo un error no controlado en la aplicación, por favor inténtelo nuevamente, si el problema persiste contactarse con el administrador sistemas para revisar el log de eventos del servidor.");
        }
        return(scriptSerializer.Serialize(Lista.ToArray()));
    }