Questions tagged as 'c#'

0
answers

static dbContext with Entity Framework: Compensates or not?

Well, I use the Entity Framework and Code First to manage my data access, and I'm thinking of working with a single, static, global instance of my DataBaseContext. But I have two questions: What problems could occur with this type of usage?...
asked by 23.10.2017 / 18:45
2
answers

Multi threads C #

I would like to create a program to act on multiple threads in a process, leaving it faster, that is, the threads working together to finish the service faster. But each one works individually in the process. Sample code: class Program {...
asked by 24.10.2017 / 16:17
0
answers

How to kill this printing process of mozilla?

I need a C # code that kills this printing process, or at least the process name.     
asked by 23.10.2017 / 12:43
0
answers

How to delete registration with modal?

I've been tinkering with ASP.NET for some time, and I came across a problem I can not solve. The idea is to just open a modal window, click on the confirmation and delete a record. The idea of this code is for testing only, if I can make it work...
asked by 23.10.2017 / 14:37
1
answer

Doubts getting the value of a radioGroup to send in an email

Hello, in my code I have 4 RadioGroups and I will pass the value of them in an email. So far so good, but in my code I can not (I do not know how to do) send only the text of the RadioGroup that was selected. Currently I'm kind of forcing the...
asked by 23.10.2017 / 16:11
1
answer

PrintPreviewDialog in browser

I have the following code in an MVC project inside a cshtml: var w = window.open('', "print", "height=400,width=600"); w.document.write(json.html); w.document.close(); w.setTimeou...
asked by 25.10.2017 / 19:11
1
answer

Link line from the txt file to the one selected in my chelistbox

My code brings the content of a txt file inside a checklistbox. Each line of this file (it's also a line in my checklistbox) is the contents of a variable that I'll swap in a Word document. I need that when selecting in my checklistbox the (name...
asked by 25.10.2017 / 20:30
1
answer

Socket Whitelist IP accepted connection C #

I'm trying to make a Socket (Server -> Client), however I want to make a whitelist of ip that can be accepted in the client connection to the server, however I do not know how, Server check if the ip that is in the "whitelist" that will be an a...
asked by 01.11.2017 / 15:42
1
answer

How to manipulate data inside pages using tabcontrol

Good morning. I have a tabcontrol with two pages, I think we can say so, on page 1 I have a datagridview that in column [0] brings numbers of notes, and on page 2 I have a txtbox that I want to be filled with the value that I select on the page...
asked by 26.10.2017 / 19:55
1
answer

Sort a list of objects by a string list

I would like in the GetAll function to already bring the list of posts in order according to the list of IDs passed by the module.Higlights List<Post> posts = new List<Post>(); var posts = PostService.GetAll(module.Highlights...
asked by 27.10.2017 / 03:16