Questions tagged as 'c#'

1
answer

Convert line from vb to C #

I have the following VB code Funtion Encripta(ByVal Pass As String) As String Dim Clave As String, i As Integer, Pass2 As String Dim Car As String, Codigo As String Clave="%ü&/@#$A" Pass2="" For i=1 to Len(Pass) CAR=Mid(Pass, i, 1)...
asked by 29.04.2018 / 18:24
1
answer

I can not add rows to a datagridview

I have a problem adding new rows to a datagrid I get the following error: "Can not add rows programmatically to the collection of DataGridView rows when the control is bound to data" The code I use to add rows is this: dataGridView1.Rows....
asked by 26.04.2018 / 16:04
1
answer

Open a form from another Form in a C # Panel

I'm doing a program with Visual Studio 2015, it's a Windows Form project with a pretty good UI design, which allows you to open a Form within a Panel without opening it in a new window. That causes me a problem, because for example...
asked by 06.05.2018 / 15:37
2
answers

Is it possible to convert an Object result into an Arrangement in C #?

I have the following method: public List<AnfitrionDto> Seleccionar() { List<AnfitrionDto> ret = new List<AnfitrionDto>(); VisitantesEntities db = new VisitantesEntities();...
asked by 03.05.2018 / 20:59
2
answers

Fill DataGrid with DataTable

The current situation is that I have this dataGrid1.ItemsSource = dt.DefaultView; datagridajuste(); The problem is that when I fill in my "datagrid" (no datagridview), this generates empty tables at the beginning and at the end....
asked by 22.04.2018 / 13:07
1
answer

How to delete the first records of an excel in c #?

I am trying to load the data from an excel to datagridview, and this is my result of the load. my question is how to eliminate those Column1, Column2, Column3 .. etc .. and that my result is the same as product id, unit of measure, key,...
asked by 02.05.2018 / 16:34
2
answers

how to make a query that compares two data of a table in LinQ

Hello developers I have a problem turns out that I am doing an update in linQ and for it I have to compare two data so that the update is correct (since one of these data is repeated in my table) but it turns out that linq does not let me compar...
asked by 30.04.2018 / 13:27
1
answer

Update the values in a list

I have this code, I need to update the values in case I can not find it. List<Rollos> set = new List<Rollos>(); Rollos temp = new Rollos(); foreach (Rollos y in l) { if (set.Any(x => x.item == y.item)) { temp...
asked by 14.05.2018 / 17:25
1
answer

Could someone please decide if the query syntax of these tables is correct?

CREATE PROCEDURE usp_ConsultarLibro @id_Libro char(3) as Select IdLibro, Titulo, NomApe_Autor, Nombre_Categoria, Nombre_Editorial, Nombre_Idioma, Año_Lanz FROM LIBRO L INNER JOIN AUTOR A ON L.IdAutor = A.IdAutor INNER...
asked by 29.05.2018 / 09:09
1
answer

How to rename the tables created by the EF by default?

Can you rename the tables created by the EF by default? When creating a project with some authentication mechanism, a number of tables corresponding to the logeo system are created automatically.     
asked by 19.06.2018 / 01:00