Questions tagged as 'c#'

1
answer

Update User Role ASP.NET Identity

Hello everyone, I'm finding it difficult to update the user role when updating my data, my roles are being filled through a ViewBag in my get from my controller and I'm retrieving the new ID in the post from my controller through the request. fo...
asked by 14.12.2018 / 21:53
1
answer

EFD-Reinf - Invalid batch version. Version 1.04.00 should be used

I am generating the R-1000 record for sending test in the EFD-Reinf restricted production environment, and I already got help here in the same SOpt: How to consume EFD-Reinf's WebService in C #? (Shipping Events) . I was able to successfully...
asked by 21.11.2018 / 18:10
1
answer

What does it mean (Char) 0 / (Char) 8 / (Char) 13?

I'm doing a shopping program and found it on that same site. The answer to a problem I had, but I did not understand what the (Char)0 part would be, among others. I need to explain what this is. private void preVenda_KeyPress(object sen...
asked by 25.11.2018 / 11:34
1
answer

How to add values inside an array?

I have an integer value and need to transform into an array to do the sum of each of the elements individually. I did this (example): int n = 1230; string sn = Convert.ToString(n); //converte em string char[] narr = sn.ToArray(); //converte em...
asked by 26.11.2018 / 04:12
1
answer

How to execute a method at the initialization of ALL Controllers?

I have a static class that loads the language against the cookie stored or the URL. In every controller I have to insert the following method once: protected override void Initialize(System.Web.Routing.RequestContext requestContext) {...
asked by 28.11.2018 / 13:07
1
answer

Serialize everything in a single line

I'm generating an xml from an NFSe, but I need to generate everything on a single line, even when I generate the signature. When I serialize, I do this: StringWriter sw = new StringWriter(); XmlTextWriter tw = new XmlTextWriter(sw)...
asked by 28.11.2018 / 14:27
1
answer

Compare existence of record with date and future date

I have the following model public class AgendaExame { public int Id {get; set;} public int PacienteId {get; set;} public int ExameId {get; set;} public DateTime Data {get; set;} public DateTime ProximaData {get; set;} }...
asked by 28.11.2018 / 20:14
1
answer

Sending form with Asp net mvc5

Hello, I have a form to send where the button is outside the form, this form has 50 different fields, I made in html and I need to receive this data via post in a C # controller, however I have no idea how to receive these Can someone give me a...
asked by 28.11.2018 / 12:30
1
answer

Sum of a result of a SQLDataSource

I'm developing a report system for link control and I need to get the result of a query and make a summation that brings me the total number of links per sector of a given number. I'm using Stored Procedure with MySQL database and deve...
asked by 20.02.2014 / 20:55
3
answers

Log reading to infer counter

I have a template called Request and this template has a column called Number. This Number has the following structure: YEAR + COUNTER. It happens that whenever I'm going to create a new request I get the last request added in the data...
asked by 06.02.2014 / 19:01