Posts by Rod • 9,412 points
210 posts
-
1
votes1
answer1073
viewsQ: Calculate formatted input (mask)
I have 2 inputs, quantity and value. The input value is using the plugin Jquery Maskmoney it is configured as follows: $('.money').maskMoney( { allowNegative: true, thousands: '.', decimal: ',',…
-
4
votes4
answers832
viewsA: Create layout for PHP and . NET applications
From what you describe, what you need is a client-side template engine To do so, use on both server(php and .net) receiving only the data of an API and yes, can customize One of the most famous (I…
-
7
votes2
answers65
viewsQ: What to do when a model has N responsibilities
My system exists a class that is currently a common class for several situations, below some of the other models to exemplify public class Servico { public int Id {get;set;} public string Nome…
-
3
votes1
answer81
viewsQ: Quality Process Certification: how to get?
I have a system and I want to certify it. My idea is ISO 9001. What do I need to do? What are the requirements to obtain this certification? I should look for a company to get certification or there…
software-engineeringasked Rod 9,412 -
2
votes2
answers1336
viewsA: Remove Time in Datetime field
For these cases, you can use a EditorTemplate Create a folder called EditorTemplates inside the briefcase Shared Create a View DateTime.cshtml and put: @model DateTime? @Html.TextBox("",…
-
3
votes1
answer59
viewsQ: Is the query generated by the Entity Framework valid for use in ADO?
I’m wanting to have a higher performance in a query I perform in the system Consequently use ADO is much faster than Entity Framework To query that it generates when performing the query, could be…
-
4
votes1
answer294
viewsQ: Is it possible to make a condition within a Select?
I’m performing a consultation using Select, to select only the required fields and consequently have higher performance. In my View user can choose certain fields to be loaded Man ViewModel public…
-
3
votes1
answer965
viewsA: How to upload a file at the same time as sending an Asp.net mvc 5 form
Use Textboxfor to create input @Html.TextBoxFor(model=>model.File, null, new { type="file", @class="form-control" }) For sending any type of file, your form must also contain the enctype…
-
2
votes1
answer203
viewsQ: Choose which items of a enumerator appear in an Enumdropdownlistfor
There is how to select only a few items from the enumerator to send to a EnumDropDownListFor ? Ex: public enum Documento { CPF = 1, RG = 2, CNPJ= 3 NASCIMENTO = 4 } And I would like that in a…
-
1
votes1
answer52
viewsQ: How to avoid controller duplication/accountability in modern applications?
Nowadays, communication between applications, mobile and/or other devices is increasing. The . net provides the Asp.net MVC and Asp.net WebAPI (to date today, stable version). Commonly the Asp.net…
-
7
votes1
answer713
viewsQ: Does number of columns influence performance?
When modeling a database, the number of columns can interfere with performance? Ex: Tabela1 possui 2 campos, 1 int pk e 1 nvarchar(50) Tabela2 possui 50 campos, 1 int pk e 49 nvarchar(50) Select…
-
2
votes1
answer217
viewsQ: How to perform version control of the application in production?
When using the TFS, we have all version control of the files of an application. Then, with each file modification by numerous team members, each file will have its version... A example that can…
team-foundation-serverasked Rod 9,412 -
9
votes2
answers2054
viewsQ: Is it wrong to structure a form with tables?
Today with the HTML5/CSS3 and its numerous ways to align the elements (Divs) Is it wrong to structure a table form? Ex: <form action="action" method="POST"> <table style="width:100%">…
-
5
votes2
answers145
viewsQ: Child references and service Pattern
A widely used Pattern in DDD, is the service pattern. My question is, where is the logic for references "daughters"? For example, a use case, Pedido who owns Produtos public class Pedido { public…
-
1
votes1
answer89
viewsQ: Use different symbols for dots
I’m using the plugin float Charts to generate line graphics. Until then I have this chart: As a configuration of plugin, I am informing you that this line must have a symbol of the kind circle But I…
-
3
votes2
answers147
viewsA: Error loading Dialog Widget() jQuery in ASP.NET MVC
In addition to what @Randrade quoted, the following can happen; Bundle usually follows an alphabetical sequence, which may happen that some necessary scripts are being loaded later. What you can do…
asp.net-mvcanswered Rod 9,412 -
3
votes1
answer49
viewsQ: Prealoder when requesting dowload
I’m making a return of a pdf from a Custom ActionResult response.ContentType = "application/pdf"; response.AddHeader("Content-Disposition", "attachment; filename=teste.pdf"); And I wonder how I…
-
1
votes1
answer64
viewsQ: Automated Deploy - Multi-customer version maintenance
How best to automate deploy ? Having 1 deploy for each client, what is the easiest way to maintain all these deploys ? Database Migrations and all version processing? In an example you have 100…
-
3
votes1
answer81
viewsA: Form with two destinations
You could set 2 values with the same name for each button <button type="submit"name="minhaaction" value="Action 1"> <button type="submit"name="minhaaction" value="Action 2"> and in its…
-
4
votes1
answer116
viewsQ: 'System.Stackoverflowexception' When running Migration with Dbmigrator
I have my Migration that has a number close to 6500 records like this: db.MinhaLista.AddOrUpdate(x => x.Codigo, (new MeuModel { Codigo = "ABC1234", Nome = "Teste "})); However while running my…
-
8
votes2
answers282
viewsQ: What are isomorphic applications?
In several articles and methods of developing modern applications, I come across isomorphic Applications. But what is it really? They usually define it as "the best of client/server side together".…
-
5
votes3
answers3594
viewsQ: What is the difference between display:inline-block and float:left
When testing with alignment of div, both have the same purpose But what would be your difference?
-
3
votes1
answer98
viewsQ: How to convert a view to string in the controller?
I’d like to convert that view for string and have the value in string in my controller The problem is that I’d like her to perform a snippet of script that’s in this view The current method I have,…
-
1
votes0
answers154
viewsQ: update-database command does not work in multiple contexts
I have two context in my project. I followed as the basis of this Article where it shows how to have 2 context in the same project. Each context is for separate seats, so are 2 ConnectionString…
-
0
votes1
answer48
viewsQ: How do nodes work in javascript?
In many posts I read that in javascript manipulates element gift, also cited as "nodes" How is the process of manipulation of these nodes ? What is the structure involved? What format? Xml style? in…
javascriptasked Rod 9,412 -
3
votes2
answers53
viewsQ: How to capture a certain part of a div’s content?
Hello I have a div which has a certain height and content <div class='mydiv'> <p> blabalbalala </p> <p> blabalbalala </p> <p> blabalbalala </p> <p>…
javascriptasked Rod 9,412 -
1
votes2
answers278
viewsQ: Dynamic property in Static class
I have a static class and in it I have a method too static. The method returns a value that is cached, however Key, it has the dynamic value: key = User.Identity.GetUserName(); public static class…
-
1
votes2
answers262
viewsQ: What is the difference between authorizecore and onauthorization
When will we create an attribute like AuthorizeAttribute We have these 2 properties to be overwritten What is the difference between the two? Both seem to have the same function [Edit] The namespace…
-
3
votes1
answer63
viewsQ: How to check value in enumerator with [Flags]?
I have my enumerator: [Flags] public enum EConta { Receber = 1, Pagar = 2, Cobrada = 3, Atrazada = 4 } and have the assignment EConta conta = EConta.Receber | EConta.Pagar; var retorno =…
-
1
votes1
answer385
viewsQ: External form filter with jquery datatables
I am trying to make an external filter from an external form Until then, for a simple generic search, jquery datatables use the parameter 'sSearch' For that, I just do var grid = new…
asp.net-mvc-5asked Rod 9,412 -
1
votes2
answers279
viewsQ: Set name property anonymous object and Resources
I am using Resources for multi-language on a system. In a return json I create an anonymous object var resultado = minhalista.Select(x => new { }) But it turns out that I need the property of…
-
2
votes4
answers1160
viewsQ: load datepicker plugin on page called with ajax
I’m using the plugin datepicker All my datepicker input, has the class called datepicker <input type="text" class="datepicker"> So, I have only one configuration for datepicker and can use on…
-
5
votes3
answers10876
viewsQ: Recognize duplicate items in a list
I’m getting a list of items in my action public ActionResult New(List<Itens> Itens) { return View(); } How do I recognize which items are duplicated on that list?…
-
2
votes1
answer46
viewsQ: Enable delete
I have my model which has several lists. For example: public class Funcionario { public ICollection<FuncionarioNotificacao> Notificacoes {get;set;} public ICollection<FuncionarioExame>…
-
1
votes1
answer560
viewsQ: Break div when content exceeds maximum size
My style css to a div, like an A4 page .pagina { width: 210mm; min-height: 297mm; max-height: 297mm; padding: 30mm 20mm 20mm 30mm; margin: 10mm auto; border-radius: 5px; background: white;…
-
3
votes2
answers544
viewsQ: Grab custom tags with Html Agility Pack
I’m using the plugin Html Agility Pack to manipulate html And I would like him to capture my elements that use tag customized I tried it this way: HtmlDocument html = new HtmlDocument();…
-
2
votes1
answer567
viewsQ: How to load plugins already configured after page load by ajax
I have a page that has a form In this form, it contains some inputs, which have classes, e.g.: <input type="text" class="datepicker"> <input type="text" class="marcara-cpf"> And the…
-
24
votes3
answers4038
viewsQ: What is the difference between using virtual property or not in EF?
I have my models public class Cliente { public int Id {get;set;} public string Nome {get;set;} } and public class Pedido { public int Id {get;set;} public int ClienteId {get;set;} public virtual…
-
1
votes1
answer50
viewsQ: Global filters in Entity Framework
I would like all of mine DbSet filter all calls I mean, I’d like all the DbSet make the following filter: Where(x => x.active == true) No need for all the time I have to do dbo.Models.Where(x…
entity-framework-6asked Rod 9,412 -
2
votes2
answers52
viewsQ: List group only that contain items
And an example of model: public class Grupo { public int Id {get;set;} public string Nome {get;set;} public ICollection<Item> Itens {get;set:} } And the items public class Item { publit int Id…
-
2
votes0
answers58
viewsQ: What is the process of generating pdf files?
How is the internal process to generate a pdf file? Indifferent to the programming language that is generating it.
-
8
votes1
answer579
viewsQ: How to create a default margin in the ckeditor?
I started using Ckeditor And by initializing it, it comes in the following way: And I would like it to come with a standard margin(I want it to look like A4) How could I make him come already with a…
-
4
votes5
answers6761
viewsQ: How to create composite key with Entity Framework 6
I have my model base that all classes inherit from it: public class Base { public int Id {get;set;} public int ClienteId {get;set;} } And an example of model: public class Grupo: Base { public…
-
1
votes1
answer308
viewsQ: Entity Framework does not update my database
I’m using EF6 And it turns out that when I use Update-Database it does not update my database. For example I have my model: public class Cliente { public int Id {get;set} public string Nome…
entity-framework-6asked Rod 9,412 -
2
votes2
answers495
viewsQ: How to call partial function after added via append
Hi, I have a partial view, that I surrender with the following code: $.ajax({ url: URL, success: function (data) { $("#DIV").append(data); } }); And within that page, I call a function…
-
1
votes3
answers220
viewsQ: How to enable single-model Cascade
By default EF6 is enabled to delete in Select models, until we use the following convention: modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>(); According to my searches it…
entity-framework-6asked Rod 9,412 -
2
votes1
answer697
viewsQ: Load external scripts in modal being loaded via ajax
By default, I have a configuration file of various plugins and actions of my system A simple example is the use of tooltip: $(".bn-tooltip").tooltip({ track: true }); Datepicker:…
-
1
votes3
answers414
viewsA: Validation using Remote in the "Parent" class
Like all classes that inherit from person, also has the CPF property, I did it as follows: In the Person class I leave my CPF property as virtual public virtual string CPF {get;set;} In my Client…
asp.net-mvc-5answered Rod 9,412 -
2
votes3
answers414
viewsQ: Validation using Remote in the "Parent" class
I have my class Person, it owns the property CPF public class Pessoa { public string Cpf {get;set;} } Other classes inherit from it, for example, the Client class public class Cliente : Pessoa { }…
asp.net-mvc-5asked Rod 9,412 -
-1
votes1
answer1728
viewsQ: Remove div "Father"
I have my following code: <div class="row"> <div class="col-md-10"> CONTEUDO 1 </div> <div class="col-md-2"> <a href="#" class="btn btn-primary">Delete</a>…