Questions tagged as 'viewmodel'

2
answers

Transforms string into decimal within an object

I made a ViewModel, where in the database the CPF field is decimal (11,0) and in the VM I put it as String. In my API the CPF is decimal. Well, when I fill in the field and send the form to the API, the value of the CPF arrives with 0.0. This is...
asked by 13.08.2018 / 14:11
1
answer

Is it correct to use List with ViewModel?

I have ViewModel below: public class Crm_AnaliseViewModel { public string TAG { get; set; } public int ATUALIZACAO { get; set; } public string RELATORIOS { get; set; } } Then in Controler did: public async Task...
asked by 14.07.2017 / 23:27
1
answer

How to modify this query to get the desired result in Codeigniter?

I have a SQL that returns me the following:    1: Hacker And Cars       OU       2: Food I need to get it back:    1: Hacker       E       2: Automotive OR Food The code I have so far is: if(!$final['termo'] == null)...
asked by 19.11.2016 / 15:58
1
answer

Retrieve the value of a dynamically generated field

Good morning. I would like to know how do I retrieve the value of the control that is generated dynamically in my form at runtime? Type below in the image I have a class that brings all the properties of the controls to be shown in the Client Vi...
asked by 31.10.2016 / 14:30
2
answers

ViewModel with INSERT on two Controllers

I have two Controllers: 1 - Register the CPF (CPF, Name) 2 - Register the CPF Telephone (CPF, DDD, Phone) ViewModel: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Component...
asked by 18.07.2017 / 01:19
2
answers

Problems saving a selected item in Dropdownlistfor using a ViewModel

I'm trying to save a change I try to make by selecting a Category in a Dropdownlistfor . Type like this: I'mfollowingtheDebugandtheViewissendingtheselectedCategory,butIcannotcontinuethischange.MySubcategoryControllerlookslikethis://G...
asked by 22.02.2017 / 17:37
1
answer

AutoMapper Relationship One to Many - Model to ViewModel (and vice versa)

MVC scenario, where Controller talks to Application that talks to Domain. I'm trying to do a one-to-many mapping with AutoMapper. This is my Model: public class Estado { public Guid EstadoId { get; set; } public string Nome { get...
asked by 29.01.2017 / 18:10
0
answers

How to change the Model data being displayed in GridMvc?

I have a GridMvc in my form where it displays a list of units, in this grid has a text field, and a checkbox, I would like when the user type some text box or flag the check, that change reflects on the model. / p> View: <b>Seleci...
asked by 01.08.2018 / 17:04
0
answers

how to use http.post in angular js to retrieve rows from my checked data table?

I have a data table with id, name, etc. and have checkboxes added within the Angular for example. vm.dtColumns = [ DTColumnBuilder.newColumn(null).withTitle(titleHtml).notSortable() .renderWith(functi...
asked by 22.03.2018 / 05:20
1
answer

Error trying to make a belongsToMany relationship in Laravel

I'm trying to make a belongsToMany relationship in my Model but it's bringing the error:    QueryException       SQLSTATE [42S02]: Base table or view not found: 1146 Table 'api.codigo' does not exist (SQL: select sequenciaaprovacaos . *...
asked by 11.12.2017 / 21:34