Questions tagged as 'c#'

2
answers

Does it make sense to use an api to access another api? (bematec one in case)

I was asked to make an API here where I work to be able to integrate some systems with nfce. For that, they hired the api one. More information here: link . The real question is how and why should I make an API to access another API? Would n...
asked by 17.08.2018 / 20:30
1
answer

Returns Excel in List C # is returning null

This code reads a Excel file and throws a list, the problem that is occurring is it is returning null , as if there was nothing in it Excel , but the column names are correct: string PathConn = "Provider=Microsoft.ACE.OLEDB.12...
asked by 01.10.2014 / 17:18
1
answer

How do I create an NxN relationship in the IdentityRole class with a class I created?

I have an automatic mapping of Controllers and its Actions that I execute at application startup (file Global.asax ). I use this to give the user permission to the given Controller x Action if he has that combinatio...
asked by 30.09.2014 / 00:46
2
answers

LogOff with bank registration and cookie deletion behind Session_End () in Global.asax

I'm needing help with a project I've been breaking my head for two days. I am using Microsoft C # MVC5 technology and framework 4.5, I also use Entity Framework 6 with Repository Pattern, Unit of Work, and Unity to perform the dependency injecti...
asked by 09.10.2014 / 22:20
2
answers

Change a detachable PDF field

I'm working on MVC 4 and I've installed iTextSharp to create PDF's, so far so good. But what I'm doing is replicating a PDF that already exists, to fill in the required fields in this my created PDF. Doubt now appears: The PDF I am rep...
asked by 27.02.2014 / 12:17
1
answer

POST model arriving null in controller

I have a complicated problem in my code that I can not solve. Initially, I have a function SubmitUsuarioRegistro of JavaScript that performs the post of the user profile, forwarding the information to controller . This code was...
asked by 11.06.2018 / 04:43
2
answers

How to put between inside a query in code?

I have the following query and would like to put in the Where clause the condition of being within a certain period. public static DataTable stCloseCaseAll(int schoolId, string dataInicial, string datafinal) { var sb = new StringBui...
asked by 15.05.2014 / 19:41
1
answer

How to work with more than one dependency in Service class?

I have my class Service called GrupoService , in it are most actions that refer to Grupo . Crud(Inserir,Alterar,Excluir,Listar) The only dependency I have on my class so far is GrupoRepository . You also have in it...
asked by 16.09.2014 / 22:58
1
answer

How do I make a date annotation, can access value of another property?

I have my following properties: public ETipoPessoa TipoPessoa {get;set;} public string CnpjCPF {get;set;} public enum ETipoPessoa { Fisica, Juridica } I have this condition, if TypePerform = Physical, I need to pass an annotation...
asked by 17.09.2014 / 03:35
2
answers

How to transform a byte array into an image in WPF?

I have an array of bytes like this: private byte[] m_Frame I need to turn it into an image, but since I'm in a WPF it's not possible to just play a bitmap within a PictureBox because that element simply does not e...
asked by 27.06.2018 / 19:42