Posts by Italo Rodrigo • 4,344 points
275 posts
-
2
votes3
answers1085
viewsQ: How to insert row at the top of a table using JS?
I use the code below to insert a row in a table: var linha = "<tr>"; linha += '<td class="cnes">' + cnes + '</td>'; linha += '<td class="cbo">' + cbo + '</td>'; linha…
-
0
votes1
answer254
viewsQ: What does ns3 and ns4 mean in an XML file?
<ns3:dadoTransporteTransportXml> <uuidDadoSerializado>5444429-da1cb4c9-ea75-4149-bb10-def6a6173731</uuidDadoSerializado> <tipoDadoSerializado>4</tipoDadoSerializado>…
xmlasked Italo Rodrigo 4,344 -
2
votes2
answers116
viewsQ: How to use a tag property, using Jquery
I have a dynamically filled component <select id="selectTeste"> <option value='1' exigeIdade='true'>item 1</option> <option value='2' exigeIdade='true'>item 2</option>…
-
2
votes1
answer38
viewsQ: Help with Join in lambda query
I have the classes: profissional { int id; int idUnidade; string nome; } unidade { int id; string nome; } profissionalUnidade { string profissionalNome; string unidadeNome; } I’m making an…
-
8
votes2
answers3578
viewsQ: Is there a size limit for data transmitted via POST?
I sent a form via GET with a large number of text (about 6,000 characters) and received a very long URL error. I did the same test via POST and the data was successfully sent. My question is whether…
httpasked Italo Rodrigo 4,344 -
0
votes1
answer1157
viewsQ: How to take the contents of an HTML Table and convert into a C# List<>?
I have a table html which is created dynamically by the user. I need to take all the data entered by him in the table and generate a List to be able to save later in a database. Below are project…
-
1
votes1
answer2524
viewsQ: How to adjust Select size in Bootstrap?
I’m learning Bootstrap to make a simple page and want to increase the size of my Select. See the current code: <div class="container"> <div class="row"> <div class="col-md-12">…
bootstrap-3asked Italo Rodrigo 4,344 -
0
votes2
answers737
viewsQ: How to get the value and label of a datalist using jquery?
I have a datalist, that I wear like this: <input id="estabelecimento" list="listaEstabelecimento"/> <datalist id="listaEstabelecimento"> <option value="valor1"…
-
1
votes1
answer1240
viewsA: How to set up my website homepage?
Change the file RouteConfig.cs of the briefcase App_Start and complete with the following code: public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) {…
asp.net-mvcanswered Italo Rodrigo 4,344 -
2
votes1
answer1240
viewsQ: How to set up my website homepage?
Usually I create my websites in MVC using the default template that comes in Visual Studio. Today I created a new project without using a template and when testing it I received an error: A standard…
asp.net-mvcasked Italo Rodrigo 4,344 -
3
votes1
answer66
viewsQ: Simulate a Master/Detail report with foreach
I have a table as follows: public class Producao { string unidade; string profissional; string procedimento; } I can take all the records stored in the table and play them on a list listaProducao.…
-
0
votes3
answers118
viewsA: Logic for using foreign key - a user’s notes
Do so for user average 1: select media from TABELA where idUser = 1 To catch everyone’s average: select (sum(media) / count(*)) as mediatotal from TABELA…
-
3
votes1
answer110
viewsQ: Does "Join" make the search faster?
I have two tables, one of patients and the other of consultations. In short, the tables have the following structure: Patients int id; string nome; string cartaoSus; Consultation int id; int…
-
4
votes2
answers836
viewsQ: What code should be used to focus a Textbox?
What code should be used to focus a Textbox? I am creating a system, where I need that when the client keystrokes ESC, the focus of the textbox is lost. How do I do?
-
1
votes1
answer34
viewsA: How to update one Datagridview when changing the other?
The best way to do this is by using the event SelectionChanged of DataGridView…
winformsanswered Italo Rodrigo 4,344 -
0
votes1
answer34
viewsQ: How to update one Datagridview when changing the other?
I have a DataGridView called gridProfissional which lists all the professionals I have registered in a table. I have another DataGridView called gridAgenda that lists the days that the professional…
winformsasked Italo Rodrigo 4,344 -
1
votes2
answers75
viewsQ: How to make an if in a select when creating an object?
I don’t know if the title is right, but the question is this:: listaAgendaDetalhe = (from a in listaAgenda join p in listaProfissional on a.idProfissional equals p.id select new agendaDetalhe() {…
-
1
votes5
answers1583
viewsA: How to read data from the Mysql database of an application in c#?
change: command.CommandText = "SELECT id from hackers where Nick= "+textBox1.Text; for command.CommandText = "SELECT id from hackers where Nick like "+textBox1.Text; Although I recommend using…
-
0
votes1
answer219
viewsQ: Error starting a new Xamarin project
I installed Visual Studio 2017 a little while ago and everything works normal. Since yesterday I try to create a new project Xamarin and I get the following message: Error: this template attempted…
-
1
votes1
answer499
viewsQ: How to dynamically grab the Content folder directory?
My question is the same as the title: how to create a variable that points to the Content folder? I have a file there and I want to access it. I tried so but unsuccessfully: StreamReader file = new…
-
1
votes1
answer52
viewsQ: How to return warning in a View if there is no data to display?
I created the code below that generates a list. It checks whether the list contains any data saved in it or not. If you have data, returns a View with the list inside, if you have no data, returns…
-
0
votes3
answers338
viewsA: How to anchor a redirect in APS.NET MVC
Just use HTML anyway, do so: The link: <a href="#idDoElemento">Meu link teste</a> His element <p id="idDoElemento">teste</p> i.e., in the link, type # + the id of the element…
-
3
votes2
answers2570
viewsQ: IIS lists directory instead of opening page
I created a website in Visual Studio 2017, clicked to publish it and copied the files to the Inetpub/wwwroot folder However, instead of the page being displayed, the url is returning me to the list…
-
5
votes1
answer3473
viewsQ: How to publish website made in Visual Studio?
I created a MVC site in Visual Studio 2017. I want to know how to generate the necessary files for the site to work and in which folder I should include them.
-
0
votes1
answer328
viewsQ: How to have more than one column shown in a Combobox?
The question is the same as the title, I have a ComboBox called txtProfissional and set up the same way: txtProfissional.DataSource = modelOff.profissionals.Where(p => p.idUnidade ==…
-
-2
votes1
answer1304
viewsQ: How to read attributes of a line in XML?
I have an XML file with the following structure: <?xml version="1.0" encoding="ISO-8859-1"?> <FIELDS> <FIELD attrname="CO_UNIDADE" fieldtype="string" WIDTH="31"/> <FIELD…
c#asked Italo Rodrigo 4,344 -
4
votes1
answer65
viewsQ: How to calculate the time of a LINQ query?
I have a table with +- 900mil records. I make some queries using clauses where and I want to see the time difference between them. How do I show time in one label at the end of the consultation?…
c#asked Italo Rodrigo 4,344 -
0
votes1
answer938
viewsA: Wordpress redirecting home to localhost
Go to settings > general and change fields: Wordpress address (URL) and Address of the website (URL)
wordpressanswered Italo Rodrigo 4,344 -
1
votes2
answers2495
viewsA: How do I sort the list alphabetically in the Standard?
$childs = DB::table('agents') ->select('id', 'username', 'parent') ->where('id', '>=', $user_id) ->orderBy('CAMPO', 'asc') ->get();…
-
2
votes1
answer147
viewsQ: Make calculation using LINQ
I am developing a program in c#. In it I have three tables: produto { string idProduto; string descricao; } entrada { string idProduto; int quant; } saida { string idProduto; int quant; } and I want…
-
1
votes2
answers304
viewsQ: Pick all fields of a class using Lambda + Group By
I have a list: produtosCompletos = (from f in estoques join p in produtos on f.idProduto equals p.id join c in classes on f.idClasse equals c.id select new produtoCompleto() { idUnidade =…
-
0
votes1
answer7455
viewsQ: How to use group by in LAMBDA
I have a product table: int id string descricao int quant Here’s what I wanna do: select descricao, sum(quant) from produtos group by descricao How to make the above query in lambda?…
-
1
votes1
answer29
viewsQ: How to include if command to add a new object to a list?
I use this command to save a new pessoa a list: class pessoa { string nome; int idade; int sexo; } List<pessoa> pessoas.add(new pessoa() { nome = "italo rodrigo", idade = 34, sexo = 1 }); To…
c#asked Italo Rodrigo 4,344 -
0
votes1
answer91
viewsA: Error connecting to Mysql using EF6
With the links Virgilio Novic gave me,: Stop the Mysql service; Re-start the Mysql service; Execute the following command: use NOME_TABELA; set global optimizer_switch='derived_merge=OFF';…
-
1
votes1
answer118
viewsQ: Table with primary key that never repeats
I have a table Produto (id, descricao, tipo) and that same table is on three different computers. All three write data to your machine and from time to time send the data to a server. What happens…
-
1
votes1
answer344
viewsQ: How to choose the first form to be displayed?
When I run my project, fmPrincipal is always open, however, I decided to create a fmLogin to be displayed first and the user login to it. How do I set up fmLogin to be displayed first?
-
2
votes2
answers102
viewsA: Doubt with Try Catch
I got this code from Devmedia support: var bancoOnTx = bancoOn.Database.BeginTransaction(); var bancoOffTx = bancoOff.Database.BeginTransaction(); try{ //faz as transações bancoOn.SaveChanges();…
c#answered Italo Rodrigo 4,344 -
4
votes3
answers614
viewsQ: How to create a custom list using data from four tables?
I have the following class: Nota { int id; int idFornecedor; int idProduto; int idClasse; } and I have the respective classes for the previous class ids: Fornecedor { int id; string descricao; }…
-
6
votes1
answer84
viewsQ: How to start a variable correctly?
There is a difference between these two ways to start a variable? List<classeterapeutica> itens = new List<classeterapeutica>(); modelOff.classeterapeuticas.ToList(); or…
-
1
votes1
answer621
viewsA: How to compare the structure of two tables and update the other?
You can do it through the Mysql Workbench: First, you have to convert your schema into a model, do so: Database > Reverse Engineer Select Database > Next Next Select the schema you want to…
-
0
votes2
answers102
viewsQ: Doubt with Try Catch
I have the following code: try { modelOn.pacienteOns.Add(Conversao.pacienteToOn(oObjeto)); oObjeto.online = 1; modelOn.SaveChanges(); modelOff.SaveChanges(); } catch (Exception i) {…
c#asked Italo Rodrigo 4,344 -
0
votes1
answer409
viewsQ: How to hide password from app.config file?
Whenever I go to create a new stringconnection, Visualstudio asks me if I want to leave the visible password in the app.config file I always say yes, because I don’t know how to insert it directly…
visual-studioasked Italo Rodrigo 4,344 -
3
votes2
answers35
viewsQ: Notsupportedexception error when setting value to a Datasource
I have a textbox and want, when typing something, the datasource of my gridFornecedor be updated. I’m using the code below: private void txtNome_TextChanged(object sender, EventArgs e) {…
c#asked Italo Rodrigo 4,344 -
0
votes1
answer91
viewsQ: Error connecting to Mysql using EF6
I’m getting the bug 'System.Data.Strongtypingexception: The value for column 'Isprimarykey' in table 'Tabledetails' is Dbnull Whenever I try to connect to a Mysql database using Entity Framework 6.…
-
0
votes1
answer57
viewsA: Create code to update Schema
I found the following code: IF NOT EXISTS( SELECT NULL FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tablename' AND table_schema = 'db_name' AND column_name = 'columnname') THEN ALTER TABLE…
mysqlanswered Italo Rodrigo 4,344 -
1
votes1
answer57
viewsQ: Create code to update Schema
Use Mysql Workbench to manipulate my Mysql database and tables. When I export the table, it generates a code similar to the code below: CREATE TABLE `entrada` ( `id` int(11) NOT NULL AUTO_INCREMENT,…
mysqlasked Italo Rodrigo 4,344 -
3
votes1
answer1020
viewsQ: Mysql connection does not appear in Data Connection
I updated my Visual Studio to 2017 version and am trying to connect to a Mysql database through Entity Framework. What happens is that the option for connection in Mysql does not appear: Only SQL…
-
0
votes2
answers1184
viewsQ: How to read a user-submitted txt file?
I am learning Asp.net MVC and created a simple form: <form> <div class="form-group"> <label for="municipio">Nome do Município:</label> <input type="text"…
asp.net-mvcasked Italo Rodrigo 4,344 -
1
votes1
answer621
viewsQ: How to compare the structure of two tables and update the other?
The question is the same as the title: How to compare the structure of two tables and update the other? I have an online database, which I intend to update its structure. I also have some customers…
-
1
votes0
answers63
viewsQ: How to update an application made in Windows Forms online?
I created an application in windows Forms and, as I am still developing and adjusting the same, I need to be updating periodically. my program is being used on five different machines and whenever…