Posts by Gustavo Pisani • 101 points
5 posts
-
0
votes4
answers65
viewsA: After error in database insertion through c# I cannot insert remaining lines
foreach (var prod in PROC.Produtos) { if (string.IsNullOrEmpty(prod.CodExterno) || prod.Quantidade < 1 || prod.PorcentagemDesconto < 0) { literalTabelaImportacao.Text =…
c#answered Gustavo Pisani 101 -
5
votes1
answer395
viewsA: C# String.Contains() does not work, not even string search derivatives
My problem as simple as it may seem has taken me a while that I hope to spare you with this answer. The great mystery about these comparisons and looking for string inside another string or whatever…
-
1
votes1
answer395
viewsQ: C# String.Contains() does not work, not even string search derivatives
I have a method in my code that looks for a person’s name inside a string but always returns false. Even when the name exists inside the string. What is totally inexplicable. I tried using Contains…
-
0
votes1
answer172
viewsA: Is it right to create a viewmodel for registration (post) and another for consultation (get) of a User entity?
If you are in search of security for your Web.Api, hiding only the password is not the only thing you should do. And if you take into account the concept of DRY having two exactly equal entities…
-
4
votes4
answers1392
viewsA: Return True or False in jQuery’s Success
Try it this way: in JS, directly validate the returned object and in C# return the boolean without creating an object to store this value. As in the example I left below and see if it works:…