Posts by Raphael • 477 points
45 posts
-
0
votes1
answer89
viewsQ: Get last day of the week returns date equivalent to one more day
To obtain the first day of the week of the date 07/10/2020, I used the function startOfWeek of the date-fns library. Thus, returned 04/10/2020, which is right. const primeiroDiaSemana =…
-
-1
votes1
answer119
viewsQ: I cannot render elements dynamically using foreach
I wonder if you have how to render the component Drawer.Screen inside Drawer.Navigator, dynamically. I tried to put the components in an array (materias/index.js) and traverse them with .forEach(),…
-
-2
votes1
answer251
viewsQ: Pass parameter to Tab.Screen component
How to pass parameters to the Tab Screen component? Fiche/index.js: import Historico from './Historico'; export default function Ficha({ route, navigation }) { const { periodo } = route.params; //…
-
0
votes1
answer174
viewsQ: Isolate presentation layer domain
Good software architecture practice says that the presentation layer does not You must know the domain layer. I’m trying to make this isolation between these layers, but the that is hindering this…
-
0
votes1
answer89
viewsA: Adminlte: jQuery Collapse
I removed the "item-collapsed" class, wrapped in the "divItens" div and added the "btn-expand" class to the button. Then I applied the following jQuery: $("#divItens").delegate(".btn-expandir",…
-
0
votes1
answer89
viewsQ: Adminlte: jQuery Collapse
I am trying to use the "box Collapse" of the Adminlte template (figure below), but when rendering dynamically it does not expand by clicking on the '+'. I’m using the code below in a Partialview. I…
-
0
votes0
answers760
viewsQ: ASP.NET MVC: Problem when assigning decimal value
Fichaviewmodel.Cs [Required(ErrorMessage = "A altura é obrigatória.")] public decimal Altura { get; set; } fiche.js $("#Altura").mask("9.99"); Fichacontroller.Cs [HttpPost] public ActionResult…
-
1
votes0
answers487
viewsQ: ASP.NET MVC 5: Link two models in the view
I have the following scenario: Agendaviewmodel.Cs public class AgendaViewModel { [HiddenInput(DisplayValue = false)] public int Id { get; set; } [HiddenInput(DisplayValue = false)] public int…
-
0
votes1
answer88
viewsQ: Entity Framework 6: Context Management Problem
I have the object Agenda and create it as follows: public class Program { public static void Main(string[] args) { var clienteDAO = new ClienteDAO(); var treinoDAO = new TreinoDAO(); var agendaDAO =…
-
-1
votes1
answer151
viewsQ: Entity Framework 6: Error getting SQL Server record
I can enter records in the bank normally, however, when trying to get, it gives error in EF. public class Program { public static void Main(string[] args) { new…
-
0
votes0
answers470
viewsQ: Entity Framework 6: Connection Error
I created a project with Entity Framework 6 and another Console Application type project, containing the following connection string in the App.Config file: <connectionStrings> <add…
-
0
votes1
answer231
viewsQ: Primefaces (Tabview): Null properties when saving
I’m using a Tabview with two tabs and each tab with an external file with fields. By clicking the "Save" button the attributes are coming as null. Follows the code: Clientescadastrados.xhtml: ...…
-
1
votes1
answer799
viewsQ: Primefaces: Modal dialog does not open
I am trying to open the dialog of the first faces, but without success. I have the following code: Clientescadastrados.xhtml: ... <ui:define name="content"> <h:form…
-
1
votes1
answer275
viewsQ: JSF: How to Reference Managed Beans
I’m starting to study JSF and soon came to me the question of how to reference the View (JSF) with Managed Beans. Because in the examples I see I can’t understand how JSF can see the Bean. For…
-
0
votes0
answers46
viewsQ: ASP.NET MVC: Model Binding problem
I’m passing an object that has following property to Action: { ... Valor : "3500.00" } Financapessoalviewmodel: public class FinancaPessoalViewModel { ... public decimal Valor { get; set; } }…
-
0
votes0
answers716
viewsQ: HTML and CSS: Insert span into Option Select
I’m trying to do the following Select: I tried to do it this way, but I couldn’t: HTML: <select class="form-control"> <option> <a title="Alimentação"> <span class="color"…
-
1
votes0
answers62
viewsQ: HTML and CSS: Custom Component
I found the component below on a website and would like to learn how to do it. Does anyone know of any tutorial that will teach you? When you hover your mouse over it: I saw this component on the…
-
1
votes1
answer593
viewsQ: Pagedlist: Data Pagination with Ajax
I’m using Pagedlist with Ajax, but I can’t change the page because when I click on the button, which represents the page, the value that is going to the controller is null. I made the following…
-
0
votes1
answer1420
viewsQ: jQuery: Remove table row
I am trying to remove the rows from the table where, in the Employee column, the name does not contain the "oã" sequence, as I did in the code below. The problem is that even returning false to the…
-
1
votes1
answer1135
viewsQ: Change the position of the button next to Carousel Bootstrap
When decreasing the size of the slide appeared the following problem: The positioning of the "next" button is away from the slide, as in the image below. I want it to be on the far side of the…
-
0
votes1
answer164
viewsA: Problem using jQuery UI in ASP.NET MVC
I managed to find the problem! Even though jQuery was loaded first, my script could not find the function, as I was not passing the '$' in the parameter function of my script: (function($){…
-
0
votes1
answer164
viewsQ: Problem using jQuery UI in ASP.NET MVC
I am trying to add the jQuery UI "Autocomplete Combobox" to my ASP.NET MVC project, but it says that the widget function is not a function. jquery-3.1.1.min. js: 2 jQuery.Deferred Exception:…
-
0
votes1
answer1417
viewsQ: Editable combobox with filter
I wonder if there is a plugin or a tutorial teaching to create a combobox that allows, as you write on it, filter the items, as in the image below: Note: I am using ASP.NET MVC with C#.…
-
1
votes1
answer386
viewsQ: Entity Framework 6: Select Error
I’m having problems with Entity Framework 6 with Code First. The operations of "Select" give error and EF6 does not specify the exception, as shown below: Error message: An exception was triggered…
-
0
votes1
answer652
viewsQ: Ajax redirection on ASP.NET MVC
I’m using Ajax to save the form data. The problem is that after saving the data have no way redirect to the "Action Index" where customers are listed registered, because the request was made in…
-
2
votes2
answers210
viewsQ: Entity Framework 6: Provider Error
I am using EF6 Code First. While performing "Update-Database" the database is normally created. But when entering the data the following error is launched: No Entity Framework Provider found for the…
-
5
votes2
answers474
viewsQ: Validation without "Modelstate.isValid"
I have the following scenario: [HttpPost] public PartialViewResult Create(string dados) { var clienteViewModel = DeserializeJson<ClienteViewModel>(dados); if (ModelState.IsValid) { } // Não…
-
0
votes0
answers45
viewsQ: Bootstrap: Resizing the figure
I have the following HTML code: <section class="container sobre-site"> <h2 id="sobre-site-id" class="subtitulo">Título</h2> <figure class="thumbnail"> <img…
-
2
votes0
answers450
viewsQ: Standard for the use of logs
I have a project organized as follows: 1. Web (ASP.NET MVC) 2. Application 3. Domain 4. Infra.Data 5. Infra.Log (NLog) 6. Infra.IoC The project references are as follows: - Web --> Application -…
-
1
votes2
answers2406
viewsQ: Generation of Logs with Nlog?
I’m using the Nlog, and for each client logged into the system I would like to create a log generation behavior as follows: [nome-cliente-1]-[dataAtual].txt [nome-cliente-2]-[dataAtual].txt Ex:…
-
0
votes2
answers98
viewsQ: EF6: Error while Saving
I have the following scenario that I’m in trouble: Category: public class Categoria { public int Id { get; set; } public string Descricao { get; set; } public virtual ICollection<Produto>…
-
0
votes0
answers117
viewsQ: ASP.NET Identity: Authentication Error
I changed the PK of the Identity tables from string to Int, however when logging in Identity does not authenticate, log in normally but do not have access to any of the controllers that requires…
-
1
votes1
answer164
viewsQ: Entity Framework Contexts Error
I’m using two contexts of the Entity Framework, one for the Identity (which is in the cross Cutting layer) and another for my application (in the Data layer), both point to the same database. Date…
-
0
votes1
answer234
viewsQ: Separation of Identity Bank from Application
When using Asp.net Identity, a single bank is generated. And it is recommended to leave this bank only for Identity and create another bank for your application, as I read in some articles. So far…
-
0
votes1
answer220
viewsQ: Concurrent Use in Asp.net Applications
I’m starting to study programming in Asp.net mvc (and trying to follow the DDD) and, with this, I came up with a question regarding the concurrent use: Asp.net already performs this control for me…
-
1
votes1
answer159
viewsQ: Asp.net Identity: Registry error
I created an Asp.net MVC project with the authentication "Individual User Accounts" and then ran it and went to try to make a record, but the following exception was released on line 155: Linha 154:…
asp.net-identityasked Raphael 477 -
2
votes3
answers13362
viewsQ: Carousel Bootstrap: Change Size
I’m trying to add my images, which have 700 x 400 dimensions, to the bootstrap Carousel. And I wanted Carousel to have exactly those dimensions, too. However, when I try to do this, the image…
-
1
votes1
answer113
viewsQ: Entity Framework 6: Removal method does not work
I’m trying to delete an object using the Repository Pattern, but the problem is that when calling the method for removal nothing happens, nor throws exception. Financeirocontroller.Cs: [HttpPost]…
-
1
votes1
answer76
viewsQ: Doubt in the Representation of Use Cases
Of the link Abstraction Difficulty in Use Cases, I made the following interpretation: "Only the attendant can confirm the dispatch of the order, but for this it is necessary to have the completion…
-
0
votes1
answer1423
viewsQ: Doubt about CRUD Use Cases
I have the following question about CRUD Use Cases: It is said that you should not create several use cases representing each operation of the CRUD, and one should create only one use case for it,…
-
2
votes1
answer2200
viewsQ: Abstraction Difficulty in Use Cases
I’m starting to study Use Cases and I came up with the following question: Difficulty of abstraction: I often confuse when creating several use cases but that in fact would only need one, because…
-
0
votes0
answers70
viewsQ: Entity Framework 6: Error saving - Instances of Ientitychangetracker
Domain public class Agenda { public int Id { get; set; } public DateTime Data { get; set; } public string HoraInicial { get; set; } public string HoraFinal { get; set; } public string Local { get;…
-
0
votes1
answer209
viewsQ: Entityframework 6: Doubt to Persist a Relationship N to N
Model: public class Agenda { public int Id { set; get; } public string Horario { set; get; } public string Local { set; get; } public virtual IEnumerable<Exame> Exames { set; get; } } public…
-
0
votes2
answers1186
viewsQ: Entity Framework: Object Update Error
I am unable to update my object. I created the method as follows: public void Atualizar(T obj) { banco.Entry(obj).State = EntityState.Modified; banco.SaveChanges(); } The following exception was…
-
2
votes1
answer493
viewsQ: Entity Framework: Error creating the database
I am using EF6 and I have a problem using the command Update-Database -Verbose -Force. From the following error: PM> Update-Database -Verbose -Force Using StartUp project…