Posts by Patrick Perdigão • 1,030 points
31 posts
-
0
votes2
answers54
viewsQ: How to assign the name of a component, where it does not exist in the current context
I have a form for client registration and within this form there is a RadioButton that asks if this customer needs to send invoices, if the answer equal to SIM arise two components, a TextBox and a…
-
0
votes1
answer53
viewsA: mysql description
Assuming that the table alunocursos has a link with the table cursos you could do it using two INNER JOINS: SELECT COUNT(alunocursos.codAluno), alunocursos.codCurso, cursos.descricao FROM…
-
8
votes1
answer196
viewsA: Doubt about React in Javascript
What is the React? Like defined by its creators, React is "a declarative, efficient and flexible Javascript library for creating user interfaces (UI)”. This library appeared in 2011, on Facebook,…
-
1
votes1
answer86
viewsQ: Copy and paste string without mask
I’m using a MaskedTextBox containing a mask of CNPJ (00.000.000/0000-00). But I wish that when I copied this string it would come to the clipboard without the mask, to remove the mask I’m doing…
-
1
votes2
answers115
viewsA: Assign database value to a variable c#
You can solve this by using the ExecuteScalar() in this way: int checagem; checagem = Convert.ToInt32(com.ExecuteScalar()); This function seeks only a bank value and not a collection, as is the case…
-
1
votes1
answer85
viewsQ: Why do space aliases only work with backticks?
I have a view where all its columns have been dubbed to make it more readable: +----------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra |…
-
5
votes1
answer281
viewsQ: Is Winforms dead now?
Windows Forms has been on the market for approximately 17 years since. NET Framework 1.0 released in 2002, and still remains one of the major limitations of running only on Windows, as its name…
-
2
votes1
answer106
viewsA: Mysql - Phpmyadmin error running Trigger
What is actually causing the error is the absence of the DELIMITER$$ at the beginning of the code but there are also some other errors in the TRIGGER described. First you ended up not closing the IF…
-
3
votes1
answer922
viewsQ: Why is it not possible to use an "alias" in the WHERE clause in Mysql?
I need to wear a alias in the clause WHERE, but keeps telling me it’s an "unknown column". I need to select records that have a higher rating than X. The rating is calculated as the following alias:…
-
0
votes1
answer38
viewsQ: Do Excel formulas continue to work after being imported into a Datagridview?
I have a spreadsheet in Excel where I import it, to present the data in a DataGridView, i wonder if the formulas that are contained in the spreadsheet still work in the DataGridView. To be more…
-
0
votes0
answers1629
viewsQ: Create installer in Visual Studio 2019
I created an installer for my solution in Visual Studio 2019 using the Setup Wizard (component of VS itself), and configured it so it was to my liking, I changed the debug application for release…
-
6
votes1
answer99
viewsQ: Why do typed accessors run the process faster?
I was reading an article by how to improve the performance of a Reader data using ADO.NET and in this article he cites the use of Typed Accessors to perform this function, from what I understand it…
-
0
votes1
answer236
viewsQ: Instantiating form to lock button
I’m instantiating a form with a single textbox just to put the password to release the button action. The button has the function of exporting the data contained in datagridview for a spreadsheet in…
-
4
votes1
answer1109
viewsQ: How to change the color of the progress bar?
I’d like to do two things on my progress bar. Change color from green to red. Remove the blocks and create a color. I’m using Visual Studio Community 2019 on Windows 10.…
-
6
votes1
answer1109
viewsA: How to change the color of the progress bar?
How To Do First, include this if you don’t have: using System.Runtime.InteropServices; Second, you can create a new class or place your code in a static class existing nongeneric: public static…
-
0
votes1
answer82
viewsQ: Get the logged in user id
I found many questions of this kind here in Sopt but none that specifically talked about C# in Winforms. Well, I have a login screen and would like to pick up the id of that user who is currently…
-
2
votes2
answers361
viewsQ: Export large amount of data to Excel
I have a DataGridView where in it there is an average of about 50 thousand lines where these should be exported to an Excel file. But because of the huge amount of data the application simply…
-
1
votes2
answers2509
viewsA: Unable to access a discarded object
The detail is in the this since I am assigning the retrieval of the information to the instance exibirdados I must instantiate a new object from it, I was trying to instantiate from a new object. So…
-
0
votes2
answers2509
viewsQ: Unable to access a discarded object
I am instantiating a form from a double click on a Datagridview from another form, where through this return the information from that line to the form. It is working properly but when I close this…
-
0
votes1
answer36
viewsQ: Pull data from Datagridview to a form
I got a problem where I got two forms TelaInicio and ExibirDados and I’m trying to make sure that when the user double-click on some line in the Grid will open a form pulling the information…
-
4
votes2
answers609
viewsQ: Difference between ?. and ?? in C#
I looked at the documentation of Microsoft but still I found it a bit confusing, the main things I managed to abstract were: "?." - is a conditional null operator and tests the value of the left…
-
2
votes2
answers476
viewsA: Translating copy command from CMD to Powershell Copy-Item
Try it like this in Powershell copy-item *abobrinha*.txt -destination todasabobrinhas.txt
-
0
votes1
answer80
viewsQ: Error when executing an INSERT in a view
I have this chart +---------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+---------------+------+-----+---------+-------+ |…
-
0
votes0
answers955
viewsQ: Import Excel data to Mysql
I am trying to make an import of an excel spreadsheet with 536 thousand records by mysql Workbench I saved the spreadsheet as csv but at the time of import it can import all lines but it pulls only…
-
0
votes1
answer350
viewsQ: Does not contain a constructor that takes 0 arguments
My code is public partial class TelaInicio : MetroFramework.Forms.MetroForm { internal ExibirDados exibirdados = null; public TelaInicio(ExibirDados exibirdados) { InitializeComponent();…
-
1
votes1
answer111
viewsQ: Popular a Combobox from the selection of another Combobox
I really have no idea how to do this, but if this is really possible it would be very helpful to me, I tried in some ways but none of it worked I have a ComboBox cboBusca where I select what I want…
-
2
votes1
answer473
viewsQ: Filtering in Bogotá
Hello, I’m having a problem to perform filters on a DataGridView I am using Windows Forms and pulling information from a Mysql database to the DataGridView called dgvDados the information is being…
-
1
votes2
answers97
viewsQ: Pulling repeated data from the database to Datagridview
I’m working on a c# project where I have a form TelaInicio where there is a DataGridView where all bank information is loaded and for this I have created a method called CarregarGrid() in form…
-
4
votes1
answer767
viewsQ: Access methods from another Form
I have a form called TelaInicio where I have a method CarregarGrid() I would like to access this method through my other form Cadastrar I’ve left the method CarregarGrid()as public but still do not…
-
4
votes1
answer76
viewsQ: Data to string conversion
I’m developing a project and I’m having a problem with a date-to-string conversion (I believe that’s it). I am counting months between a date and another (algorithm obtained in this other question,…
-
12
votes5
answers5490
viewsQ: Count the number of months between one date and another
I would like your help to basically count the amount of months between a date and another. I’ll give you an example but what I want is basically just an accountant. Ex: quantity of months between…