Questions tagged as 'c#'

2
answers

Include DLL in executable

I wanted to know if it was possible to include the dlls in the executable in such a way that I was included in a single executable file in Visual Studio 2012 with C #     
asked by 30.08.2016 / 14:46
2
answers

Task.Factory.StartNew and blocking UI

I have a problem. I'm in a WPF application and I want to do a SQL query in the background, all this I already have, the problem that at the time of making the "query", the UI is branded and I do not know why, if I'm doing it in another thread ....
asked by 27.08.2016 / 20:16
1
answer

Call signalr hub from a modal window

I'm trying from a modal window to call the hub but it does not reach the hub, without giving any error Here the code: -Function hub: public void Estado(int estado, int id) { RepositorioVisitas.AutorizarCancelarVisita(id,estado);...
asked by 08.08.2016 / 14:51
1
answer

read a string from a file in c #?

I'm using this code to read a whole line in excel, but I want to read only one cell or a string System.IO.StreamReader file = new System.IO.StreamReader(@"c:\Users\Public\TestFolder\Base.xls"); line = file.ReadLine();     
asked by 17.07.2016 / 17:25
1
answer

How can I perform calculation operations with data obtained from a .txt file in C # implementing the StreamReader class?

How can I perform calculation operations with data obtained from a .txt file in C # implementing class StreamReader ? The data is in the form of a table of employees with their respective salaries and hours worked in a text file. Wha...
asked by 19.07.2016 / 15:21
1
answer

How to know without a "remove" in my driver was rejected because of a foreign key violation?

how to tell the user that a record has not been deleted because it has other entities that inherit its primary key by means of try / catch? try { db.usuarios.Remove(usuario); } catch(?????) { ??????? }     
asked by 17.08.2016 / 21:13
3
answers

Query Variable EntityFramework

I want to bring only some fields of what the consultation brings me, var result = dbContext.Cliente.Include("Contacto.Cliente").ToList(); this brings me the following: "Objects": [ { "IdCliente": 3, "Identificacion": 10, "Nombre":...
asked by 02.09.2016 / 20:34
1
answer

Hide URL in browser address bar

I have an application in aspx and I use the bootstrap navbar to build the navigation menu, my question is how can I hide the url in the browser so that each time I change the page does not appear the route, I the menu is dynamically assembled fr...
asked by 26.07.2016 / 01:40
1
answer

iTextSharp extract pdf text by coordinates

I am trying to extract the text of a PDF by coordinates in a visual way public override void BeginGetText(Image page, uint pageNumber) { _PageNumber = (int)pageNumber; using (PdfReader reader = new PdfReader(Fi...
asked by 27.07.2016 / 07:48
3
answers

Read an xml and show it in a listbox

What I want is to show it from a listbox the code that I show you in the image to forgive but I can not put it as a code because otherwise the labels are not shown. And I want to show the description and the name of the class. Code xml <...
asked by 26.07.2016 / 18:55