Questions tagged as 'mvc'

1
answer

Return array in SQL in a php variable, for later assembly of HTML

I need to do a database search on a variable date and return only the Years. For this I did the following: In Control: public static function getDataAnos() { $bd = new Banco(BANCO_HOST, BANCO_USUARIO, BANCO_SENHA, BANCO_BASE_DADOS);...
asked by 14.11.2017 / 21:41
1
answer

How do I mount a List or Ienumerable array on the Controller and step to View?

Good Night! I made a request to my webapi to fetch data in order to use it in a DropDownlist @Html.DropDownList("Id","Descricao") . In My controller, I can pull results from WebApi in collection, I have dealt with Json and I put it in my p...
asked by 15.11.2017 / 22:38
1
answer

Form data is not sent with event.preventDefault ()

When submitting a form, I am using ajax and event.preventDefault() so the screen will not be reloaded. In my project, I made a small MVC structure, where the URL that step is the path that leads to the desired controller. When I subm...
asked by 16.10.2017 / 09:37
0
answers

Class not found in namespace

I'm trying to use a class by using the namespace, but it always generates this error:    Fatal error: Uncaught Error: Class 'Database\connect' not found in /opt/lampp/htdocs/Estudando/app/Usuario/Controller/usuarioController.php:13 Stack t...
asked by 07.10.2017 / 16:20
1
answer

How to create a create function using table data with relation from n to n?

It turns out that the create function that the other trainee did not work because it has two tables with n-n relation and in the function it is only going to fetch data and register them in one. But I can not figure out how to add another table...
asked by 20.10.2017 / 15:30
1
answer

Unable to retrieve metadata for - Error creating Controller

I created a web project with MVC and entity framework 4.5, and MYSQL database. I added the MySql.Data MySql.Data.Entity and MySql.web I made all the settings as images below IfollowedthewalkthroughandmyBankwasaddedaspicturebelow:...
asked by 13.10.2017 / 04:06
0
answers

Call Controller Search Action

I have an Action in My controller that calls a Service that does a Search using Stored Procedure and returns me a List. I made the form in the View to call this Action, only it is not calling Follow the Codes for each Process Search Form &l...
asked by 02.10.2017 / 14:27
1
answer

I can not display the Spring error message

I'm trying to validate some fields with annotations, but I can not bring the messages to the jsp page: User.java mport java.util.Calendar; import javax.validation.constraints.Email; import javax.validation.constraints.NotNull; import jav...
asked by 27.09.2017 / 16:50
1
answer

EntityFramework: There is no mapping of the ObjectParameter object type to a native type managed provider

I'm developing an MVC application with Entity Framework in Code First. As my database has procedures, I chose to use SQLQuery to execute the procedures, but I'm getting away with this error: Não existe mapeamento do tipo de objeto System.D...
asked by 21.09.2017 / 19:46
1
answer

List the result of a query

I want to return in my code a list of users through a data query, I have the following model: <?php class Usuario{ public function listar($condicoes = array()){ $db = DB::criar('padrao'); $sql = "select * from func";...
asked by 14.09.2017 / 21:38