Posts by Thomas Erich Pimentel • 3,059 points
164 posts
-
0
votes1
answer178
viewsA: SQL allocate record (Rowlock)
When we work with lock's we need to explain the beginning of the command and the end: begin tran //inicio do comando select * from crm_man with (holdlock,rowlock) where id = 1099 commit // fim do…
-
0
votes1
answer178
viewsQ: SQL allocate record (Rowlock)
I am developing an application, and I am facing a problem about competition of records. What happens is that I have several people who can access the same record, so I needed that when a user clicks…
-
0
votes1
answer96
viewsQ: Set Popup Size - Gridlookupedit
Someone would know how to decrease the popup, presented by the control GridLookUpEdit devexpress?…
-
7
votes1
answer1263
viewsQ: App.config how to use`Connectionstring` encrypted
In my app.config I have a section that for my String connecting: </configSections> <connectionStrings> <add name="Azure.Onee"…
-
1
votes1
answer1858
viewsA: Popup when right-clicking mouse
I was able to deploy using the event MouseDown of GridView, together with the component ContextMenuStrip Documentation of the Contextmenustrip private void MyDataGridView_MouseDown(object sender,…
-
1
votes1
answer1858
viewsQ: Popup when right-clicking mouse
I’m trying to make a popup by right-clicking a mouse inside a GridView. I’m using the event MouseDown and the event MouseUp to do the popupControlContainer appear and disappear. but how to make it…
-
2
votes2
answers779
viewsA: How to set read-only line of Gridview made with Devexpress?
I managed to solve using the event ShowingEditor of GridView: First, when the user clicks on the "Edit" button we have: private void button4_Click(object sender, EventArgs e) // botao editar { //…
-
2
votes2
answers779
viewsQ: How to set read-only line of Gridview made with Devexpress?
I need to put the lines of my GridView as read-only. I mean, I have one GridView which already contains some data, this data cannot be edited, but I can add new lines, and these new lines can be…
-
4
votes1
answer1167
viewsA: How to disable editing and block adding Gridview lines
I managed to Resolve by editing the property: gridView5.OptionsBehavior.Editable = false; Thank you.
-
1
votes1
answer1167
viewsQ: How to disable editing and block adding Gridview lines
I have a GridView that the user enters with some information and saves, I would like that after clicking save. put all grid in mode ReadOnly and also would like to block to insert or delete lines.…
-
3
votes1
answer142
viewsQ: How to place a Readonly column?
I’m trying to leave only one column of GridView as ReadOnly, I’m doing like this: if (id_crm == 0) { textBox2.Text = Convert.ToString(cod_crm()); DataTable dat_itens = new DataTable();…
-
1
votes1
answer466
viewsQ: How do you recover data typed in Gridview and then save to the database?
In a certain register screen, I have a GridView with a few blank lines, then the user would have to type the information in those lines, and then when clicking the save button, do the INSERT at the…
-
3
votes4
answers13213
viewsA: Textbox accept numbers and commas
I was able to solve it this way: private void textbox11_num(object sender, KeyPressEventArgs e) { if (e.KeyChar == '.' || e.KeyChar == ',') { //troca o . pela virgula e.KeyChar = ','; //Verifica se…
-
4
votes4
answers13213
viewsQ: Textbox accept numbers and commas
I need that one textBox accept only numbers and commas. To accept numbers I’m doing so: private void textbox11_num(object sender, KeyPressEventArgs e) { if (!char.IsDigit(e.KeyChar)) { e.Handled =…
-
0
votes1
answer67
viewsA: Xtrareport - View report but don’t print
Solution: private void button8_Click(object sender, EventArgs e) // botao imprimir { // Create a report. imp_orcamento report = new imp_orcamento(Convert.ToInt32(textBox1.Text)); // Show the…
-
0
votes1
answer67
viewsQ: Xtrareport - View report but don’t print
I’m using the report builder XtraReport, and using ReportPrintTool to view and then print. However, it was necessary, just visualize, blocking the print. It would be possible? Preview button:…
-
1
votes2
answers1681
viewsA: C# - Reference a variable from another method
Note that when creating a class, we can define some input variables, example: class Cadastro_obsClie { // Neste caso minhas variaveis de entrada são, id_cliente, data, titulo e descricao public int…
c#answered Thomas Erich Pimentel 3,059 -
1
votes1
answer1122
viewsQ: Best method to locate values in a Datatable
In a unit of measure registration screen, I have to check if the unit that the user is wanting to register, if it already exists, then as I have a DataGrid populated by a DataTable, I thought I’d…
-
3
votes2
answers654
viewsA: How to list the data of an SQL query grouped in order of data presentation
If so, SQL Server, we can group using syntax: SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name; To use the command GROUP BY…
-
2
votes1
answer2011
viewsQ: Select with LIKE argument %
I’m trying to perform a select, using LIKE and defining the argument %: WHERE title LIKE '%computer%' locates all book titles with the word 'computer' anywhere in the book title. source:…
-
6
votes4
answers10625
viewsQ: Constructing SQL tables - use or not fields with Not Null?
I have a question regarding the construction of tables and field use Not Null. I know that for fields of Primary Key, it is necessary for him to be Not Null, but in other fields, what is the need to…
-
1
votes0
answers49
viewsQ: Load database table by system session
I am developing an application, where one of the modules is the registration of products, and within this register, I have the tax part. In this fiscal part, I have to define an NCM, and according…
-
2
votes1
answer41
viewsA: Groupcontrol - Backcolor does not change
Next, to use backcolor, you need to set the property LookAndFeel.UseDefaultLookAndFeel as false and the property LookAndFeel.Style for Flat.…
-
1
votes1
answer41
viewsQ: Groupcontrol - Backcolor does not change
I’m using a GroupControl from Devexpress 16.1, but when trying to change the background color (backcolor) it still has the default color, does anyone know why? or if I’m doing it wrong? // //…
-
3
votes1
answer1627
viewsQ: Usercontrol, what is it? When to use?
I am studying the best way to do a user control in a WPF application, but I have some questions regarding the UserControl available in VS 2015. I have already programmed an access control, ie user…
-
2
votes2
answers165
viewsA: If - Datatable condition
Guys, I did it, using DataTableReader I’m doing like this: DataTableReader dtr = ret_orc.CreateDataReader(); if (dtr.HasRows) { while(dtr.Read()) { string a = dtr["cli_final"].ToString(); if (a !=…
-
3
votes2
answers165
viewsQ: If - Datatable condition
I need to compare a value of one of the fields of a DataTable, to fulfil a condition if, but I don’t know how to do it. follow below: public partial class imp_orcamento :…
-
0
votes0
answers99
viewsQ: How to Grid with Levels
Would anyone know how, to make a grid with two levels and Winform? example below: thank you.…
-
1
votes1
answer494
viewsQ: Treeview - click on Node and open specific screen
I have a TreeView, with some settings items: I would like to double click on one node it opens a specific form, the event of double-clicking and open the form, is OK, the problem is how I…
-
0
votes1
answer51
viewsA: Hide column and change size. Gridlookupedit
Staff follows solution below, to modify the columns after popular Remember to use namespace: using DevExpress.XtraEditors; using DevExpress.XtraGrid.Columns; private void Form1_Load(object sender,…
c#answered Thomas Erich Pimentel 3,059 -
0
votes1
answer51
viewsQ: Hide column and change size. Gridlookupedit
I am using a Gridlookupedit, and I would like to hide the first column, and adjust the size of the others, however I am using gridLookUpEdit2View.Columns[0].Visible = false; and the…
c#asked Thomas Erich Pimentel 3,059 -
4
votes2
answers310
viewsQ: Which object performs best? Sqldatasource or Datatable?
In terms of performance, speed, or even safety, what is the best object to be used as a DataSource? Example, I’m creating a DataSource, to popular a GridView: For SqlDataSource:…
-
0
votes1
answer53
viewsA: How to make a Combobox with Gridview?
His name is Gridlookupedit. You can encapsulate a gridview in a combobox.…
-
0
votes1
answer53
viewsQ: How to make a Combobox with Gridview?
I’m trying to make a Combobox that then click is filled with a Gridview, I know it’s from Devexpress, today I use version 16.1. example:…
-
5
votes1
answer1276
viewsQ: Encrypt App.Config
I’m trying to encrypt my Connection string, that’s in my app.config. After reading some forums, I saw that 2 methods need to be created: class proteger_app { public static void Criptografar() {…
-
5
votes1
answer346
viewsQ: When should I instantiate a class?
I’m having second thoughts about the best time to call for instantiate a classe. Should I do it at the beginning, before the builder, at the constructor or at the time when we will make use of some…
-
0
votes2
answers124
viewsQ: Static Datatable, how to load?
I need to create a method, that when the user logs into the system, when the initial menu is loaded, it loads a Static DataTable, so that I can use the DataTable, for some popular ComboBox, without…
-
1
votes1
answer5127
viewsQ: Correct method to get Datatable populated Combobox value
What is the right way to get the value of a ComboBox populated by a DataTable? I’m using the following code: private void ComboBox3_SelectedIndexChanged(object sender, EventArgs e) { Consulta_cidade…
-
0
votes2
answers164
viewsA: Help with textbox validation
Friends good afternoon. After the help of our colleague, Andre Mesquita, I managed to solve by adding the event below. private void Form1_FormClosing(Object sender, FormClosingEventArgs e) {…
-
2
votes2
answers164
viewsQ: Help with textbox validation
Guys good afternoon. I’m having difficulty performing a task, which is as follows:: I have a customer registration, that when the user edits something from the register, when saving is presented a…
-
9
votes4
answers785
viewsQ: Should I use a "Try-catch" to identify if a password is wrong?
On the screen of login, carry out the verification in the bank by means of a select, and I’m using the catch to capture this exception. It is correct to use the catch for that guy? if (Usuario !=…
-
3
votes1
answer456
viewsA: C# Windows Form - Doubts about Session
I found the solution, below: Source: http://www.linhadecodigo.com.br/artigo/3215/trabalhando-com-sessao-dentro-do-windows-forms.aspx On the Windows Forms platform people find it difficult to…
-
0
votes1
answer456
viewsQ: C# Windows Form - Doubts about Session
I need to save information for as long as the user is logged into my software, I searched and saw that for web pages made with ASP.NET there is the object SESSION, but and for Windows Form? the…
-
0
votes1
answer101
viewsA: How to identify which Tabpage is being closed
galley got, I made the condition as follows: arg.Page == xtraTabPage1 Final code: private void xtraTabControl1_CloseButtonClick(object sender, EventArgs e) //click fechar aba {…
-
0
votes1
answer101
viewsQ: How to identify which Tabpage is being closed
Good morning, how are you? I am working with Xtratabcontrol, and when I close a tab, I need to know which tab was closed. today at the event xtraTabControl1_CloseButtonClick, I’m doing it this way:…
-
0
votes1
answer198
viewsQ: When using the constructor when using load
Good night, how are you? I have a question, when to use the constructor and when to use the load of a form to call some method or etc. Example: public partial class Manutenção_cliente :…
-
0
votes1
answer103
viewsQ: Doubts about table of states and cities
Friends good morning. I have a question, on the best way to fill a combobox with information of State and other with information of city. My doubt, consists in, what would be better in question of…
-
1
votes1
answer42
viewsQ: Doubts about the use of class
Good morning, you guys. How are you? I am writing a windowsform application, and in some situations I need to make several queries, Insert and delete.. well, so I created a query class, a delete…
-
1
votes2
answers570
viewsQ: cmd.Commandtype = Commandtype.Text - Pq use?
Good morning guys. I’m populating a grid, and after searching the internet, I saw that some use the command: cmd.CommandType = CommandType.Text; My doubt, is, why use? what’s the difference? I did…
-
0
votes1
answer77
viewsQ: Set variable in form designer
How can I set a variable in a form designer? Today I set the variable for my parameter, but when I see the form it gives this warning (even with the warning, it normally runs): The variable…