Questions tagged as 'c#'

1
answer

Parameters of SqlCommand and ExecuteReader [closed]

I can not get values from the database and direct a form according to what "profile" is in the users table, if I take the% login , however, I need to verify the user's profile, my code looks like this: using System; using System.Collection...
asked by 23.12.2014 / 01:11
1
answer

Left Join statement in LINQ to entites

I tried to do a left join in LINQ as follows: (from opr in db.Operacao join vol in db.Volume on new { VOL_CODBAR = opr.OPR_CODBAR } equals new { VOL_CODBAR = vol.VOL_CODBAR } into vol_join from vol in vol_join.DefaultIfEmpty() select new {...
asked by 22.12.2014 / 18:10
1
answer

Doubt on how to set the type to return a list

I need to return some lists for my view. I am using ViewData. But have a problem, at the time of declaring the variable, I do not know what kind to put. I made the following form and it is giving the following error: foreach statement cannot...
asked by 18.09.2014 / 20:51
1
answer

Parameter problems in SqlCommand

I am developing a service registry, the first screen is the one of login and I need to take the position of the user that logged in and indicate a form for it, my code is like this: using System; using System.Collections.Generic; using System....
asked by 20.12.2014 / 21:19
1
answer

LINQ with Left Join and Multiple Keys

My LINQ query does not give an error but does not display any results. Where did I go wrong? using (var db = new MyEntities()) { var result = (from dc in db.DiarioClasse join fn in db.Faltas on new { dc.Matricula, dc.CdD...
asked by 18.09.2014 / 17:40
2
answers

How to fill a datagrid in a form with fields in another form C #?

I'm doing a loyalty system, and wanted to use two forms for clients , form1 with datagridview and a button to sign up and the other form2 with the data fields to be filled , this form2 would be triggered by pressing the form1 button, w...
asked by 17.09.2014 / 22:18
1
answer

How to insert a data table into the database?

Personal already have my dataTable filled with values that came from a .csv file now need to insert into the database without using SQLBulkCopy ... how to do? via c # This method fills my dataTable: public DataTable RetornaDtPreenchido(stri...
asked by 18.09.2014 / 18:53
1
answer

Working with Entity Framework, Multithreading and SQL Server in C #

I'm using Entity Framework and Multithreading in a C# project and I'm experiencing connection problems with SQL Server . Well, I wanted to improve the speed of data searches for a grid because they are very time-consuming...
asked by 13.10.2014 / 21:14
1
answer

How to define data that will be shown in the gridView

I have this class userDAO, where I make a select to return only: Enroll, Name and Accesses and return in a gridView. public List<Usuario> ObterTotalporMatricula() { var lista = new List<Usuario>(); using (var c...
asked by 14.10.2014 / 15:35
1
answer

Void CheckError Oracle x IIS

Well, due to the exhaustion of my attempts to find the error, I will try to get a light here with you. Of course I apologize if the error is too generic and does not have the necessary infos. But here goes a part of the scenario and the situa...
asked by 14.10.2014 / 20:43