Ir para conteúdo
  • ×   Você colou conteúdo com formatação.   Remover formatação

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

  • Conteúdo Similar

    • Por Lonn
      Hi
      I need help creating some .exe or .bat that would completely delete some specific files from my computer.
      An app that scans and deletes all files and traces by name + format
      example:
      delete.cfg
      As the specific directory would vary from computer to computer, I would like help to create one that excludes only using the file name and format
      Hope to get answers, thanks!
    • Por Kefatif
      Prezados, boa tarde!
       
      Em uma tela faço o envio de arquivos PDF para uma pasta reservada para isso.
       
      Estou tendo dificuldade para criar um botão de download na tela de consultas, quando abro a página de consulta ele está me mostrando a seguinte mensagem: "Notice: Undefined variable: row in C:\xampp\htdocs\plataforma\indicadores\consultar.php on line 126"
       
      Podem me ajudar?
       
      <?php include_once 'autenticacao.php'; include_once'../conexao.php'; ?> <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Envio de Ata</title> <link href="../css/estilo.css" rel="stylesheet"> <!-- Bootstrap Core CSS --> <link href="../css/bootstrap.css" rel="stylesheet"> <!-- Custom CSS --> <link href="../css/modern-business.css" rel="stylesheet"> <!-- Custom Fonts --> <link href="../font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <script src="../js/jquery.min.js"></script> </head> <body> <?php include_once 'nav-menu1.php'; ?> <!-- Page Content --> <div class="container" style="width: 90%"> <?php include_once 'cabecalho.php'; ?> <div class="row"> <?php include_once 'barra-lateral.php'; ?> <!-- Content Column --> <div class="col-md-9" style="width: 80%"> <h4><b>CONSULTAR UNIDADE</b></h4> <form class="form-inline" action="consultar.php" autocomplete="off" method="get"> <div id="form-callcenter"> <label style="width: 30%"> <input type="text" name="nome" class="form-control" placeholder="Digite o nome da unidade" style="width: 100%"> </label> <input type="submit" readonly value="Pesquisar" class="btn btn-primary"> </div> </form> <?php if (isset($_GET["nome"]) ) { $nome = $_GET["nome"]; include_once '../funcoes.php'; $sql = "select A.dt_envio, A.unidade, A.responsavel, A.observacao, A.anexo from controle_ata A where A.unidade like '%".$nome."%' order by A.dt_envio desc"; $result = mysqli_query($con, $sql); if (mysqli_num_rows($result) > 0) { ?> <table class="table table-hover table-bordered" id="tabela-dispensacao2"> <tr> <th>Unidade</th> <th>Data do envio</th> <th>Responsável</th> <th>Observação</th> <th>Ata</th> <th>Download</th> </tr> <?php if($row["anexo"] == ''){ $cor = "red"; }else{ $cor = "blue"; } while ($row = mysqli_fetch_array($result)){ foreach($row as $key => $values){ $row[$key]= utf8_encode($values); } ?> <tr> <td><?php echo $row["unidade"]?></td> <td><?php echo dataTela($row["dt_envio"]); ?></td> <td><?php echo $row["responsavel"]; ?></td> <td><?php echo $row["observacao"] ?></td> <td><?php echo $row["anexo"] ?></td> <td><a class="<?php if($row["ANEXO"] == ''){echo "link-nao-ativo";}?>" href='anexos/<?php echo $row["ANEXO"] ?>' target="_blank"> <i style="color:<?php echo $cor ?>" class="glyphicon glyphicon-download-alt"></i> </a> </td> </tr> <?php }//ENCERRANDO O WHILE ?> </table> <?php }else{ echo "Nenhuma unidade encontrada!<br>"; } } ?> <?php mysqli_close($con); ?> </div> </div> <!-- /.row --> </div> <!-- /.container --> <!-- jQuery --> <script src="../js/jquery.js"></script> <!-- Bootstrap Core JavaScript --> <script src="../js/bootstrap.min.js"></script> </body> </html>  
       
      Agradeço a ajuda desde já!
    • Por ghlevin
      Possuo uma Console Application em C# que faz a extração de dados do Dynamics 365 Customer Voice, da Microsoft. O código abaixo pega dados de tabelas de Projetos, Pesquisas, Perguntas e Respostas respectivamente. Os dados extraídos vão para arquivos JSON que ficam salvos no meu HD.
          using Microsoft.Xrm.Sdk;     using Microsoft.Xrm.Sdk.Query;     using System;     using System.Collections.Generic;     using System.Linq;     using System.Text;     using UmbracoMVC.App_Code.Infrastructure.CRMIntegration.Business;     using System.IO;     using Microsoft.Crm.Sdk.Messages;     using System.Globalization;     using E2BWorkflow.Classes;     using System.Web.Management;     using System.ServiceModel;     using System.Drawing;     using System.Web.UI.WebControls;     using System.Web.Script.Serialization;            namespace ConsoleApplication1     {         class Program         {             static void Main(string[] args)             {                 GetCustomerVoice();             }                  public static void GetCustomerVoice()             {                 IOrganizationService crmServiceTo;                      crmServiceTo = Connect.Crm("myemail@e-mail.com", "mypassword", "https://mydynamics.crm4.dynamics.com/XRMServices/2011/Organization.svc");                      // Get Projects                 QueryExpression qP = new QueryExpression("msfp_project");                 qP.ColumnSet = new ColumnSet(true);                 var projects = crmServiceTo.RetrieveMultiple(qP);                 foreach (var p in projects.Entities)                 {                     msfp_project project = p.ToEntity<msfp_project>();                 }                 var projectsList = projects.Entities.Select(                     s => new {                         msfp_projectId = s.Attributes["msfp_projectid"],                         msfp_name = s.Attributes["msfp_name"]                     }                 ).ToList();                      var jsonSerialiser = new JavaScriptSerializer();                 var json = jsonSerialiser.Serialize(projectsList);                 System.IO.File.WriteAllText(@"C:\MyDirectory\projects.json", json);                      // Get Surveys                 QueryExpression qS = new QueryExpression("msfp_survey");                 qS.ColumnSet = new ColumnSet(true);                 var surveys = crmServiceTo.RetrieveMultiple(qS);                 foreach (var s in surveys.Entities)                 {                     msfp_survey survey = s.ToEntity<msfp_survey>();                 }                 var surveysList = surveys.Entities.Select(                     s => new {                         msfp_surveyId = s.Attributes["msfp_surveyid"],                         msfp_name = s.Attributes.Contains("msfp_name") ? s.GetAttributeValue<string>("msfp_questiontext") : "",                         msfp_anonymousurl = s.Attributes.Contains("msfp_anonymousurl") ? s.GetAttributeValue<string>("msfp_anonymousurl") : "",                         msfp_friendlyname = s.Attributes.Contains("msfp_friendlyname") ? s.GetAttributeValue<string>("msfp_friendlyname") : "",                         msfp_surveyurl = s.Attributes.Contains("msfp_surveyurl") ? s.GetAttributeValue<string>("msfp_surveyurl") : "",                         msfp_projectId = s.Attributes.Contains("msfp_project") && s.GetAttributeValue<EntityReference>("msfp_project").Id != null ? s.GetAttributeValue<EntityReference>("msfp_project").Id : Guid.Empty                     }                 ).ToList();                      jsonSerialiser = new JavaScriptSerializer();                 json = jsonSerialiser.Serialize(surveysList);                 System.IO.File.WriteAllText(@"C:\MyDirectory\surveys.json", json);                      // Get Questions                 QueryExpression qQ = new QueryExpression("msfp_question");                 qQ.ColumnSet = new ColumnSet(true);                 var questions = crmServiceTo.RetrieveMultiple(qQ);                 foreach (var q in questions.Entities)                 {                     msfp_question question = q.ToEntity<msfp_question>();                 }                 var questionsList = questions.Entities.Select(                     s => new {                         msfp_questionId = s.Attributes["msfp_questionid"],                         msfp_questionText = s.Attributes.Contains("msfp_questiontext") ? s.GetAttributeValue<string>("msfp_questiontext") : "",                         msfp_surveyId = s.Attributes.Contains("msfp_survey") && s.GetAttributeValue<EntityReference>("msfp_survey").Id != null ? s.GetAttributeValue<EntityReference>("msfp_survey").Id : Guid.Empty                     }                 ).ToList();                      jsonSerialiser = new JavaScriptSerializer();                 json = jsonSerialiser.Serialize(questionsList);                 System.IO.File.WriteAllText(@"C:\MyDirectory\questions.json", json);                      //Get Question Responses                 QueryExpression qR = new QueryExpression("msfp_questionresponse");                 qR.ColumnSet = new ColumnSet(true);                 var responses = crmServiceTo.RetrieveMultiple(qR);                 foreach (var r in responses.Entities)                 {                     msfp_questionresponse response = r.ToEntity<msfp_questionresponse>();                 }                      var responsesList = responses.Entities.Select(                     s => new {                         msfp_questionresponseId = s.Attributes["msfp_questionresponseid"],                         msfp_questionresponse = s.Attributes["msfp_name"],                         msfp_questionId = s.GetAttributeValue<EntityReference>("msfp_questionid").Id                     }                 ).ToList();                      jsonSerialiser = new JavaScriptSerializer();                 json = jsonSerialiser.Serialize(responsesList);                 System.IO.File.WriteAllText(@"C:\MyDirectory\responses.json", json);                      Console.WriteLine("END");                 Console.ReadKey();             }         }     } Agora o que eu preciso é que esses JSONs sejam salvos dentro de um contêiner de um blob em uma Conta de Armazenamento Azure. Procurei várias soluções na Internet, mas não estou bem certo do que deveria usar em uma Console Application.
×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.