Posts by Guilherme Golfetto • 743 points
37 posts
-
0
votes2
answers37
viewsA: Entity Framework -> How to find the largest table elements
I ended up solving using SQL Brute even, follows Code for those who have the same problem: public IEnumerable<ProdutoStatus> List() { return _context.ProdutoStatus.FromSqlRaw(@" SELECT…
-
1
votes2
answers37
viewsQ: Entity Framework -> How to find the largest table elements
I have the following tables in my base: Produto Id | Nome | Preco 1 | fone | 100 2 | copo | 50 3 | pao | 10 ProdutoStatus IdProduto | Versao | Preco 1 | 1 | 101 1 | 2 | 110 1 | 3 | 90 2 | 1 | 55 2 |…
-
5
votes2
answers4605
viewsQ: GIT - Commit to another branch
I am working on a project that has two branchs (master and dev). I started the implementation of a new Feature in the system but, halfway through, I realized I was making the changes in the master,…
-
3
votes1
answer122
viewsQ: C# How to change value within Parallel.Foreach
I am performing a processing inside an array of strings (lines of a file . txt). For performance reasons, I’m using the Parallel.ForEach, but there was a need to change the values of some lines that…
-
2
votes1
answer42
viewsQ: How to save PDF from a site in Azure Functions?
I am developing an application where I will have to make a Crawler on a specific website. The application will contain an endpoint to an Azure Function where Crawler will capture. So far so good,…
-
0
votes1
answer931
viewsA: (ASP.NET MVC) Create Session variable
In case anyone comes to have the same problem I had, I will leave documented the solution: I asked the same question in Oveflow Stack in English and follows the link with the solution: Solution…
-
1
votes1
answer931
viewsQ: (ASP.NET MVC) Create Session variable
I have an ASP.NET MVC application that is published on two IIS servers (homologation and production); In this application, I use the Session variable to save the user’s login in a part of it,…
-
2
votes1
answer949
viewsQ: Project C# Closing Visual Studio
I recently made a Console Application project that saves PDF files with Report Viewer and worked normally. I needed to change the SQL Server that generates these files and changed the directory to…
-
2
votes3
answers1206
viewsA: Preview Android stopped working after update
In detriment to the little content in Portuguese of this subject and following the reply of ramaral I will post here the solution of the problem. He suggested upgrading the libraries to version 27,…
-
2
votes3
answers1206
viewsQ: Preview Android stopped working after update
I work on an android project and, after updating to Android Studio 3.0, my project started to give problem. Preview of my activities has stopped working, although the app is built and I can install…
-
0
votes1
answer1012
viewsA: Entityframework: There is no mapping of the Objectparameter object type to a native type managed provider
Solved: I changed to Sqlparameters and correctly set the parameters: public DTODados GetDadosProcedure(string codUsuario, string senhaCript) { return…
-
0
votes1
answer1012
viewsQ: Entityframework: There is no mapping of the Objectparameter object type to a native type managed provider
I am developing an MVC application with Entity Framework in Code First. As my database has procedures, I opted to use Sqlquery to execute the procedures, but I am thinking about this error: Não…
-
1
votes0
answers173
viewsQ: (ASP MVC) Glyphicons Bootstrap does not work in Firefox
I have an ASP MVC 5 application where I use the Bootstrap that comes along, however, both in debug and in publishing, the Bootstrap icons (glyphicons) are not being loaded, see image: I am using the…
-
0
votes2
answers681
viewsA: C# - Windows Service only runs once
Following the guidance of Renan, follows operational code: using System.Windows.Threading; using System.Threading; using System.Timers; public partial class Service1 : ServiceBase {…
-
1
votes2
answers681
viewsQ: C# - Windows Service only runs once
I am developing a windows service to run every 10 minutes, it inserts some values in the database, but I noticed that the routine only runs once. using System; using System.Collections.Generic;…
-
0
votes0
answers200
viewsQ: How to Recover Extras from a Pendingintent (Android)?
I’m implementing Notifications in an app. I’m using Alarmmanager with a Pendingintent of an Intent with data (in Extras, some model objects) but when I receive them in another Broadcastreceiver…
-
0
votes2
answers1171
viewsQ: DLL import in C#
I joined a recent project that uses a Nearby printer to print tax coupons. The last one who worked on the project used a DLL (if I’m not mistaken in C++) that managed the printer. In the project,…
-
0
votes1
answer741
viewsA: Ajax returning HTML together with Json
The Error was in the database configuration file where there was a lost echo that returned HTML.
-
1
votes1
answer741
viewsQ: Ajax returning HTML together with Json
Hello, I am trying to fill in input data with the result of a database search using as a filter what has been typed before. ex: User enters client code and when the focus of the input, all the…
-
0
votes1
answer59
viewsA: Pause/resume a Divs Slideshow in Javascripts
I managed to solve using a flag outside the function and changing from setTimeout() to setInterval(), follow code to help those who also have this question one day: <script> var isPaused =…
-
0
votes1
answer59
viewsQ: Pause/resume a Divs Slideshow in Javascripts
I made a slideshow of Divs HTML for a personal project of mine, I saw in W3school how to do and it works, however, there was the need to pause this slideshow with a button inside each div and then…
-
5
votes3
answers5352
viewsQ: How to convert from Text to Number via code to EXCEL in C#
I have a program that reads data from a text file and exports it to an excel report. I have a problem in the transcription of the numbers, in the txt file I have data in this format: 8,000000 this…
-
6
votes1
answer1673
viewsA: How to do a text break in Excel programmatically with a C check #
I solved the problem with the help of @rodorgas in an "alternative" way (read:technical adequacy). I made the following change: formatPaiP1.WrapText = true; formatPaiP1.EntireRow.RowHeight = 33; I…
-
0
votes2
answers700
viewsQ: C# - I/O on the network
I have a program that makes I/O files (create, edit, save), but I need to put it to do this I/O with files that are on the company network, both read and write. My question is: My program needs…
-
2
votes1
answer318
viewsQ: How to update a Treeview of C#directories
I have a Treeviewms component (the one with Multiple Selection) listing the system directories in a Form. I created an event on the Form that when F5 is pressed, this Treeview will update itself(if…
-
0
votes1
answer694
viewsA: Ending Two Threads with Progressbar in C#
It was necessary to implement some actions regarding the cancel button, follow revised and functional code: for (int i = 0; i < ListaCandidatos.Count; i++) { Arquivo arq = new Arquivo();…
-
0
votes1
answer694
viewsQ: Ending Two Threads with Progressbar in C#
I’m making a ProgressBar file conversions, each converted file is updated to ProgressBar with a percentage of total files to be converted. I read in a tutorial how to do the ProgressBar, work with…
-
3
votes1
answer361
viewsQ: How to programmatically format Excel Numbers in C#
I’m putting together a C#Orders report, I’m using the library Microsoft.Interop.Excel and I face a problem: It is necessary to include in this report the Request number and when presented in Excel,…
-
13
votes1
answer1673
viewsQ: How to do a text break in Excel programmatically with a C check #
I am using the Microsoft.Office.Interop.Excel to create an Excel report from a txt file. Everything works perfect, but sometimes some columns become extremely large and when we need to print, it is…
-
2
votes2
answers998
viewsQ: Search week number of the year through a date in C#
I’m writing a function that gets a string with a date (format dd/mm/aaaa) and it must return a date (in the same format) 4 weeks later. Example: Entrada: 07/04/2016 saída: 05/05/2016 I read about it…
-
1
votes1
answer412
viewsA: Dragdrop for files . txt Windows Forms
Jonathan, I imagine you want to get the address from the file. Well, for this you need to do a check if what is being dragged is in fact a file with the Dragover Event private void…
-
4
votes1
answer386
viewsQ: Recover Volume Name of Netmapped Disk Drive
I’m using DriveInfo.GetDrivers() to take the names of the disk drives present on the machine and list them on a TreeView. I made the code below that works, however it does not appear the names of…
-
1
votes2
answers622
viewsA: How to Popular a Treeview with C#System Directories and Files
I managed to solve the problem, I made a logic so that inside each node where have files is created one more node to display them. follows code: private void PopularTreeView() { TreeNode rootNode;…
-
1
votes2
answers622
viewsQ: How to Popular a Treeview with C#System Directories and Files
In my application (Windows Forms) I have to make a tree of directories for the user to search for a (or more) file(s) within his system. I saw on the Web how to make this tree in a Microsoft…
-
0
votes1
answer94
viewsA: How to create a file filter by dragging in C#
Leave it to her, I figured out how to do it, just sweep the vector and if the string contains the pattern ". txt" will be added in the list, if not, display error message, follows code. private void…
-
0
votes1
answer94
viewsQ: How to create a file filter by dragging in C#
I am implementing the Drag files function to fill a Listbox with the file path. It works very well, but I would like to put a "filter" making it possible only to import txt. if it is not txt should…
-
1
votes1
answer264
viewsQ: How to select more than one txt file with C#
I’m writing a C# application that needs to receive more than 1 text file and display the Filename of them in a MessageBox individual for each. My question is in this import of the files, I was using…