Posts by Pablo Tondolo de Vargas • 5,444 points
213 posts
-
3
votes2
answers216
viewsA: Perform Insert into in c#List
How to store a List<Object> in a database? in this question you can see some examples of how to do Insert with c#, in the Gypsy answer is used only EnityFramework. In Lucas' answer, he uses…
-
5
votes1
answer189
viewsA: c# how to make an attack ping the ip of a computer
you can try something like private void button1_Click(object sender, EventArgs e) { Pekiradu(textBox1.Text); } private static void Pekiradu(string destino) { System.Diagnostics.Process proc; int i =…
c#answered Pablo Tondolo de Vargas 5,444 -
2
votes2
answers1083
viewsA: Fields in the same line MVC5 Application Bootstrap
Erison, I made some small changes to your html, where I added a div with class row and the Ivds where they were form-group placed col-md-6, I believe that’s enough in your case. You can see better…
-
0
votes2
answers197
viewsA: ASP.NET Web Forms and Ajaxcontroltoolkit
The solution for my case was to return the version of Ajaxcontroltoolkit to a version that worked.
-
4
votes1
answer356
viewsA: Generic class for CRUD
Zack, since you use MVC, I advise you to use one Controller generic. That it could be something like public abstract class Controller<TEntidade> : System.Web.Mvc.Controller where TEntidade:…
-
1
votes1
answer227
viewsQ: When to instantiate the Icollection
I’m reviewing some programming approaches and falls into a dilemma with regards to where we should instantiate our navigation properties from EF ICollection. Many cases I see that the personal…
-
2
votes2
answers823
viewsA: How to create a FOREIGN KEY using uniqueidentifier in SQL Server
First you must mark your primary keys. In the case of the Client table, I believe to be the "Clienteid" and in the case of the lease I believe to be the "Locacaoid". Then just create the FOREIGN KEY…
-
1
votes4
answers1566
viewsQ: ASP.NET MVC input number
I’m trying to use a input with type=number, but in Chrome is giving that the value informed should be a number. The problem is the state model that is returning invalid, because when giving the…
-
4
votes1
answer1079
viewsQ: ASP.NET MVC permissions system
A long time ago I developed a system, in ASP.NET MVC, where I used the package Mvcsitemapprovider, based on it I made some modifications in Authorizeattribute to perform the verification of user…
-
2
votes2
answers795
viewsA: Display date formatted in datagridview
As I observed you’re using the BindingSource, so I changed the example to use the BindingSource, being as follows private void PessoaBindingSourceForm_Load(object sender, EventArgs e) { PessoaList…
-
2
votes1
answer655
viewsA: Map relationships with Fluent API
So I made some adaptations mainly in your classes: Cidademap I kept HasRequired(a => a.Estado).WithMany(a => a.CidadeLista).HasForeignKey(a => a.EstadoId); Estadomap HasRequired(p =>…
-
1
votes3
answers590
viewsA: Combobox in Databases
Juliano, I made a very simple example using the EntityFramework as data source for the combo box, the complete code you can see here I also took the opportunity to create an example in ASP.NET MVC,…
-
1
votes2
answers865
viewsA: Directory of Windows folders
Gabriel, not every person has a user Admin, usually people have in your Windows a user with your name, so at the time you set the path C:\Users\Admin\Desktop\Protetor de Tela\ will only work for…
-
2
votes2
answers197
viewsQ: ASP.NET Web Forms and Ajaxcontroltoolkit
When adding a ajax:ModalPopupExtender on my page I’m having the following error <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"…
-
0
votes1
answer515
viewsA: Sending an email to Delphi
Case solved, I added one TIdText, changed the ContentType of TIdMessage for 'multipart/mixed' and defined the ContentType of TIdText for 'text/html' function SendEmail(sendTo, subject, body: string;…
-
0
votes1
answer515
viewsQ: Sending an email to Delphi
I am using the following code snippet for sending email in Delphi, but when trying to send an attachment, the attachment becomes part of the body of the email. What could be wrong? function…
-
2
votes1
answer865
viewsQ: Locate in the Delphi
I have a DataSet that returns multiple rows and in one of the columns I have the Situação of the record that may be: open, closed, in conference, conferred, finalized... I need to check if there’s a…
delphiasked Pablo Tondolo de Vargas 5,444 -
2
votes1
answer197
viewsQ: Adodataset Delphi Edit
I have a ADODataSet with the following consultation DECLARE @ID_CONTRATO_EMPRESARIAL INTEGER = :ID_CONTRATO_EMPRESARIAL BEGIN WITH V1 AS ( select C.ID_CONTRATO, COUNT(CASE AD.FUNCIONARIO WHEN 'TRUE'…
-
2
votes1
answer1063
viewsQ: ASP.NET MVC Calculate value in a table
I’m developing a record where I’ll have a table with some additional details that should be entered together with the main register. But one of the columns of this table is calculated, which is…
-
0
votes3
answers671
viewsA: How to make SELECT in more than one bank table?
Just do join between the two tables select * from Usuario, Cep where Usuario.idCep = Cep.idCep
-
2
votes1
answer84
viewsQ: Generate Property Internal set
Because from the version of Visual Studio 2015 every time I have an attribute generated in a class the same is generated with the set internal? In previous versions VS generated as public.…
-
5
votes2
answers801
viewsQ: Keep table records synchronized between two different databases
We are performing a system migration, where some restructurings will be done in the current bank in a new bank. Basically I will have two banks BancoVelho and BancoNovo, having to keep both of them…
-
1
votes3
answers3910
viewsA: Select current date
Kevin, A solution in SQL would be select * from Tabela where convert(date, DtBase) = convert(date, getdate()) Use the function convert for cases where time is stored near the date, then you have to…
-
2
votes1
answer514
viewsQ: ASP.NET MVC Post Date Format
I have a form that sends via post the search parameters, but the parameter of type date whenever it arrives in the action the month and day are reversed, for example, I put on the page the date…
-
7
votes2
answers611
viewsQ: Suggestion Migration System and modeling of individuals and legal entities in system with Entity Framework
Well, here’s the thing. I have a database that has the purpose of making a company’s ledger, basically this bank has a table CaixaCorrido with the columns Id, PessoaNome, DataHora, Descricao, Valor,…
-
2
votes1
answer924
viewsQ: Delete all objects from a schema
I have a database on oracle where I need delete all objects of a particular Schema, I cannot exclude the Schema, because the validation of the system is based on an algorithm that takes into account…
-
2
votes1
answer345
viewsQ: Chosen ASP.NET MVC plugin
I’m trying to use the plugin chosen (http://harvesthq.github.io/chosen/) with the DropDownListFor, but when using this plugin the field validation not working. Box.cshtml @model CaixaViewModel…
-
3
votes1
answer1173
viewsQ: Asp.net MVC Models Heritage
I am trying to implement a person register where I have the inheritances for legal and physical person, but my saving method is not getting the type of person properly. follows example code…
-
1
votes2
answers380
viewsA: How to transpose the result of a search using SQL Server?
Taking as a basis, where we have a Box table and taking into account that we want to show the balance month by month of all years we would initially have a query that returns the value, the month…
-
2
votes1
answer129
viewsQ: Dropdownlistfor in a for
I am trying to fill in with the selected value one DropDownList within a for, but it’s not working properly. What happens is that when the Action Index returns the model to a View, values are not…
-
2
votes1
answer164
viewsQ: problem with jQuery ajax
I am facing a problem when using google Charts, where it is working perfectly in Internet Explorer, but when running the same page in google Chrome or firefox, graphics are not shown my action…
-
2
votes0
answers70
viewsQ: Mvcsitemapprovider with ajax
So, I’m trying to assemble a menu through ajax requests using also Mvcsitemapprovider, but when I try to access mine CurrentNode in my ajax request, is giving as null My request ajax $.ajax({ url:…
-
0
votes0
answers181
viewsQ: Knockoutjs and ASP.NET MVC
So I’m starting to take a look at Knockoutjs and it’s all a little dark yet, in the example I’m following, I’m having a mistake that says O objeto não oferece suporte à propriedade ou método 'join'.…
-
-1
votes5
answers6761
viewsA: How to create composite key with Entity Framework 6
@Rod reading your question better, I believe what you’re trying to do is the following. In the example I created two entities, Pessoa and Pedido, where my entity Pessoa has primary key composed by…
-
2
votes5
answers6761
viewsA: How to create composite key with Entity Framework 6
I do see Fluent Api an example, it is not possible to include a city with the same name for the same state, thus keeping my this.Property(a => a.Descricao) .HasColumnAnnotation("Index", new…
-
2
votes1
answer2765
viewsQ: Entity Framework Left Join
Seeing the question Left Join with lambda Groupjoin and with condition, I have doubts about the way I do Left Join with Linus Having the following entities public class Cidade { public int CidadeId…
-
1
votes2
answers665
viewsA: Bootstrap Collapse
the solution is to change the div: <div id="collapse_@i" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading_@i"> for <div id="collapse_@i" class="panel-collapse…
-
1
votes2
answers665
viewsQ: Bootstrap Collapse
I’m creating a list using the collapse in an interaction of loop, but are all starting open, I would like only the first item of my collapse stay open. If you double-click on one of the items, it…
-
0
votes1
answer345
viewsQ: Asp.Net Mvc Remote Validation
So I’m trying to implement RemoteAttribute, but by clicking the button submit, is not giving the post on my page. My Controller public class TesteRemoteController : Controller { // GET: TesteRemote…
-
3
votes2
answers486
viewsQ: Asp.net mvc Bad Request
When using the class HttpStatusCodeResult as a return to a Action, how do I redirect the user to a custom page according to the error?
-
0
votes2
answers87
viewsQ: Add new Controller
When adding a new Controller in my project using the option MVC 5 Controller with views, using Entity Framework I’m having the error there was an error running the selected code generator, according…
-
1
votes1
answer287
viewsQ: MVC Helper Menu
I’m having some difficulty in assembling a Helper to assemble the system menu This is my view @model…
-
4
votes1
answer892
viewsQ: Ajax request
I am loading the menu, from the system I am developing, through a request via ajax using jQuery, but the formatting of the menu is not as expected. My request via jQuery <script…
-
2
votes3
answers516
viewsA: Column outside the SELECT WHERE condition
The solution to your case is to use a subconsulta, which is as follows:. ,'Titulo Total' = (SELECT COUNT(*) FROM FIN_Titulos TitulosTotal WHERE NotasFiscais.ObjID = TitulosTotal.ObjIDDoctoOrigem)…
-
2
votes1
answer103
viewsA: Converting an SQL from Sql Server to C#LINQ
Your ROW_NUMBER() would be something equivalent to Top from what I understand. For this your query could use the Take which returns a specified number of contiguous elements from the beginning of a…
-
0
votes2
answers593
viewsA: How to pass filenames to a Datagridview using Folderbrowserdialog?
You can use the class FileInfo which provides properties and instance methods for creating, copying, deleting, scrolling and opening files. List<string> selectedPath =…
-
1
votes1
answer60
viewsA: Sort values of a <li> by date C#
a solution to your problem, would be to use a OrderBy in his foreach, being like this: foreach (ScriptorContent horas in Model.Parts.Channel[0].Contents.OrderBy(a=>a.Campo))…
c#answered Pablo Tondolo de Vargas 5,444 -
1
votes2
answers1253
viewsA: How to prevent duplicate registration/name change/social reason
The way I use to check is through the following query select Id from Tabela where Id <> @Id and Cpf = @Cpf Thus, if the query returns any result, it means that the record already exists in the…
c#answered Pablo Tondolo de Vargas 5,444 -
6
votes1
answer935
viewsQ: Modular Programming
Something quite common in the development of systems for business and how to satisfy several requirements, being these requirements often not used by certain customers, such as when a sales company…
c#asked Pablo Tondolo de Vargas 5,444 -
9
votes3
answers6039
viewsA: What’s the difference between DLL and lib?
Briefly, a DLL is a library that contains functions, which can be called at runtime by the application, thus giving a dynamism in its use. Already the LIB is a static library whose methods can only…