Questions tagged as 'c#'

1
answer

Validation of the repeated record

I have a class named Matricula . It receives the register of Aluno and Serie . I need to do a validation, where if the student is already enrolled in a registered series, the page displays a message stating that the student...
asked by 13.06.2017 / 14:28
1
answer

Help with application release written in Visual C #

I just finished a small project. In Visual Studio, I chose the "Release" option to compile and run. I ran some tests and the application ran normal. One of the processes run by the application takes about ten minutes to run on my PC. During t...
asked by 26.04.2017 / 23:21
1
answer

Two databases communicate with the same model [closed]

I wanted to have one database for production and another for development to separate the actual data from the test environment data. The problem is that I have no idea how to do this. I created a clone of my development database with the "Schema...
asked by 27.04.2017 / 12:01
1
answer

Table Relationship FluentAPI

I'm trying to make a table relationship, using FluentAPI with Entity Framework, in which my purpose are 3 entities: public class Empresa { public Empresa() { this.Gerentes = new HashSet<Gerente>(); } public int...
asked by 06.06.2017 / 17:03
1
answer

How do I edit an element of this array?

I have an array like this: List<dynamic> business_list = new List<dynamic>(); business_list.Add(new { business_Name = reader.GetString("name"), business_OwnerID = reader.GetInt32("owner_id") }); List business_list = new...
asked by 07.06.2017 / 04:22
1
answer

Field within a variable dynamically using array

Here is code: byte[] Imagem1 = null; byte[] Imagem2 = null; byte[] Imagem3 = null; byte[] Imagem4 = null; byte[] Imagem5 = null; byte[] Imagem6 = null; How can I declare the bytes [] variables within an array? I've tried this: byte[] i...
asked by 13.04.2017 / 03:30
2
answers

How to store multiple user names in a variable?

I have a form , and I make a query in the database: private void Consulta() { var dataCom = Convert.ToDateTime(label1.Text).ToShortDateString(); var conf = $"select * from data where data_venc = '{Datacom}'"; var comando = new MySqlCo...
asked by 19.04.2017 / 05:41
1
answer

Open Modal by code-behind

I have a modal, #myModal, and I would like that when I clicked on the button, I had a condition and that if it entered the else, it would open the modal. I created this code in javascript: <script type="text/javascript"> f...
asked by 19.04.2017 / 21:29
1
answer

C # Oledb truncating column excel

I'm doing a select in an excel where I have an observation column (open text). The problem is that on some lines it truncates the contents of that column by bringing only one part. try { conn = new OleDbConnection("Provider=Microsoft.ACE.O...
asked by 10.04.2017 / 22:40
1
answer

Error when calling the report

I have an error below, when I call a report, which has a query in the database, I can not resolve it. Takealookattheresultyouhavenothingwithzero Followthecode:SELECTSD.D2_DOC,SA.A1_NREDUZ,SB.B1_DESC,m.nm_mes,SD.D2_QUANT,SD.D2_PRCVEN,(SD.D2_C...
asked by 12.04.2017 / 14:18