Questions tagged as 'c#'

2
answers

Does anyone know how to get data from the grid cell?

Good evening guys, I have a history grid where the service is shown and I have two more grid below with the debits and pending debits I wanted to get from the clone of the grid above in which I mentioned first that it would be the client's . Cli...
asked by 07.07.2016 / 04:24
2
answers

How to create summation with "sum" with multiple columns queryover

I need to create a query with C # queryOver (Nhibernate), to add more than one column. Example in pure sql: SELECT SUM(coluna1 + coluna2 + coluna3 + coluna4) FROM tabela First I did it this way: Tabela tabela = null; Session.QueryOver<...
asked by 05.07.2016 / 21:39
1
answer

Display date formatted in datagridview

In datagridview has a date field in the format yyyyMMdd and needs to display formatted in the correct form. I tried this: dgvRequisicao.Columns["data"].DefaultCellStyle.Format = "dd/MM/yyyy"; But instead of showing me the f...
asked by 05.07.2016 / 16:07
1
answer

Randomization / Randomization C #

Good. I'm trying to create a snake game in C # and I have no idea how I can make a new fruit appear in a random place when the snake gets some fruit.     
asked by 07.09.2015 / 00:03
1
answer

What are the errors in this code using EF6?

What are the errors or improper practices in this code? static void Main(string[] args) { using (var db = new AccountingSystemContainer()) { var invHeader = db.InvoiceHeaderSet.Create(); var invDetail = db.InvoiceDetail...
asked by 10.09.2015 / 01:16
3
answers

ViewData is not displaying a post

I'm trying to send a message from Controller to View, using ViewData, but it's not displaying the message. When I click on the "Check" button of the View it is to call the Verificar() method of the Controller, it is calling correctly,...
asked by 08.09.2015 / 21:58
1
answer

Problem with page return according to profile C #

I'm trying to return a page according to the user profile registered at the bank. If his profile is "Admin", he returns another page. I try with the Administrator profile and it works, already from another user, I changed his profile in the bank...
asked by 23.06.2015 / 20:19
2
answers

BD ACCESS does not accept INSERT or UPDATE

I have a C # solution with access database that accepts SELECT, but does not accept INSERT or UPDATE, Follow insert button code: OleDbConnection con = new OleDbConnection(); con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;DataSourc...
asked by 23.06.2015 / 07:15
2
answers

Sort field or date expired notifications, database

I do not know about database, I'm using one in Visual Studio (the default SQL called "Services-based Database"), I already integrated it into the form and made up the query fields. But it has a field of one of the tables that would be dated,...
asked by 30.06.2015 / 20:06
2
answers

Problem with a Count in Asp.Net MVC

My application manages courses, on my registration screen I have a field "number of vacancies" where it is decremented each time a student enrolls in a course. The problem now is that my Count is denying the "number of vacancies" field. On t...
asked by 08.06.2015 / 21:07