Posts by Rovann Linhalis • 14,881 points
567 posts
-
1
votes2
answers19039
viewsA: Create an executable
Compile your project in visual studio: BUILD > BUILD SOLUTION or Hotkey, F6 Executable will be generated in folder: [Folder of your project] bin Debug
-
0
votes2
answers1147
viewsA: Edit Mysql database with php
Use the same page to insert and edit records. On this page place a field to store the primary key of the selected record. On the save button, if the field is empty, perform the INSERT, if filled in,…
-
5
votes2
answers377
viewsA: 2 devices connected to the same address via Wireless
Whereas the two computers are already on the same network: 1-Discover the IP of your computer A: open a command prompt, the famous cmd, and type ipconfig. You will see this screen: Your address will…
-
1
votes1
answer79
viewsA: Search time in mysql
Try to use the TIME_FORMAT SELECT * FROM tabela WHERE DATE_FORMAT(Data, '%Y-%m-%d') = CURDATE() AND TIME_FORMAT(Hora,'%h:%i') = TIME_FORMAT(TIME(CURRENT_TIMESTAMP),'%h:%i');…
mysqlanswered Rovann Linhalis 14,881 -
0
votes1
answer737
viewsA: Return rows with the highest value in a column
I do not have Oracle here, but try to use a temporary table, in the syntax of postgresql was like this: with temp as (select f.ID_Loja, f.Canal, count(*) as qtd from Vendas f group by…
-
4
votes2
answers210
viewsA: What do builders mean by this?
It is as if this constructor "inherits" another constructor of the same class: Example: public PessoaRepositorio() : this("teste") { } public PessoaRepositorio(string a) { }…
-
1
votes1
answer2159
viewsA: Pick 2-column value in Gridview to perform calculation
Your error is happening because you are only taking the values of the selected lines, change SelectedRows for Rows Note. Inside the Loop, the command…
-
0
votes1
answer44
viewsA: Question about contexMenuStrip
You create a contextMenu and sets it in the Button property, in the click event you will know which button came the click by sender: private void inserirTextoToolStripMenuItem_Click(object sender,…
-
0
votes2
answers52
viewsA: Help with Windowsforms
In the FormPrincipal define the property IsMDIContainer as true, and when opening the FormCadastraCliente place the property MdiParent as your current form ('this'). Ex: frmCadastraCliente form =…
-
2
votes1
answer365
viewsA: How to locate an object by name only?
There are other ways to do it, but in your situation you can use Find(): ((PictureBox)this.Controls.Find("PictureBoxName", false)[0]).Image = Image.FromStream(stream); whereas Picturebox is directly…
-
3
votes1
answer90
viewsA: Why doesn’t it work on my user control?
Whereas, you open the Form1, within it you have a command that opens the Form2, and in the Form2, a button to add to tabPage in the Form1, the code should look like this: Form1.Cs: //Evento que abre…
-
2
votes1
answer541
viewsA: Pass data from one gridview to another gridview
I put a List<string> just by example, but the idea is this: List<string> Selecionados = new List<string>(); private void buttonAdicionar_Click(object sender, EventArgs e) { if…
c#answered Rovann Linhalis 14,881 -
3
votes2
answers1676
viewsA: Login in C# with database
Some remarks: If the password field is empty, why force the user to type the user again? just set the cursor focus to the password field... txtPass.Focus(); Also for the opposite situation. To check…
-
1
votes1
answer46
viewsA: Return average cost between partially equal products
Follow code for your need: Select p.nome, p.tipo, avg(p.custo) as custo_medio, sum(coalesce(le.quantidade,0)) as entradas, sum(coalesce(ls.quantidade,0)) as saidas, (select MAX(data_lancamento) from…
-
1
votes2
answers487
viewsA: Invisible speakers in Listview
It seems to me ListView works in a similar way to TabControl, where it is not possible to define a property Visible. However when you add a column to the ListView, it is also an object within your…
-
5
votes1
answer2224
viewsA: Query the database through a text box
To perform the query while the user type in the textbox, I use the Textchanged event associated with a timer, which will run when the user stops typing. In the Sql part, just define in which columns…
-
0
votes1
answer94
viewsA: Taking data from a table from grades average of another table?
Select *, (select avg(note) from list Where list.id =info.id) as media from information
-
2
votes2
answers3386
viewsA: How to call a nonstatic method within a static class?
to access the non-static method, you must instantiate a class object: TagAnalogicaAtiva obj = new TagAnalogicaAtiva(); obj.criaTimerTendencia();
-
1
votes2
answers1946
viewsA: How to release memory after performing a certain task?
Free the Garbage Collection: GC.Collect(); more information: https://msdn.microsoft.com/en-us/library/0xy59wtx(v=vs.110). aspx…
-
3
votes1
answer79
viewsA: Pick all levels of product categories
As I understand it, the product will always be related to the third level ? See if the following code helps you: SELECT p.titulo, p.id, n1.nome AS cat1, n2.nome AS cat2, n3.nome AS cat3 FROM…
-
2
votes2
answers316
viewsA: Refresh Listview c#
There are several ways to implement this situation, you could better describe your situation to help with the best way for your case. Whereas you will block Form1 while form2 is open, and when…
-
3
votes2
answers1906
viewsA: Convert and save photo in BD
1-This would be the best way to save a photo? I prefer, because being in the database, is accessible in any environment (local or remote / application or web), and eliminates the problem of…
-
2
votes1
answer4048
viewsA: Read csv file using "|" - Python character as delimiter
I believe the error occurs because of the São Paulo’s. In Text fields, the value should be between ". But you can also try to define the encoding of the function. Follow example:…
-
-1
votes2
answers528
viewsA: Postgres-case when
Use the coalesce: Coalesce(p.limite_credito,0) as limite_credito This function returns the first parameter that is not null. In your case, when p.limite_credito is null, will return 0. You can also…
postgresqlanswered Rovann Linhalis 14,881 -
0
votes2
answers418
viewsA: Problem with Table UPDATE based on summation of another table
I don’t know why you put Update Conhecidos, InfoPacotes since only the Known table will be updated, and Where, has to stay inside the sub-select. See: UPDATE CONHECIDOS SET trafego_total = (SELECT…
-
3
votes3
answers85
viewsA: How does variable p work in this code?
Regardless of language, p will be the index of the word tiger, if there are no more occurrences of the word, it will exit the loop. s = "um tigre, dois tigres, três tigres" p=0 #p inicia com 0 pra…
-
0
votes1
answer130
viewsA: Export DESCRIBE TABLE from Postgres to txt
First you can select in INFORMATION_SCHEMA, and then use Copy. I don’t know if the formatting of the text suits you, but it’s a starting point. Example: COPY (select column_name, data_type,…
-
2
votes1
answer528
viewsA: How to make an SQL (Mysql) query with medium and multiple INNER tables?
use a sub-select: (select avg(avaliacoes.avaliacao_geral) from avaliacoes where avaliacoes.cod_fornecedor = fornecedores.cod_fornecedor ) as media_avaliacao Full query: SELECT (select…
-
1
votes1
answer249
viewsA: I cannot access IE checkbox element by vba
uses the URL http://www.bmf.com.br/arquivos1/lum-arquivos_ipn.asp?idioma=pt-BR&status=ativo which gives rise to the frame containing the checkboxes, if you only sail to…
-
2
votes1
answer347
viewsA: What is the difference between Abstraction and Implementation?
Abstraction is the ability to concentrate on the essential aspects of any context, ignoring less important or accidental characteristics. In object-oriented modeling, a class is an abstraction of…
-
10
votes8
answers2223
viewsA: Error: not all code paths Return a value
You are only returning the list in the Obtainer method, if you enter if (reader.Hasrows), if you do not enter, still the method should return something. Follow change in code: private…
-
0
votes3
answers106
viewsA: More attributes in Appsettings
I think I’d look like this: <appSettings> <add key="Nome" value="ValorTeste" /> <add key="Rules" value="TESTE" /> <add key="Title" value="Teste" /> </appSettings>…
-
2
votes2
answers271
viewsA: Problem running tasks with two buttons in the same form in c#
Your problem is in the event assignment, you can assign it via code: public Form1() { InitializeComponent(); button1.Click += button1_Click; button2.Click += button2_Click; } void…
-
2
votes2
answers230
viewsA: Question about how to position buttons
Whereas you have a database (in code simulated by dtJogos), put a flowLayoutPanel in your Form, a Textbox search, and a timer that triggers the search, it can be in a range of 500ms for example.…
-
0
votes2
answers489
viewsA: Checkbox with External Checkbox
Flag to know when the event is being triggered by another, and not be processed: bool processando = false; private void cbSelAll_CheckedChanged(object sender, EventArgs e) { if (!processando) {…
-
0
votes2
answers83
viewsA: Checkbox help in C#
Here’s the code: private void Verificar() { mUpdater = new DatabaseUpdaterService(); mUpdater.Initialize(false, null); DataTable dt = mUpdater.GetVersionCheckBoxToUpdate(); int h = 0; foreach…
-
0
votes2
answers2296
viewsA: Read multiple lines from a file in parallel with c#
Basically you create a queue for the lines that were read in the file, and then you can create multiple threads to process them, the reading of the lines is fast, the process in the BD slower,…
-
0
votes2
answers756
viewsA: Checkbox in Datagridview C#
I’m guessing it’s a datatable of the Student’s presence, with the following structure: -|Data |Presenca 1|02/05/2017|true 2|01/05/2017|false you will scroll through the attendance list, and if you…
-
1
votes2
answers1366
viewsA: Generate an excel file from a data grid C#
Follow code I use in my application: Microsoft.Office.Interop.Excel reference: using Excel = Microsoft.Office.Interop.Excel; path: C: Windows Assembly GAC Microsoft.Office.Interop.Excel…
-
1
votes1
answer177
viewsA: How to pass the name of a wpf window as parameter
when calling the Window, enter the window object to be opened and set the Title property Window1 w = new Window1(); w.Title = "Seu Título"; w.Show(); where is "Your Title"; you must place the value…
-
1
votes1
answer388
viewsA: Checkbox in C#
Whereas you have the values you need in a Datatable: DataTable dt = new DataTable(); int h = 0; foreach (DataRow r in dt.Rows) { CheckBox cb = new CheckBox(); cb.Text =…
c#answered Rovann Linhalis 14,881 -
1
votes1
answer1507
viewsA: How to Place Text from a Textbox on a Label? C# WPF
Create a list of objects from the Attribute valuesclass, scroll through the Form by locating the Textbox, and add the objects to the list. Pass the List to Form2, and scroll through creating the…
-
0
votes3
answers1210
viewsA: REST webservice GET method with token in external browser
Solved: The developer of the other company, sent me an example in Delphi and researched how to do in C# It uses an OLE objto that opens internet explorer. in C# was like this:…
-
3
votes4
answers69
viewsA: How to convert fields to a line with string?
uses System.Reflection.Propertyinfo overloads Tostring() as Renan posted, but in that way: public override string ToString() { string retorno = ""; foreach (System.Reflection.PropertyInfo pr in…
c#answered Rovann Linhalis 14,881 -
3
votes1
answer190
viewsA: Read multiple url s at the same time by saving information to Database
you have to separate the Urls and the data obtained for each request: $urlChuva = 'http://api.climatempo.com.br/api/v1/forecast/15days/rain?idlocale="'.$cCidades.'"'; $urlTemp =…
phpanswered Rovann Linhalis 14,881 -
0
votes2
answers92
viewsA: Chekbox with filters
exchange the part of AND (((SB.B2_QATU - SB.B2_RESERVA) >= 0 AND @SALDO = 0) OR ((SB.B2_QATU - SB.B2_RESERVA) > 0 AND @SALDO = 1)) for: AND (CASE WHEN @SALDO = 1 THEN ((SB.B2_QATU -…
c#answered Rovann Linhalis 14,881 -
0
votes1
answer162
viewsA: WCF + Web API - How to integrate?
from what I understand, you added wsdl for a correct local file ? I never did that, but when I need to change the Ws url, just set it there: string url = "http://host.com.br/ws.asmx"; objws.Url =…
-
0
votes3
answers1210
viewsQ: REST webservice GET method with token in external browser
I am developing a client who consumes a webservice, all POST methods are ok. Has a GET method that should return an HTML page for client registration. in this method, it is necessary to set the…
-
1
votes1
answer157
viewsA: Inheritance of abstract form
do not declare the form as abstract, because it must be instantiated! leave the method as: public virtual void Pesquisar() { throw new NotImplementedException("Método pesquisar não foi…
-
0
votes1
answer1163
viewsA: Move mouse to screen pixel (XY)
is kind of confused the question, but apparently, you want to set the mouse position based on some control ?! therefore use Pointtoscreen Cursor.Position = textBox1.PointToScreen(Point.Empty);…