Questions tagged as 'winforms'

1
answer

Access SelectedItem from Combobox Windows Forms C #

I placed the items inside the combobox as follows: cmbSituacao.DisplayMember = "Text"; cmbSituacao.ValueMember = "Value"; cmbSituacao.Items.Add(new {Text = "TODOS", Value = "000000"}); foreach(var sit in recSituacao) { cmbSituacao.Items.Add...
asked by 19.07.2018 / 16:36
1
answer

Clear DataGridView without triggering CellValidating event

I'm trying to clean a DataGridView from C #. But when running Rows.Clear() , before that it is executing a CellValidating event that is also appended to the DataGridView How can I not perform validation before clearing the record...
asked by 27.07.2018 / 16:04
0
answers

Problem with TextBox.Focus (). Repeats SQL when giving focus in field

I have a function that writes some information to a table when exiting a TextBox (Leave). However, when exiting, the focus returns to the first TextBox . When this occurs it directs the focus as it should, but reinsert the row in th...
asked by 12.07.2018 / 05:51
1
answer

Simultaneous insertion of items and sales with C #, Windows Forms and PostgreSQL

Hello, I'm developing a sales screen in C # Windows Forms. I'm just in the beginning of the project, but I came across a situation where I'm not sure what to do. I am using a PostgreSQL database, I created a table called SALE and another ITEMSEN...
asked by 12.07.2018 / 00:46
0
answers

How to save and change data in bank using checkstate of a checkbox

Good afternoon, I need to save the information with condition, because at the time of registering the equity I made a checkbox that represents whether the equity is internal or external. If it is checked it is external and if it is not checke...
asked by 02.07.2018 / 19:30
1
answer

Image Upload Using PictureBox - windows forms

Say hello, good morning! I'm not sure how to do this, but I'm not sure how to do this. and I'm making a photo using photo! however when doing the insertion of the data and converting the photo to binary in my database my statement returns this e...
asked by 03.07.2018 / 14:45
0
answers

Update value in database when changed cell value in DataGridView

I'm using a local database myself, created by a Bank class and I would like it when I change values in the DataGridView cells on the Register Customers screen, that same value would change on another screen, in the case I have a Register screen...
asked by 28.06.2018 / 18:41
0
answers

Change Log-SqlServer Audit

I have a windows forms application and want to create a change control of the registers, a log where the value of the previous and current field is registered, date and user that changed, as well as insert and delete. Searching on the internet t...
asked by 27.06.2018 / 17:30
2
answers

Increment variable while holding a button

I need to do an action inside a Button, when the person presses and holds with the left side of the Button in the Button, increment a variable until you release. He released, for action. Within the method of this Button, I want to increment t...
asked by 21.06.2018 / 20:47
1
answer

Edit text file in a specific line [closed]

I have a txt file that tells me 3 fields: error line, wrong number and number to replace. But I'm not thinking of an instruction to go directly to the line I need, this file follows a layout. I can put the examples here, if you like. l...
asked by 14.06.2018 / 20:51