Posts by Hermes Autran • 899 points
38 posts
-
1
votes1
answer321
viewsA: How to create an http request in c# Asp.net
I did the example below, getting the return from the server. Is returning a credential error message, you probably have to register and use the credentials provided by the service to make a test…
-
2
votes1
answer116
viewsA: Do not colorize current date with Fullcalendar
You can use the code CSS below to overwrite this configuration: .fc-today { background: #FFF !important; border: none !important; border-top: 1px solid #ddd !important; font-weight: bold; }…
-
-1
votes2
answers415
viewsA: auth::Attempt method is not logging in
You can define a accessor in his App User.php. /** * Get the password for the user. * * @return string */ public function getAuthPassword() { return $this->senha; } This response was based on the…
laravelanswered Hermes Autran 899 -
0
votes1
answer71
viewsA: How to put the zerofill Constraint in Laravel 5.6?
You can use the Mutators or Accessors to do this. The Mutatosr act as a SET, before saving to the bank, it would check the number of digits and add the zeros at the beginning. o Accessors would be…
-
0
votes1
answer559
viewsA: Load an html file into the Laravel
You can create a folder called "html" inside your briefcase "public" for example, and call the files HTML as below: Route::get('/processos', function () { return File::get(public_path() .…
-
0
votes0
answers133
viewsQ: Sync Sqlserver Express 2014 with Sqlserver Localdb using C#
I’m making an application Windows Forms using C# which will be connected to a bank SqlServer Express 2014 remote, however, I need some features to be available offline due to the poor quality of…
-
0
votes1
answer72
viewsQ: Error running Gulp --Production Vagrant Laravel/Homestead
I set up an environment laravel/homestead to study the Laravel 5.1 , when trying to execute the command gulp --production get the error below: Error: Cannot find module 'strip-bom' at…
-
1
votes2
answers1078
viewsA: Site works on localhost, but not on Uolhost (permissions?)
Try to add the code below in your web.config <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> </system.webServer> I once had a similar problem and this code…
-
1
votes0
answers57
viewsQ: Query using Object with Entity Framework
I have a method that gets one object which may be both int as string, someone knows a way to do the entity framework interpret the Object!? I know I can make one if and do the verification, but I’m…
-
1
votes1
answer553
viewsA: How to call the same Actionresult more than 1 time to refresh the page?
You can change your code to get the value of Select as follows: When you use the HTML Helper : @Html.DropDownList("idFoto", String.Empty) the "idFoto" parameter is the value of the attributes id and…
-
0
votes1
answer227
viewsA: Error when filtering data from Datatable
In his javascript filter.js, you are hiding your Header, change this code snippet: if (classes == "") { // if no filters selected, show all items $("table.item-list tr").show(); } else { //…
-
1
votes1
answer385
viewsA: External form filter with jquery datatables
Follow an example below: var oTable = $("#dataTableCustom").dataTable({ "iDisplayLength": 25, "bDestroy": true, "bProcessing": true, "bJQueryUI": true, "bAutoWidth": false, "bServerSide": true,…
asp.net-mvc-5answered Hermes Autran 899 -
2
votes2
answers196
viewsQ: Doubt cache Asp.net MVC
I have the following scenario: Public ActionResult ProdutoFornecedor01() { var produtos = _db.Produtos.Include(x => x.Fornecedor).OrderByDescending(x => x.ProdutoId).Where(x =>…
-
6
votes1
answer2742
viewsQ: Working with Currency (decimal)
I’m working on a project where I had the need to use decimal for field Currency. As the American standard and different from the Brazilian soon had some difficulties. I found some examples of how to…
-
1
votes1
answer191
viewsQ: Problem with select in table with relationship Many to Many
I have the following scenario: public class Pedido { [Key] public int Id { get; set; } public virtual ICollection<ProdutosPedido> ProdutosPedidos { get; set; } public DateTime CreateDate {…
-
1
votes3
answers972
viewsA: Independent Project Injection of Dependencies Ninject
I’m studying DDD and also did a recent project following the example of Eduardo Pires that can be found in this LINK, in the test project when installing the Ninject for nugget it creates a class in…
asp.net-mvcanswered Hermes Autran 899 -
2
votes1
answer292
viewsQ: Pick values from Contenteditable fields to send in POST
I’m making a Carousel using the Bootstrap. The dados who fed this Carousel will be modified a few times, I decided to create a file dados.json to serve as the basis for these files. I made a classe…
-
1
votes1
answer804
viewsQ: Include Problem in Entity Framework
I have the classes: public class Estado { public int Id { get; set; } public string Nome { get; set; } public string Uf{ get; set; } public ICollection<Cidade> Cidade { get; set; } } public…
-
1
votes1
answer194
viewsQ: Is it possible to make a basic CRUD in JSON file?
I have the following scenario. I have a news site on ASP.NET MVC that currently when accessing it, all information is taken from the bank. I want to take these requests from Front. I thought I’d…
-
2
votes1
answer321
viewsQ: Fluent Mapping or Data Annotations?
I was watching a video class on ASP.NET MVC, when I watch the Fluent Mapping of the Entity Framework for the first time. Then the doubt came to me. Which of the two is best recommended? Fluent…
-
2
votes1
answer108
viewsQ: Validations in Webpapi
I’m starting to study webapi with knockout, using a classe Basic as example I made my model, in the knockout I made the list and include it in my classe I have decorated the attributes with some…
-
0
votes4
answers1375
viewsA: How to change the color of only one element in a form-group with several others?
Invert your code to look like this: <div class="col-lg-2"> <div class="form-group"> <label></label> <input /> </div> </div> <div class="col-lg-10">…
-
1
votes1
answer124
viewsA: Insertion 1 for many is recording two records in the database
I found the problem, I do not know why it happens but I will post as solved in case someone comes to have the same problem later. In the following line: var user = UserRepo.GetLogedUser();…
-
0
votes1
answer124
viewsQ: Insertion 1 for many is recording two records in the database
I have the following classes: Usuario, Noticia, Bloco and Editoria. I had a relationship One to Many between the tables Noticia and Editoria, Noticia and Bloco. It works perfectly, by putting the…
-
2
votes1
answer1027
viewsQ: When and how to use the Asp.net web api
I have been studying Asp.net MVC for some time, I have been reading about WebApi but I still can’t understand when and how I can use it. Ex: I have a small news system, where I have a area where is…
-
5
votes2
answers686
viewsQ: iterate values in $.each nested Jquery
I’m getting a full table from my server side, looking for td with information I want and save that tr integer in a variable as below: var rowVoo; $(table).find("tr td").each(function () { if…
jqueryasked Hermes Autran 899 -
5
votes1
answer275
viewsQ: Change banner every page refresh
I have a list of 3 Banners. I must always show each one different Refresh of Page, even after closing the browser. I’m thinking about doing a fingerprint counter every time a Banner and shown adds +…
-
2
votes1
answer1135
viewsA: How to pass parameters to the _Layout.cshtml view in Asp.Net projects
In my projects I use a Class static calling for UsuarioRepositorio As follows below: public class UsuarioRepositorio { public static bool AutenticarUsuario(string login, string senha) { var context…
-
2
votes2
answers1142
viewsQ: Plugin to upload multiple images
I have the following classes in my project. Galeria and Fotos I have a ViewModel where I take the data from Galeria and data from Fotos. When doing Submit (normal, not asynchronous Submit) Galeria…
-
2
votes2
answers277
viewsA: Problem with Animate.css in fonts in Safari
Good afternoon. Add -webkit-font-smoothing: antialiased; in the block .nav > li > a so that it stays as below: .nav > li > a { position: relative; display: block; padding: 11px 15px;…
cssanswered Hermes Autran 899 -
1
votes1
answer138
viewsQ: Preview the data before saving to the database
I’m doing a news site on ASP.NET MVC 5 and the need arose to see the Preview of the news before saving it in the bank. With a action by name Preview I can send the data to her and send it to a View…
-
-1
votes2
answers1083
viewsA: Load a type list into a View of another type
Good afternoon. To reference just use the following: @using Aplicacao.Model.Class You can reference on top of the standard model reference that you receive the data from Action: @using…
-
1
votes2
answers449
viewsA: Mapmvcattributeroutes with Pagedlist.MVC
The problem was in a conflict between another Controller’s route. My route from the Controller SalaImprensa: [Route("sala-de-impresa/noticias/{page?}")] It was conflicting with the Controller’s…
-
3
votes2
answers449
viewsQ: Mapmvcattributeroutes with Pagedlist.MVC
I’m using the routes.MapMvcAttributeRoutes(); to decorate my actions with the Url I want to appear in the browser, and it has worked very well, however, when using with the PagedList I’ve been…
-
2
votes2
answers4041
viewsQ: Image preview before Upload + Imageresizing.net
In a few minutes looking for a way to show the preview of an image before the upload of the same, I found the magnificent solution: $("##ID DO INPUT FILE##").change(function (event) { var reader =…
-
7
votes1
answer541
viewsQ: Custom Roleprovider
I am implementing an authentication with RoleProvider Custom. I have a class Usuario and a class Role with Many to Many relationship. I created a folder in the project called Security and inside the…
-
2
votes2
answers1323
viewsQ: Create and Edit Onetomany with Viewmodel
I am creating a simple news application in ASP.NET MVC 4. I have a News class and a Category. I made a Viewmodel public class NoticiaCategoriaVM { public Noticia Noticia { get; set; } public…
-
7
votes4
answers1531
viewsQ: List all Roles in Checkbox and mark the roles that the User has
I am creating an Asp.net MVC 4 User Management System with two Simple Tables. Users and Roles. I can create users by selecting the roles they will own. At the time of Edit I’m trying to List all the…