Posts by Victor Freitas • 738 points
35 posts
-
0
votes1
answer94
viewsQ: Methodinvoker does not update listbox C#
How to implement a timer that updates a listbox in c every cycle#; Method to create the timer: private void CriaTimer() { System.Timers.Timer aTimer = new System.Timers.Timer(); aTimer.Elapsed +=…
-
0
votes1
answer999
viewsQ: If exists update Else Insert in table with foreign key postgres
I need to do an Insert in a table with a foreign key, so if this record does not exist in the other table I need to do an Insert, can I do this operation using if exists? Some solution?
-
1
votes2
answers269
viewsA: Select in windows form c#
You can create an event so that when marking an item it marks the previous items; private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e) { if (e.CurrentValue !=…
-
6
votes3
answers4491
viewsQ: How to check if the program is already running in C#
I wonder if there is a way to check if there is already an instance of the running program, so that if I click the program icon it does not call a new instance of the program but open the already…
c#asked Victor Freitas 738 -
2
votes2
answers552
viewsQ: How to connect Visual Studio Code with TFVC?
Is there any way to connect Visual Studio Code to use Team Foundation Version Control (TFVC) version control? If so, how to do?
-
0
votes1
answer1914
viewsA: Error Installing Ionic + Cordova
A possible solution would be to perform the following steps: 1 - Instalar a ultima versao do NodeJS disponivel no site; 2 - Abrir o prompt de comando do NodeJS como administrador; 3 - Execute: npm…
-
0
votes1
answer50
viewsA: Use of a Join to join two Tables
After writing the SQL in the form that generates the table with the intended results, you can return this table in a Datatable: DataTable dt = ConexaoBancoDados.ExecReader(sql); Then you must create…
-
2
votes3
answers1167
viewsA: Epplus row and column last cell - C#
I don’t know much about the Epplus package, but it seems to solve the problem using: using (ExcelPackage xlPackage = new ExcelPackage(newFile)) { ExcelWorksheet worksheet =…
-
0
votes1
answer164
viewsQ: Problem disabling Backgroundworker
I am creating in my main form a Backgroundworker object and I have two click events, one to activate and the other to disable the backgroundWorker, but the method to disable is not working.…
-
0
votes2
answers729
viewsA: How to fill datagrid in a form with fields in another form C#?
In Form1 1 - Create a Grid 2 - Create a Join Form1 button and add the Click event: private void Cadastrar_Click(object sender, EventArgs e) { new Frm2().ShowDialog(); Grid.DataSource =…
-
0
votes1
answer723
viewsQ: Find the dataRow index
I’m walking a DataTable with a foreach using a variable of type DataRow, but I need to recover the content of DataRow that I’m walking through. foreach(DataRow row in DataTable.Rows) { string…
-
0
votes2
answers736
viewsQ: Error: connection to database already opened
I am creating a method to test a connection with the Postgresql database, but when calling the method that opens the connection an error happens saying that the connection is already open and does…
-
0
votes1
answer562
viewsQ: Error conversion type Object to int
I am making a select in the database, using Execscalar returning an Object but I cannot cast this value returned to integer. public static int ConsultaPDVsAtivos() { NpgsqlCommand sql = new…
-
3
votes3
answers1157
viewsQ: Regex check IP
I am implementing a regex to accept IP address, for this I am using a Mask in the textEdit component of Devexpress, however when I leave the field blank or with only one filled part locks all other…
-
1
votes1
answer225
viewsA: Generic interface
I don’t know if I understood your doubt very well, but I think that a solution would be to create an interface with generic methods, making your Client, Address, Dependent, etc classes inherit from…
c#answered Victor Freitas 738 -
6
votes2
answers277
viewsQ: Difference Italic and emphasis in HTML?
What’s the difference between tags <i> and emphasis <em> in HTML? When using each of them?
-
1
votes1
answer866
viewsA: How to access a list of another class in C#
Your Find() method has no Return and you are using a static variable within the Find() method, so you will not be able to fill your List object. Create the search method and return the filled list:…
-
5
votes2
answers2773
viewsQ: Run more than one project in Visual Studio
In the same solution of Visual Studio I created two projects, the first to run a Server Socket and the second as a Client Socket that will send a file, but I’m having difficulties to run both…
visual-studioasked Victor Freitas 738 -
4
votes2
answers2287
viewsQ: Rename table in Firebird
How to rename table in firebird 2.5? I’m using the query: ALTER TABLE cliente RENAME TO clientes;, but error appears: invalid Toke 'Rename'.…
-
1
votes2
answers96
viewsA: Entity Framework - tables not created
It’s all right up to where you did, now you must give the commands: 'add-migration nome_da_migration' and another 'update-database', then go to the SQL Server Object Explorer window and click with…
-
2
votes1
answer1215
viewsQ: Transfer network files C#
I wonder if there is any way to transfer files on a local network without using the Socket Class in C#? and in terms of performance what is the fastest method of transferring files over a local…
-
1
votes1
answer122
viewsA: How to use Linq2db.Firebird?
I did a short time job and it was really hard to get auxiliary material on the internet, I used as a base a ready work available on Github: https://github.com/linq2db/examples…
-
1
votes3
answers406
viewsA: Insert decimal variable in Firebird
The problem was solved by making a change in the table structure, before my VALOR_UNITARIO field was a decimal (18.0) and I made a change changing the field structure to decimal(18,2). ALTER TABLE…
-
3
votes5
answers14273
viewsA: How to put a colored layer over an image?
You can set the property of background-color, but it will make a difference if the image does not overlap the entire background area: <!DOCTYPE html> <html> <head> <style>…
-
0
votes2
answers334
viewsA: Increase the size of images in a virtual store
My tip would be to actually change the page width: increase to 1300px; <div class="row"> element.style { width: 1300px; } And remove the lateral borders of the image div: class="product";…
-
3
votes2
answers411
viewsQ: Textbox_changed is accumulating the sum value c#
I’m using the event textBox_Changed and when I type a value into the field, another textBox should receive this value, but this other textBox called ValorTotalVenda is accumulating this amount.…
-
3
votes2
answers1621
viewsA: Difference between AWT and Swing in component rendering
In implemenation, the basic difference is that AWT uses the visual components Apis of the operating system where the VM is running to create entire components with virtually all the behavior being…
-
3
votes1
answer466
viewsQ: Reload Datagridview in C#
I am creating an event of a button in which it creates a Product object and adds in a list of Products and using this list to fill the Datasource of a dataGridView, but Datagridview keeps appearing…
-
0
votes1
answer327
viewsA: How to effect the @Override of a Function in Angularjs?
An alternative to solve your problem would be to use overload. Ex: Overload - Number of parameters Once again I will use Js "apply" method to solve this question, as the language moves a lot with…
-
0
votes3
answers406
viewsQ: Insert decimal variable in Firebird
I am making an Insert in Firebird database in a Value field (decimal), but no decimals appear in the table. Code in C# : public decimal ValorUnitario { get; set; } produto.ValorUnitario =…
-
0
votes2
answers6427
viewsA: Export data from Firebird
Just as Voce can use the tool Ibexpert, there is also the software Fullconvert https://www.spectralcore.com/fullconvert/howto-pt/firebird-to-excel making the Firebird conversation (related files:…
-
1
votes2
answers1037
viewsA: How to close connection to Firebird database
According to the principle of unique functionality, I suggest that you separate in different ways. public class ConnectionFirebird { private static FbConnection AbreBD() { FbConnection ConexaoBanco…
-
0
votes1
answer1334
viewsQ: How to recover last record inserted in Firebird database?
My Sale table has a Code field with auto-increment and need to recover this code to insert in an associative table. string sql = $"INSERT INTO…
-
1
votes1
answer1293
viewsQ: Insert type timestamp into Firebird database
Error in the insert in Firebird database, field DataCadastro type timestamp unaccepted string. INSERT INTO VENDA(CODIGO, NRO_VENDA, DATA_VENDA, VALOR_TOTAL_PRODUTOS, VALOR_ACRESCIMO, VALOR_DESCONTO,…
-
0
votes2
answers1914
viewsA: How to make Insert in tables with many relationship for many?
For INSERT in Parse_receipt you need the Receipt keys and an Parseid, you need to reshape your table Parse_receipt to contain Receipt and Parseid Foreign: Recibo Analise_Recibo Analise ==========…