Posts by Mariana • 2,512 points
256 posts
-
0
votes2
answers409
viewsQ: Jquery function to select tab with required fields not filled
I use the tab of bootstrap and the required of dataannotations, but the following happens, not to know the required fields, when it is not in the tab of him, for example, I’m in tab 1, and I…
-
0
votes1
answer43
viewsQ: Input disable not found in serialize
If the form I have is validated, I disable the form, this way: $("#Editar :input").prop("disabled", true); But I have a function that serialize, and if I’m with the forms disabled, they do not find…
-
0
votes1
answer72
viewsA: Form submit with jquery
I was able to solve by adding this line to the submit: if ($('#FornecedorNovo').valid()) { $form.off('submit').submit(); }
-
0
votes1
answer72
viewsQ: Form submit with jquery
I have this function to check the state registration and CNPJ/CPF fields and if they are right it performs the submit, only that in the submit, he is not respecting the required of the fields…
-
0
votes1
answer55
viewsQ: Function to include and exclude items according to table
I have this function: foreach (var item in obj.valores) { var ver = db.ProdutosFornecedores.Where(r => r.ProdutoID == item.ProdutoID && r.FornecedorID == item.FornecedorID).Select(r =>…
asp.net-mvcasked Mariana 2,512 -
0
votes1
answer289
viewsQ: Function jQuery return validation message instead of Alert
I have this function, which works perfectly: $('#FornecedorNovo').submit(function (e) { e.preventDefault(); var url = "/Fornecedor/VerificaInscricao"; var Insc = $("#InscricaoEstadual").val(); var…
-
0
votes2
answers305
viewsQ: Validationresult with two parameters
I am trying to use custom validation as explained in this link, but then I can only pass one parameter to validate, and I need both, because if the field is empty and the other is false, it has to…
-
2
votes2
answers1681
viewsQ: Regex required number(s) and optional letters
I have this regex to validate, but it is not working properly, it needs to be mandatory number, can be more than one, and optional letters. (?:\\d+[a-z]|[a-z]+\\d)[a-z\\d]* This is required 1 letter…
-
-2
votes2
answers90
viewsQ: Validation required with if Viewmodel
I’m trying to validate fields with Viewmodel This way it’s not working: [Display(Name = "Insc. Estadual")] public string InscricaoEstadual { get; set; } [Display(Name = "Inscrição Isento")] public…
asp.net-mvcasked Mariana 2,512 -
-1
votes1
answer1762
viewsQ: Validation if any form input has been changed
I need to check if the form has changed, that is, if any input data has been changed, etc. So that when you do the submit, or leave the page, perform some button click, or the menu be informed to…
-
0
votes2
answers89
viewsQ: Select field with first blank item
Utilise select and it comes filled from the bank: <select asp-for="CategoriaID" asp-items="@Model.CountryList" id="cbcategoria" class="form-control"> </select> And here’s how it’s in the…
asp.net-mvcasked Mariana 2,512 -
1
votes1
answer194
viewsQ: if condition with required Viewmodel
I wonder if it is possible to use an if for required in a Viewmodel. For example I have these two variables: [Required(ErrorMessage = "O campo {0} é obrigatorio.")] [Display(Name = "Insc.…
asp.net-mvcasked Mariana 2,512 -
0
votes1
answer47
viewsQ: Function authorizing or not form Ubmit
I’m trying to run a function in the form Ubmit, it works correctly, but if return true I need the form not sent. It’s being done this way: $('#FornecedorNovo').submit(function (e) { var url =…
-
1
votes2
answers101
viewsQ: Calling function after fadeOut
I have a function that removes the row from a table, after removal I need it to be called to function getTotal();. But in any way that I put it does not work, because of the effect of the line, I…
-
1
votes0
answers31
viewsQ: Save photo in MVC
I’m trying to save photo in the database by following this link, but it’s not working. Here is the HTML code: <div class="form-group"> <label asp-for="Foto"…
-
0
votes0
answers34
viewsQ: Include direct input select - MVC
I have this select field, where I upload the database data: <label asp-for="CategoriaID" class="col-md-2 control-label"></label> <div class="col-md-6"> <select…
asp.net-mvcasked Mariana 2,512 -
-1
votes1
answer81
viewsQ: After Alert open modal
I’m trying to get Alert to open the modal, but it’s not working. In function I check if the field nnfe is filled. function TransferenciaPedido() { if ($("nnfe").val() == undefined) { alert("Preencha…
javascriptasked Mariana 2,512 -
1
votes1
answer471
viewsQ: <thead> with fixed top table
I have a <table>, and would like to leave the <thead> of it with fixed top: <table class="table table-responsive table-hover" id="tablepesquisaprodutos" style="font-size:12px;">…
-
1
votes2
answers63
viewsQ: HTML view of the field
I have an input field where I bring the value of the bank, which I use this way: <input asp-for="TICMS" name="TICMS" onKeyPress="return(MascaraMoeda(this,'.',',',event))" class="form-control"…
-
5
votes2
answers188
viewsQ: Include html fields in the title panel
I’m using bootstrap, and I use a panel title at the beginning of the form, which informs the name of the form I’m in right I would like to put in the case the current date if it is a new…
-
2
votes4
answers9348
viewsQ: Put an IF in CSS
I have a CSS that shows and hides a div. But I want this to happen only if this field below is filled, that is, if it is different from empty. <input type="text" onkeypress="return…
-
1
votes1
answer482
viewsQ: Open div by hovering over input text
I have this div, where the input text is inside: <div class="col-md-4" id="passarmouse"> <input type="text" asp-for="FornecedorID" onkeypress="return BuscaDados(event);"…
-
2
votes2
answers181
viewsQ: Configuring modal with bootstrap
I have a modal I use bootstrap, but when I put inside a div to format the size, it seems strange. Follow the modal: <div class="modal fade" id="myModalTransportador" role="dialog"> <div…
twitter-bootstrapasked Mariana 2,512 -
-1
votes1
answer523
viewsQ: Let only mark a dynamic Checkbox table
I have a table, I create it dynamically, I need the user to manage to mark only one checkbox, That’s when one has scored, the time he goes to score another, he unmakes the other, and marks the new.…
-
0
votes1
answer860
viewsA: Take data from a selected row of a dynamic table
I managed to delete by throwing the line into a global variable in this way, and then by clicking the button, I run the delete function: $(function () { $(document).on('click', '.link-check',…
-
1
votes1
answer860
viewsQ: Take data from a selected row of a dynamic table
I have a table, which I enclose the data dynamically in a table. I include in this way, I include in the first column the checkbox: $("#tablepesquisaprodutos").append("<tr class='item'>" +…
-
0
votes2
answers55
viewsQ: Input appear with two numbers after the comma
I have this html, which I bring from a float: <input asp-for="Frete" name="Frete" onKeyPress="return(MascaraMoeda(this,'.',',',event))" class="form-control" /> I would like when you bring the…
asp.net-mvcasked Mariana 2,512 -
0
votes1
answer147
viewsQ: Pass two sets of AJAX values to controller
I need to pass the values of a view model, and of a table, the table is passing normally, when passed alone, the viewmodel does not. Go on like I’m doing: var model1 = objectifyForm(model);…
-
0
votes0
answers51
viewsQ: Include Dynamic Table in Viewbag
I include the table data dynamically in AJAX, and it works perfectly to include in the table, what happens is, now I need the table data in the controller, and for using . NET CORE, I CAN’T GET THE…
asp.net-mvcasked Mariana 2,512 -
2
votes2
answers684
viewsQ: Pass JSON.stringify to Controller
I am trying to pass a table via JSON.stringify, in ajax, is receiving the data perfectly, but I cannot pass to the controller. I’m passing that way: function enviarDados(produtos) { $.ajax({ method:…
-
0
votes1
answer61
viewsQ: Add float values from a Table
I’m trying to add the value of the fields of a table, but it’s not working, with parseint it works, only it has values that won’t be integers, so I put it as a float, but it doesn’t perform the sum:…
javascriptasked Mariana 2,512 -
0
votes0
answers105
viewsQ: Adding Datatable Lines
I have a table, which I need to fill out dynamically, as the user adds the information. How can I get this information, I already have the function that picks it up, and add it to Datatable ? Follow…
-
0
votes1
answer381
viewsQ: Modal opening under another modal
I have two modals, one I call inside the other, but it is getting below. Just like I’m doing: First I open this: <div class="modal fade" id="myModalAdd"> <div class="modal-dialog">…
asp.net-mvcasked Mariana 2,512 -
0
votes1
answer140
viewsQ: Object Reference not set to an instance of an Object - MVC
I am loading a table, and doing the debugging, it brings the data perfectly, but when I get the data of the table reference in the foreign key, it is returning me the following error:…
asp.net-mvcasked Mariana 2,512 -
1
votes1
answer28
viewsQ: Load decimal configured data
I have this function, it works, it brings the necessary data to appear in the input, however I wanted it to bring in decimal, if it is 10,00 it is appearing only the 10 How can I correct? function…
-
0
votes1
answer54
viewsQ: AJAX updating the wrong table
I have this AJAX function to update a table, it is this way: function incluirFornecedor(idItem) { var url = "/Produto/incluirFornecedorN"; $.ajax({ url: url , data: { id: idItem } , type: "POST" ,…
-
-1
votes2
answers68
viewsQ: Problem deleting a record, fetching the next
I am trying to do in the code, a page edit, then the user on this page edit, he can delete the record, and if he delete, the system has to check, if there is a record next, it goes to edit screen…
-
0
votes1
answer457
viewsQ: AJAX function to update table
I have this function in AJAX to update the data of a table, the data is coming from the controller correctly, but it does not update with the correct data, it updates blank. function…
-
1
votes1
answer437
viewsQ: Load table via AJAX
I’m trying to load the data from a table, via ajax, this way: function buscaFornecedores(id) { var url = "/Produto/BuscaFornecedor"; $.ajax({ url: url, type: 'GET', data: { id: id}, success:…
-
2
votes1
answer245
viewsQ: Update modal when deleting record from table - MVC
I have this modal, and I have the function to exclude, I need the data to be deleted and updated, without closing the modal. Follow the code as follows: This is the modal: <div class="modal fade"…
-
2
votes1
answer1616
viewsA: The field Sale Price must be a number. MVC
I managed to solve, following the tutorial of this link I install that package: Install-Package Microsoft.AspNet.Mvc.pt-br jQuery Valitation is responsible for client-side validation, to globalize…
-
1
votes1
answer1616
viewsQ: The field Sale Price must be a number. MVC
I have a field, price sale, that model is like this: public decimal PrecoVenda { get; set; } In Viewmodel he is like this: [Display(Name = "Preço de Venda")] [Required(ErrorMessage = "O campo {0} é…
-
0
votes0
answers26
viewsQ: Doubt Select MVC . NET
I am making an index, to bring the employee and the classification that he is, but if I do so, it appears to me the id of the classification, and not the name: @foreach (var item in…
asp.net-mvcasked Mariana 2,512 -
1
votes0
answers214
viewsQ: The field Valor Pago must be a number. ASP NET MVC
I own this field at Model: public decimal Valor { get; set; } It records correctly, and shows me the value in this way: 10,00 But when I edit, and complete the action, it returns to me : The field…
-
0
votes1
answer126
viewsQ: Where with date and time - Entity Framework
I am making a select with Entity framework. where I need to use Where, with date and time, in the select of SQL SERVER, I would do so: select dbo.contas_receber.id,…
-
1
votes0
answers39
viewsQ: Using Union Select Entity Framework
I’m trying to use a Union select, in an Entity framework, but I’m not able to gather the information, follow how I’m trying to do: var un = _context.CaixaMovimentos.Select(c => new { c.Data,…
entity-frameworkasked Mariana 2,512 -
0
votes0
answers38
viewsQ: Not getting the correct core.net User Id
I’m using ASP.NET CORE 2.0, and I need to get the logged in user id. This is my Account Controller: [Route("[controller]/[action]")] public class AccountController : Controller { private readonly…
-
0
votes0
answers129
viewsQ: Get User Entity ID
I’m trying to get the user id and save in the table, here’s how I referenced in the Foreignkey table: public string FuncionarioId { get; set; } [ForeignKey("FuncionarioId")] public virtual…
-
3
votes2
answers234
viewsQ: How can I get the Insert in log with logged in user ? Identity - Asp.net core 2.0
I need to get the logged-in user to log in, thus including which user included in the table, made changes, and delete. I’m learning the language, and I still have many doubts. This is my…
-
0
votes2
answers473
viewsQ: Change value select via ajax as another select with static data
I have this select, where the user must select it: <select asp-for="Configuracao.TipoEquipamento" class="form-control"> <option value="0">Catraca</option> <option…