Posts by Master JR • 1,853 points
173 posts
-
1
votes1
answer311
viewsQ: Button grouped into a field is going out of bounds and superimposing the field next to it
Greetings to all! I am using a theme called Remark that contains many ready elements. I am using a search box that contains a text field and a field form button. The problem is that the button does…
-
1
votes2
answers34
viewsQ: How to make buttons have the color defined in css when selecting Row in a datatable
When I select Row from my datatable, the delete button turns white and does not obey the green color I entered in css. When I place the mouse over and the button, the focus disappears and the green…
-
0
votes1
answer43
viewsQ: How to reuse an Enum on other screens containing some different properties
I’m working with a screen "Financial" and another screen "Financial Report". For the Financial screen, I created an Enum with the options "Accounts Payable and Receivables". public enum…
-
0
votes3
answers389
viewsQ: How to get the date of the first and last days of the current week with Javascript?
I need to get the date of the first and last days of the current week. For example, we are in Christmas week, and I would like the function primeiroDiaSemanaData() return 20/12/2020 and the function…
-
1
votes1
answer149
viewsQ: How to adjust the width of the jquery datatable to larger resolution screens
I’m having trouble displaying my datatable (empty) on screens with higher resolutions. I’ve tried using the class table-responsive-lg, but it hinders the responsiveness applied by the class…
-
1
votes1
answer32
viewsQ: On which project layer with DDD concept, should I create a function or routine for the reorganization of portions of a receivable?
I have an Asp.Net Core MVC project in which I am developing an Accounts Receivable. The whole project uses the DDD concept. I need to create a function to reorder the sequence of parcel records in…
-
0
votes0
answers18
viewsQ: How to manually initialize the jquery "selectable" plugin
The selection of the Rows from my datatables works perfectly (just click on the cells they are tarnished gray) when I use data-plugin="selectable" data-Row-selectable="true" directly in the html of…
-
0
votes0
answers40
viewsQ: Problems serializing a form and making a Viewmodel Post using Ajax - Asp.net Core MVC
I’m making a Submit using AJAX, but I’m having problems because it’s giving error 404 and I’ve tried to do several ways to use JSON.stringfy, use [Frombody] in the controller action, etc. Can anyone…
-
0
votes1
answer279
viewsQ: How to format a field from a Jquery Datatable to Money format using the Jquery Mask Plugin?
I need to format the fields of a DataTable jQuery for currency format, while loading the Datatable, but I’m not getting it. I’m using the Jquery Mask Plugin: { data: 'ValorParcela', title:…
-
1
votes0
answers46
viewsQ: When closing a bootstrap modal, the unobtrusive Jquery validation triggers unnecessarily
By clicking the Close button of the Modal window, the validation is firing and it does not close. Then, if I give another click, then yes, the modal window is closed. I confess that I am bothered by…
-
1
votes1
answer46
viewsA: Field with Datetime format does not change the format to Date - Asp.net MVC
I accidentally discovered the problem. I was calling a Modal window from another Modal. For some reason, Controller was not creating the Modal prefix that should be "Financeiroparcelaviewmodel".…
-
1
votes1
answer46
viewsQ: Field with Datetime format does not change the format to Date - Asp.net MVC
I need to show only the date format in a Datetime field, but only letters are appearing in the field (even if the value property contains a date). VIEWMODEL: [DisplayFormat(ApplyFormatInEditMode =…
-
1
votes1
answer25
viewsQ: How to position/align a field (which is inside a div) together with other Fields
Greetings to all! Within my "form-group Row" I am placing Fields with their respective sizes, however, in the middle of them (to be more specific, between the first and the third field) I created a…
-
3
votes1
answer187
viewsQ: How to interrupt the execution of jQuery each?
I have a problem going through Rows (from one DIV that is inside another DIV) with the method each. When a condition is true, I need to interrupt the loop and display a message to the user, but I’m…
-
2
votes1
answer288
viewsQ: Query two or more words in a string
I need to make mine select bring only records whose description has the words "RACAO" and "ROYAL". I’m using Regex to make it easier, but I don’t know why you’re bringing in records that have…
-
-2
votes2
answers365
viewsQ: How to check for spaces before, in the middle and at the end of a string using Regex in C#?
I need to check with regex so that only letters and numbers are allowed. The other characters such as ,.-*&%$#@; among others cannot be accepted. In the regex below, I’m able to validate it! I’m…
-
1
votes1
answer191
viewsQ: What type used in Postgre to save a large currency field in the format of 000,000,000,000.00
I am developing a web application in Asp.net and need to save a monetary value in decimal format in C# and store it in postgre in Numeric format, and the value is great. It’s a need that came up in…
-
0
votes0
answers89
viewsQ: How to order a Collection according to the Date and Time in C#?
I need to order the Personal Collection? You’re not ordering... Someone knows how to do this? public Pessoa GetJoinById(int id) { var pessoa = Db.Pessoa.Find(id); Db.Entry(pessoa) .Collection(x…
-
0
votes0
answers38
viewsQ: Why is my application logging out after saving a record? - Asp.net MVC and Identity
When I first created my app (Asp.net core MVC) Identity was installed automatically. All login features, user records, among others, were created automatically. When I log in using my email,…
-
0
votes1
answer101
viewsQ: How to set the change state of a checkbox switchery using Javascript and Asp.Net Core MVC
I have several checkbox switchery components that are automatically created in which I control the ID manually, in theory, a list of elements. I need to do the following: When unchecking one of the…
-
0
votes1
answer46
viewsQ: How to throw controller errors and capture them in an Ajax - Asp.net Core MVC request
I’m using AJAX to make a request and the return is a Partialviewresult. In the request, I am passing the personal model. Someone knows how to help me? CONTROLLER: [HttpPost]…
-
1
votes1
answer92
viewsQ: How do I open the body width of the modal-Fill-in using css
I am not being able to open the body width of the modal using css, because it is too narrow and the buttons are in a column (on each other). Someone knows me how to do? <div class="modal fade…
-
2
votes1
answer272
viewsQ: On which layer should I create constants in my application with DDD concept?
I’m using the DDD concept (Layers: Presentation, Application, Domain, Data and Crosscutting) in my ASP.NET Core MVC application and I was wondering about the best place to create my constants. In my…
-
1
votes1
answer20
viewsQ: How to remove parts of a field name in a serialized structure?
I am selecting my form to then convert it to JSON, and I need to remove the string "PessoaViewModel." of all Fields. The serialized data looks like this:…
-
-1
votes1
answer104
viewsQ: How to get the current value of a select in a Row using the JS or Jquery click event
Inside the div 'div-documents' I add Rows dynamically to user documents (CPF, CNPJ, etc.). For the select. sel-document-type I have one two events: Click (for me to store the value of the select…
-
1
votes1
answer36
viewsQ: Problems while removing Row using JS in Asp.net Core MVC
I have a dynamic address registration where the user adds and removes the addresses dynamically. Each Row that is added is inside the "div-addressees". I am unable to remove the Rows ('form-group…
-
1
votes2
answers298
viewsQ: Show/Hide Divs using functions - Javascrip and Asp.Net Core MVC
I have two Divs, whose contents will house some Fields specific to my page. I need to keep such Ivs always hidden, so that when necessary, I hide one and display the other and vice versa. For this,…
-
0
votes0
answers86
viewsQ: How to get back Task<int> of a function (Mediatr) - Asp.net Core MVC
How do I get the entire value returned through a Task? I have tried several ways, as I have seen in forums on the net, but I could not. I tried to use var customerId =…
-
0
votes1
answer81
viewsQ: Viewmodel is NULL when performed a Submit in the Main View - Asp.Net Core MVC
I have a Viewmodel (FilialViewModel) who owns a property of the type PessoaViewModel. The main view is linked to the Filialviewmodel and whenever I make a Submit, the property of the Personal type…
-
0
votes0
answers62
viewsQ: Data Format (Dataannotations) does not work - Asp.net Core
I’m having problems with displaying a datetime format. I get the "03/12/1980 12:34:09", but only the input mask appears. How to make the date appear along with the time? Thank you :)…
-
2
votes1
answer125
viewsQ: How to map a relationship using EF Core
My Pessoa entity may also be an Employee entity. I have the need that, whenever I register a Person, I must inform the Employee who registered it, being Person as Primary Key and Personal Key as…
entity-framework-coreasked Master JR 1,853 -
1
votes1
answer81
viewsQ: How to pass an Enum type parameter together with the Model for a Partialview - Asp.net Core MVC
I’m having a hard time passing an Enum parameter to a Partialview using Viewdata. It is giving conversion error (in Partialview), because the received type seems to be string or other type and is…
-
2
votes1
answer44
viewsQ: Problems creating items from a dropdownmenu submenu using Javascript
I have a dropdownmenu that works normally when I load it using Asp.net core + Razor. Inside it I have the submenus Phones and WEB... When I try to recreate the submenus due to an app need, their…
-
1
votes1
answer199
viewsQ: What is the difference between parameters and attributes when creating tables in a system?
I am a data migrator and every day, I have the pleasure and displeasure to know numerous databases of the most varied commercial systems in the market. My doubt lies in the way people model the…
-
1
votes2
answers92
viewsQ: How to back a label against a Checkbox
Sorry for the simplicity of the problem, but I don’t know how to do it properly... I need to align the second label according to the image below where I indicated red. It needs to be indented and…
-
1
votes1
answer64
viewsQ: How to return the numeric value of a Selectlistitem C#
I need to return a List Selectlistitem where the value property of each item returns the value of Enum (1, 2...) and not the name of the property (physical, juridical...). How do I do that? Function…
-
1
votes1
answer156
viewsQ: Entity Framework Core - Composite Key
Until version 1.0 of EF Core I was having problems doing UPDATE on a database record that contained a composite key. If I tried to change the ID value of one of the compound key fields, it was not…
-
0
votes1
answer189
viewsA: How to change the Text and icon of a label using JS or Jquery - Asp.Net MVC
After a lot of research, I found a solution to my problem and I hope that it can help those who need it in the future: SOLUTION: $('#div-enderecos').on("change", ".sel-endereco-tipo", function (e) {…
-
0
votes1
answer189
viewsQ: How to change the Text and icon of a label using JS or Jquery - Asp.Net MVC
I need to set the description (EnderecoTipoDescricao) and the icon (icon fa-home) at the event change of a SELECT. For each Row the "Addressdescription" field has an id whose index is incremented:…
-
0
votes1
answer80
viewsQ: How to set variables with JSON received from an AJAX request
I am receiving a JSON and would like to set variables with such information. How do I do this? $.ajax({ url: "/pessoa-gerenciar/consultar-codigo-postal", type: "GET", data: { codigoPostal:…
-
1
votes1
answer230
viewsQ: How to run an Alert only once in an Asp.net MVC View
I have a project in Asp.net mvc and in my view has an Alert that runs whenever the page is loaded (it closes automatically). The problem is that every time I make a Submit and the view is reloaded,…
-
1
votes2
answers278
viewsQ: Why is GIT ignoring one folder and others not within wwroot?
I’m new to git and I’m using it to control an Asp.net core project in VS 2017. I set up the file. gitignore, but I’m having trouble creating folders. I created, within the wwwroot directory, a…
-
0
votes1
answer300
viewsQ: How to apply Date/Time format in a Datatable column?
I have a Datatable component and would like to format Target[4] with a date/time format (ex: 12/09/2019 14:23:00), as it is coming from the bank with a very large format. Someone knows how to help…
-
1
votes1
answer63
viewsQ: How to align an image within an Alert Bootstrap component
I need to align the image horizontally and vertically in the center of the Alert, but I’m not getting it. I tried to use a 100 padding (as an example) to demonstrate that the image moves... I would…
-
1
votes1
answer57
viewsQ: Problems creating Postgre backup on Asp.Net MVC
I didn’t find much information about creating Postgre backups with C#, so I created this post. The process is simple... I am creating a process that executes a command and passes some parameters…
-
0
votes0
answers28
viewsQ: Problems with horizontal Nav-tab
I have a vertical Nav-tab component that works properly. When I add a horizontal Nav-tab inside a tab, it takes the shape of vertical. Does anyone know how to fix this? I’m using a bootstrap…
-
2
votes0
answers37
viewsQ: Problems validating radio groups with Javascript
I need to validate a set of radio groups so that at least one is selected by the user. If I select nothing and click the Next button, the validation seems to work. The problem is that if I then…
-
0
votes1
answer188
viewsQ: How to implement a text file export/import layer in DDD and how it will relate to the other layers
I’m basing myself on an Eduardo Pires project Here and I have some questions about implementing a unique layer for importing and exporting database information in csv, txt, xls, among others. For…
-
1
votes0
answers61
viewsQ: How to Truncate decimal values in C#
I am trying to truncate the values (without rounding) according to the number of decimals passed per parameter, but the Math.Truncate function does not have this feature... Is there any way I can do…
-
1
votes0
answers62
viewsQ: How to open the same Modal Bootstrap window (cascaded) several times with different contents?
I am a layman in web programming and I am working with bootstrap modals windows in an Asp.net MVC project. I come from the Desktop world and I confess that I am having difficulties with the…