Questions tagged as 'c#'

1
answer

open a new window by clicking on a button in c #

I am trying to create a new function for a web application that I have been creating in C #, what I need to do is that by clicking on a button called guardar , the action of saving the data is performed and apart from that opens a n...
asked by 08.06.2018 / 17:16
1
answer

How to update the properties of the elements of a list using Linq?

Good day community, there is a common scenario and I have not seen any similar question, so I will share the solution right away. Basically, we have a list of elements and we want to update one particular property using Linq . using S...
asked by 09.06.2018 / 00:12
1
answer

Retrieve DateTime SLQserver in DGV VS

I have a problem when it comes to showing the time record, everything works perfectly, except when the date is 00:00 (right at midnight). Example of this case; 2018-07-26 00:00:00.000 The value recovers well in the program b...
asked by 24.07.2018 / 08:55
1
answer

async method inside a controller, webApi

I hope you can understand my question. From an Angular application I am consuming a service, the service waits the answer of another URL and depending on that answer certain instructions must be executed but in an ASYNCRONA way, for example if t...
asked by 28.06.2018 / 01:01
2
answers

Convert DbSetT to different data type in EF - Linq

I'm working on an expression Linq in which I get an object of DBContext , and I want to convert it into an object of ViewModel My ViewModel receives as parameter an object obtained from DBContext to work the...
asked by 27.06.2018 / 14:29
1
answer

Type used in a using statement must be implicitly convertible to System.Idisposible

I want to create an object of type HistoryDA to then send a method call of that object, but I mark the following error when trying to do it: Type used in a using statement must be implicity convertible to System.Idisposible Class Code Histo...
asked by 09.05.2018 / 19:37
2
answers

Asp.net C # identity 3 layers - session replacement in VS 2017

Query, formerly when I was programming in asp.net form, I did it with sessions, now that I am working with asp.net mvc 5 in n layers, how can I get, for example, the ID or Full Name of the user logged in from any part of the application?     
asked by 09.05.2018 / 07:24
1
answer

How to print a very long Ticket using PrintDocument

I'm trying to print a ticket on a thermal printer, the information that the ticket must contain is enough so the ticket has a considerable length. I'm using a PrintDocument object to print the ticket, in the PrintPage event I use a Graphics obje...
asked by 10.05.2018 / 00:44
1
answer

Receive and display an array of C # in JavaScript

I have an array of C # that I need to show when I enter a certain page. I am making a request with AJAX to receive this data. $.post({ url: '/Home/MostrarArray', success: function (datas) { console.log(datas);...
asked by 09.05.2018 / 11:12
1
answer

Return to previous form

Having a main form with a button with which I access the second form, how can I return to the main form by closing the second form with the x button? Form1: private void buttonEnterAdmin_Click(object sender, EventArgs e) { this.Hide();...
asked by 30.04.2018 / 22:21