Posts by Pablo Tondolo de Vargas • 5,444 points
213 posts
-
11
votes4
answers7973
viewsA: Do you read XML Nfe?
The best way to work with Nfe is to use the serialization and deserialization of objects. But in order to deserializar the Xmls of an Nfe, we first need to create the classes according to the XML…
-
2
votes2
answers808
viewsA: How to use Filter in Folderbrowserdialog
Well, since that example also worked for me, I think it’s a little better than using recursion. public List<string> listaArquivos(string dir) { List<string> lstFiles =…
-
6
votes2
answers1480
viewsA: How to edit a list in C#?
Well, @Maniero beat me to it, but I’ll post a solution as well, because I made some changes mainly in the choice of options. class Program { static List<Cliente> ClienteList = new…
-
1
votes2
answers1179
viewsA: Insert image into SQL database SERVER2008 using image path
So I suggest you use a variable in your form to save the image path, in my idea would be something from tip string caminhoImagem = ""; private void button1_Click(object sender, EventArgs e) { if…
-
1
votes3
answers7352
viewsA: Query Status Nfe C#
Cristiano, from what I see you are trying to mount on the arm the settings of Endpoint and of Binding, I’ve worked a little bit to be able to do that, because it has a lot of settings that are made…
-
1
votes1
answer3455
viewsA: Print Reportviewer report directly, without preview
So I use the following code to generate the PDF LocalReport relatorio = new LocalReport(); relatorio.EnableExternalImages = true; relatorio.ReportPath =…
-
3
votes1
answer257
viewsQ: Inheritance with Repository Pattern
I’m studying and trying to implement the Repository Pattern in C# however I am having some difficulties in solving certain problems with inheritance among my classes of Repository, for example the…
-
2
votes1
answer2032
viewsA: Exclusion of records in cascade tables
The best solution then is to change your FK so that it is delete cascade ALTER TABLE [dbo].[TermoExpressao] DROP CONSTRAINT [FK_TermoExpressao_Termos1] GO ALTER TABLE [dbo].[TermoExpressao] WITH…
sqlanswered Pablo Tondolo de Vargas 5,444 -
1
votes2
answers92
viewsA: Setar schema in query with Repository
@Rod I would define this schema in the mapping of my entity. That could be passed as parameter to Context. Would do something like public class MeuContext : DbContext { string _schema = ""; public…
-
1
votes2
answers703
viewsA: Error reading html page with Html Agility Pack
I’ve been doing a simple html and csv reader, where I found the same problem. I solved my problem by replacing the UTF8 for iso-8859-1, then I suggest you replace your Enconding as follows Code to…
-
3
votes2
answers243
viewsQ: Regex between words
I’m trying to make an appointment Regex return to me in a source code file statements that are not public %%Enum Tipo, but I’m not very familiar with Regex and I’m having a little trouble, someone…
-
1
votes1
answer67
viewsQ: Entity Framework Navigation Property
I am trying to execute the following code, but it is giving error where it is trying to re-enter the state in my bank, however it was searched through another connection I know that a solution would…
entity-frameworkasked Pablo Tondolo de Vargas 5,444 -
5
votes4
answers4043
viewsA: Best practices in using BD connections via Entity Framework
A long time ago I studied and read a lot about the use of Entityframework and arrived at a programming methodology, where I instate the context in each method, passed, if necessary, the context by…