Posts by Lucas • 428 points
18 posts
-
2
votes1
answer222
viewsA: Asp.net Sqlexception: The INSERT statement conflicted with the FOREIGN KEY Constraint
Error occurred in your back-end (Server). Apparently, at the time of insertion, you are trying to reference an ID that does not exist in the Enterprise table. Make sure the ID you are trying to…
-
1
votes1
answer393
viewsQ: How to create composite key in Mongodb
How can I create composite key in Mongodb and use in C#?
-
0
votes2
answers58
viewsA: Exception Handling at MODEL
You can use the AddModelError. With it, an Alert will not be displayed with the error message, but the error will be displayed on the screen equal error handling which are made in inputs. On your…
-
2
votes1
answer47
viewsA: How to use AJAX that takes the value of a field for a select and returns to a modal in a partial view?
On your View line, put the action onclick="Search()" <span data-toggle="tooltip" data-placement="top" title="Informações do BIC"><i class="fa fa-info-circle btnModal"…
-
1
votes1
answer69
viewsA: Div is ignoring the padding of the parent element
Padding is being done. It turns out your header is overwriting it. Take a test, put a bigger padding on top: style="padding-top: 200px;"
-
2
votes2
answers75
viewsA: Entityframework recursive query triggering Exception
When you use the method Single() and the query does not return 0 or more than 1 record, an Exception occurs. Make sure that’s what happened. If the field you are looking for is a key Primary, you…
-
1
votes2
answers214
viewsA: How to perform a search with an interval between one and two dates in Asp.Net Core 2.2
Turns out I’m comparing one Datetime with Datetime.Toshortdatestring(). To make comparison, it is necessary to normalize the objects that will be compared. Try it like this: var applicationDbContext…
-
1
votes3
answers653
views -
1
votes1
answer43
viewsA: How to replace with null or blank values
You can do the validation directly on C#, but in this case, the HTML control would be on the server. Example On the server, would be the validation part and makes the insertion of content HTML or a…
-
4
votes1
answer28
viewsA: locate index where a value is within the limit of two values of the array
Your json is not formatted properly, there are syntax errors. For it to work use: var array =[ { start: 236.6, end: 239.42000000000002, value: 'hello word' }, { start: 239.42000000000002, end:…
-
0
votes1
answer378
viewsA: How to pass javascript values to C#
To parse correctly, you must put the same name in the attributes (Model/View). This line: beneficiarios.push(JSON.stringify({ "cpf": lista[i].cells[0].innerHTML, "nome": lista[i].cells[1].innerHTML…
-
1
votes1
answer252
viewsQ: Git - How to change a commit message
I did the following: Git add . //Adicionei todos os arquivos alterados Git commit -m 'mensagem que quero editar' Now, before I push, I want to edit the message from this commit. How do I? UPDATE I…
-
1
votes1
answer40
viewsA: refer to the logged in user’s id if missing
You are not returning the company to the View. Try to do so: // GET: Empresas/Create public async Task<IActionResult> Create() { _logger.LogInformation("Nova empresa"); var usuario = await…
-
2
votes1
answer129
viewsA: Instantiating generic type of an Enum
You can exchange the "ifs" for switch case. Example: //Enum com os tipos de carros public enum CarroEnum { BMW = 1, Ford = 2, Audi = 3, Toyota = 4 } //--------------Implementação do enum //O Enum…
-
1
votes2
answers442
viewsA: Help with MVC Pick up checkbox value and send to bool variable controller
How are you sending this form to the controller? You have to assign the value true to the checkbox before sending it to the controller. You can use a js function. Example: $(document).on("click",…
-
2
votes2
answers68
viewsA: Get only first item from a sublist Vuejs
In this case, items is not a list. It represents a single object from a list conteudos.. Try to change the {{items[0]. name}} for {{contributors[0]. name}}…
-
0
votes1
answer110
viewsA: How to call ng-Blur query function before printing from PDF in Angularjs
Before executing the code that prints the PDF, you can call the method to load Myfolder(). This way, it will execute the method to load NomeSicli(), then print PDF functionality
-
0
votes1
answer159
viewsA: Make a select in the database and prohibit the insertion of repeated C# SQL Server data
You can do it 2 ways. When creating the table, Voce can mark the CPF field as Unique. This way, the validation will be on the side of the database. Before registering in the bank, Voce can make a…