Posts by alessandre martins • 998 points
69 posts
-
0
votes1
answer25
viewsQ: error with Insert and mysql
I have the following method: public byte[] CarregarArquivoImagem( Int64 idVenda,string nomeArquivo, string caminhoArquivo, int ImagemTamanhoMaximo) { string query = null; MySqlDataReader reader;…
-
-1
votes1
answer48
viewsQ: Query Problem C#/Postgres
I have the following method: private static List<ProdutosTmpModel> GetInListaPromo_caddespd(Dados dados, Empresa emp) { //busca todas os produtos das listas vigentes StringBuilder command1 =…
-
1
votes0
answers142
viewsQ: error with windows forms
Created an application, on my pc runs normally, but on the client’s pc presents the following problems: here the full description: Assinatura do problema: Nome do Evento de Problema: CLR20r3…
-
3
votes2
answers64
viewsQ: Doubt with string, extract data
I have the following string [{"tipo":"simnao","pergunta":"rwerwerwerewr ?","tag":"#acimadopeso","resposta":"","$$hashkey":"object:410"},{"pergunta":"werwerwerwer…
-
1
votes0
answers40
viewsQ: doubts with Entity Framework / SQL
I have the following script: when I execute it, I get the following answer: but when run by Entity Framework, the return is totally different, on all lines, the answer is the same, is it a bug? or…
entity-frameworkasked alessandre martins 998 -
1
votes0
answers70
viewsQ: Doubt with LINQ to Entities
What would this query look like in LINQ to Entities: SELECT COUNT(cont) qtde_resp , pergunta , resposta FROM pesq_respostas WHERE id_pesquisa = 9 AND Tipo IN ('Intervalo', 'SimNao') GROUP BY…
-
0
votes0
answers167
viewsQ: difficulty with access to mysql
I am trying to connect remotely to a mysql in google cloud, but I can’t. in google I created an Ubuntu vm, last version, this is my ip, this dripping normally: I configured the firewall as follows:…
-
-1
votes2
answers114
viewsQ: doubt to consume api
I have the following service: [HttpGet] [Route("save")] public async Task<dynamic> save(VendaModel[] venda, string CnpjEstab) { dynamic retorno = null; VendaModel ultima = new VendaModel();…
-
0
votes2
answers94
viewsA: doubt with Linq to sql
I managed to solve as follows: using (var context = new ClassContexto(ClassMaster.conexao())) { var arrvendas = context.VendaModel.Where(w => w.id_empresa == idEmpresa && w.dt_venda >=…
-
-1
votes2
answers94
viewsQ: doubt with Linq to sql
Guys, I got two tables, sale and blindfolds: Sale: [Table("venda")] public class VendaModel { [Key] [Required] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int id_venda { get; set; }…
-
0
votes1
answer63
viewsQ: doubt with nesting json / array
have this json { "MedPaciente": [ { "ProdutoModel": { "LaboratorioModel": { "id_laboratorio": 7951, "nome": "BOEHRINGER INGELHEIM", "data_cad": "28/12/2017", "situacao": 1 }, "id_produto": 232,…
-
0
votes1
answer182
viewsQ: doubts with jsPdf - column definition
I have the following json { "MedPaciente": [ { "ProdutoModel": { "LaboratorioModel": { "id_laboratorio": 7951, "nome": "BOEHRINGER INGELHEIM", "data_cad": "28/12/2017", "situacao": 1 },…
-
1
votes2
answers755
viewsQ: doubt with web printing
People in my project use MVC, on the front end use angular/html/js, etc. I need to print a report, what’s the best way to do it? what tools to use? I ran a test using this code: $scope.printReceita…
-
0
votes1
answer43
viewsQ: doubts with Mysql somatorio
I have the following tables the contamov table, may have several low of the same record of the crecpa table. need Select records from the crecpa table and the sum of the low (value field) of each…
-
1
votes2
answers824
viewsA: Return predefined values depending on logical condition
I managed to solve it, it stayed that way(I removed the name of the field that was right after the word CASE): SELECT con.id_crecpa, con.id_crecpa, con.descricao, con.diabase, con.dt_emissao,…
-
1
votes2
answers824
viewsQ: Return predefined values depending on logical condition
I got the following script mysql: SELECT con.id_crecpa, con.id_crecpa, con.descricao, con.diabase, con.dt_emissao, con.dt_quitacao FROM crecpa con INNER JOIN pessoa pes ON con.id_pessoa =…
-
3
votes3
answers436
viewsQ: error saving or updating with Entityframework
I have the following method: using (var context = new ClassContexto(ClassMaster.conexao())) { using (DbContextTransaction tran = context.Database.BeginTransaction(IsolationLevel.ReadCommitted)) {…
-
1
votes1
answer141
viewsQ: doubt expression Innuendo, clause IN
I have the following expression retorno = (from ven in context.VendaModel select new { ven.barras, ven.data, ven.valor }).ToList(); I need to search only what you have on a list that will be passed…
-
5
votes1
answer137
viewsQ: Convert SQL query to LINQ
How would this SQL query convert to LINQ: "SELECT SUM(valor_negocio) valor_negocio, " + " MONTHNAME(STR_TO_DATE(MONTH(data_inicio), '%m')) mes," + " STATUS" + " FROM negocio" + " WHERE data_inicio…
-
1
votes0
answers29
viewsQ: problem with Entityframework
see the return of the script, running directory in mysql, by sqlYog: However, when I run in Visual Studio, the return is different: Serialized result: "TotalMesAMes": [ { "mes": "January", "status":…
-
0
votes4
answers70
viewsQ: How to return the sum of the business value column, month by month, based on the starting data_column?
I have the following table: I need an SQL statement that returns the sum of the business value_value column, month by month, based on the start data_column. Example: I need the name of the month and…
-
2
votes1
answer358
viewsQ: sum column lambda expression
I need to return the sum of the column value_business, I have the following expression dynamic contato = (from a in context.Negocio join cli in context.Pessoa on a.id_cliente equals cli.id_pessoa…
-
8
votes1
answer154
viewsQ: Doubt with ng-repeat
I have the following code: <div id="box-1" class="box"> <div ng-repeat="task in contato " style="margin-top: 5px"> <div class="md-card md-card-hover"> <div…
-
1
votes1
answer113
viewsQ: Linq Return all records when ID is NULL
Consultation: retorno = tarefaRep.GetAll(c => c.status == 0 && c.id_empresa == idEmpresa && c.id_cliente.ToString().Equals(idCliente) &&…
-
1
votes1
answer880
viewsQ: Treeview with checkbox and Angularjs?
Someone has some example code, of a treeview with checkbox, done in html, angular and json? Observing: I looked at several examples around, but I couldn’t make any of the examples work.…
-
2
votes1
answer166
viewsQ: How to initiate a method when the user presses the delete or Return (delete) key?
In my form I have a client field. I need that when the user presses the delete or Return (delete) key, a method that I have in my controller is triggered, how can I capture if one of these keys was…
-
-2
votes3
answers128
viewsQ: how to paint an expired date with css
I have a table that shows the payoffs, how can I leave the red font or the red background if it’s expired? using css my table is mounted as follows <table id="myTable" class="uk-table sortable…
-
0
votes0
answers53
viewsQ: doubts with modal and javascript
I have this modal: <div class="uk-modal" id="modalbaixados"> <div class="uk-modal-dialog"> <div class="uk-form-row"> <div class="uk-grid"> <div><h3…
-
0
votes1
answer463
viewsQ: create div at runtime
I have the following html: <div> <h3>Use font awesome icons</h3> <div id="lobipanel-font-awesome" class="panel panel-info"> <div class="panel-heading"> <div…
-
0
votes3
answers1664
viewsA: Abbreviate content inside cell (HTML table)
was researching the same subject, as I am using Angularjs, it was very easy, I will leave Aki if anyone needs, I used an angle filter, the limiteTo, then I used ng-if, for q if it has more q x…
-
5
votes2
answers1163
viewsQ: Security Application Angular
I have questions about safety, I will exemplify : In my front, in my controller have that method: $scope.getAllpessoaGrid = function (strPesquisa, tipopessoa) { $scope.progressbar.start();…
-
1
votes2
answers863
viewsQ: How to add attribute in JSON array?
I have the following JSON: [{"descricao": "teste", "January": "2454.00", "February": "220.00", "March": "1070.25"}, { "descricao": "teste2", "January": "275.00"}, { "descricao": "teste3", "January":…
-
-1
votes2
answers138
viewsQ: doubt with select sum() Mysql
I have these two tables, January and February: each field corresponds to the day of the month, D1= day 01, etc. I need to create a select that shows the monthly value of each account plan, example:…
-
0
votes0
answers123
viewsQ: doubt with checkbox / angular
Guys I got this table: <table class="uk-table uk-table-nowrap"> <thead> <tr> <th class="uk-width-1-10 uk-text-center small_col"><input type="checkbox" icheck…
-
1
votes1
answer658
viewsQ: save in file a return from backend
my backend controller returns a file of type xlsx to my front, this is the method that makes the return: public FileResult ListarLivrosExcel() { // Gerando minha planilha e recebendo-a using…
-
1
votes1
answer7308
viewsQ: Row height problem in an HTML table
I used the following code to show some data in a table: <table> <thead> <tr heigth="2px"> <th align="left" width="180">Nr DBC</th> <th align="left"…
-
2
votes1
answer49
viewsQ: error with EF and Mysql query
I have the following consultation: var produto = (from a in context.ItensReceita join b in context.Receita on a.t0080_id_receita equals b.t0080_id_receita join c in context.Medicamento on…
-
0
votes1
answer47
viewsQ: Doubt in consultation with Entityframework
how do I consult with EntityFramework? with lambda or linq SELECT t0051_id_medicamento, t0100_lote, SUM(t0100_qtde) FROM t0100_historico GROUP BY t0051_id_medicamento, t0100_lote;…
-
0
votes1
answer455
viewsQ: How to run SQL with Entity Framework?
I tried to execute a command SQL for Entity Framework, tried in the following ways: string cmd = "UPDATE t0071_compra SET t0071_status = 'Enviado' WHERE t0071_id_compra = 4 AND t0020_id_empresa =…
-
0
votes1
answer189
viewsQ: Creating reports with ASP.NET MVC and Angularjs
Man backend is with C#/MVC, in the frontend use Angular, I’ve reached a point in the project where I need to create reports. How to generate reports in a web environment? Which tool do you use?…
-
3
votes4
answers961
viewsQ: how to generate an xml in memory
With the code below, I Gero a file and write somewhere, however, instead of writing to the disk, I wanted to generate in memory, as it does? using (var context = new…
-
1
votes1
answer504
viewsQ: extract data from a json
I got the following JSON: [{ "ItensReceitaModel": [{ "t0081_id_receita_itens": 1, "t0081_lote": "1233" }, { "t0081_id_receita_itens": 2, "t0081_lote": "123" }], "PacienteModel": { "t0031_id_pessoa":…
-
1
votes1
answer66
viewsQ: doubts with select and angular Js
I’m using the selectize and Angularjs, my selectize is configured like this: in the controller //configurando o select mrdicamento $scope.selectize_medicamento = { plugins: { 'remove_button': {…
-
4
votes1
answer1322
viewsQ: How to change the color of buttons when selecting a radio input?
I have this form When you check the "Bills to Pay" radio input, I need the buttons to turn red. I’m using Angularjs, so I used ng-if, but the code was quite extensive. How could I do it in a simpler…
-
-2
votes1
answer47
viewsQ: doubt with json
I have a json, in my form I have a button "Proximo" and "Anterior", I need to create a code that shows the next or previous record, as I click the buttons, I am using angular, someone could give a…
-
1
votes0
answers48
viewsQ: return JS method
I have the following method: $scope.upload = function (files) { if (files && files.length) { for (var i = 0; i < files.length; i++) { var file = files[i]; if (!file.$error) {…
-
1
votes2
answers380
viewsQ: Problems with modals
I’m using the template at Angular. I need to open a page inside a modal, so I used a code that was suggested by the template support: <script type="text/javascript"> $('#conteudo2').on({…
-
1
votes1
answer1330
viewsQ: take input values
I needed to create a code to generate inputs dynamically, below is the code: HTML <div id="divProdutoBase" style="display:none;"> Telefone: <input type="text" id="produto[]"…
-
0
votes1
answer214
viewsQ: doubt with file download
I have a folder in the cloud, and I want to generate a list in the html paginal, with all these files, so that when the user clicks, open the downlaod of the file, I am trying as follows(this code…
-
5
votes2
answers868
viewsQ: Is there a way to open an HTML page within a modal? How?
I have the following code that opens a modal: <div class="uk-modal" id="new_task"> <div class="uk-modal-dialog"> <div class="uk-modal-header"> <h3 class="uk-modal-title">{{…