Posts by hard123 • 2,329 points
176 posts
-
1
votes1
answer36
viewsQ: Error formatting the Json
I need to generate and expose a Json via web api and the doubt is as follows: 1st. - You cannot expose the attribute "services":null, as the Json generated by me described below ? 2nd. - How do I…
-
1
votes1
answer438
viewsQ: Error passing parameter through Getasync method
How I pass the object login as a parameter for the method GetAsync ? I’m trying to do it this way, but I didn’t get the error message: private async Task<JsonResult> obterLogin(Login login) {…
-
1
votes2
answers693
viewsQ: Find phone numbers inside a txt file
How can I list files .txt which contains numbers of telephones in that format (99)99999-9999 cellular and (99)9999-9999 fixed ? This is the code I’ve made so far, just need to find inside the file .…
-
0
votes1
answer53
viewsQ: Replacing Checkbox with a String
I need to show off "Active" or "Inactive" in the column Situation of Datagridview, how to do ? This "Situation" Column is of the Boolean type: This is the code where I fill out the Datagridview:…
-
-1
votes1
answer161
viewsQ: How to do this grid with bootstrap?
I’m trying to make this grid with bootstrap but without success: I tried to do with table html and div: <table> <thead></thead> <tbody> <tr> <td> <div…
-
0
votes1
answer32
viewsQ: Why does my Endereco model return null after the postback?
Why did my model Addressee returns null after the postback?: Model: public class Paciente { public Paciente() { Endereco = new List<Endereco>(); } [Key] public int PacienteID { get; set; }…
-
2
votes2
answers271
viewsQ: How to eliminate duplicate lines without using distinct?
The query below returns me the following: IF object_id('tempdb..#tmpHistorico') IS NOT NULL BEGIN DROP TABLE #tmpHistorico END CREATE TABLE #tmpHistorico ( Id int not null, IdColuna1 int not null,…
-
1
votes0
answers38
viewsQ: Azure and SQL Server MV Configuration
I need to develop a system for a medical clinic and this system will be accessed by 2 Receptionist and 2 Doctors. Initially the System is not complex but tends to grow as the Clinic will hire more…
-
0
votes2
answers796
viewsQ: Error inserting a "SELECT" item into the Combobox
How do I add an item to the Combobox? The item has to be the first on the list with the text "SELECT": I’m doing like this: private void PreencherCmbIndicacao() { try {…
-
3
votes2
answers1405
viewsQ: Add a checkbox column to the datagridview
How to add a Checkbox column in Datagridview ? I need to do this for the user to select the Datagridview line with the Checkbox and then click the Save button. private void…
-
0
votes1
answer138
viewsA: How to create Checkbox dynamically with windows Forms?
The problem was that the controls were being created overlapping each other, missing to define the Location and stayed like this: private void btnAdicionar_Click(object sender, EventArgs e) { try {…
-
0
votes1
answer138
viewsQ: How to create Checkbox dynamically with windows Forms?
I have a list that returns from the database and for each record I need to create a checkbox of dynamic form, I did a search and found some examples for Webforms and I need an example for Windows…
-
0
votes1
answer38
viewsQ: Mask for variable size input field with windows Forms
How to make an email mask in a Windows Forms application ? To using Maskedtextbox that to validate fixed size fields, example: ZIP CODE and CPF the problem is when the mask is of varied size for…
-
1
votes0
answers30
viewsQ: Right access Join association does not show all records
After I made the association between the tables the system shows only the records associated between the two tables: Tbpaciente and Tbmotivo. SELECT TBPaciente.*, TBMotivo.* FROM TBMotivo RIGHT JOIN…
-
0
votes1
answer359
viewsQ: Read html file and get the value of a selected select
I am reading an html file and need to get the value of value of select user selected, how to do ? HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); var select =…
-
1
votes1
answer962
viewsQ: How to create an array of data from an html table?
I need to input the data from table html in a array. The current scenario doesn’t allow me to add class or id for the tags <td> (which would make me much easier), later I started the code…
-
4
votes2
answers8557
viewsQ: How to run the INSERT script with one million lines in SSMS?
I’m trying to run a script on SQL Server Management Studio (SSMS) with more than 1 million records and the following error occurs: Message 10738, Level 15, State 1, Line 1032 The number of line…
sql-serverasked hard123 2,329 -
0
votes2
answers67
viewsQ: Error taking the specific value of a dynamically created input within an html table
I have an html similar to the html below and I need to get the value of an input that is within a sub table who is contained within one another table from the click the Insert button, I saw some…
-
0
votes2
answers45
viewsQ: How to add the value of the id attribute and the text of a select from the click of a button event?
I need to add to the object Select the Id and the Texto from that function: //Adiciono o item retirado da table html para o objeto html Select $.each(_arrDescricao, function (text, key) { var option…
-
1
votes1
answer442
viewsQ: How to select multiple radios button in the same column of an html table?
I have a table html with 3 columns and 3 rows and when I select, for example radio button of line number 2 the line number 1 unchecks. @if (Model != null && Model.Tabela1!= null &&…
-
1
votes0
answers259
viewsQ: How to edit data from a table in a modal bootstrap?
How to load a modal bootstrap through a link within a tag < td > and send together column value Code, Name and Date example: jquery: $(document).on("click", "#lnkEditar", function () {…
-
0
votes1
answer2783
viewsQ: How to add an inputmask email mask to an input field within a table?
How to add an email mask inputmask in a field input within a table html dynamically created? Example: <tr role="row" data-row-index="0"> <td class="text-center"> <input…
-
2
votes2
answers429
viewsQ: How to popular an object with the return of a Webapi query?
How popular the variable _clientes guy Cliente with the return of a consultation to a WebApi? Following the great suggestion of Damon Dudek I came across the error below: public class…
-
1
votes1
answer294
viewsQ: Implementing the concept of inheritance in a database
Why the attribute PessoaJuridicaId is not generated? This is the base class Pessoa: public class Pessoa { public Pessoa() { DataCadastro = DateTime.Now; } public int PessoaId { get; set; } public…
-
0
votes1
answer347
viewsA: Improve performance when generating excel spreadsheet
Fixed. The Exception error of type 'System.Outofmemoryexception' was thrown. was due to a type of varbinary data that was not being treated correctly.
-
0
votes1
answer157
viewsA: Display a wait message while downloading a file
That was my solution: jQuery Blockui Plugin the implementation was easy as stated on the site.
-
3
votes3
answers4669
viewsA: Consuming Web Service with Login and Password
After a few adjustments the solution was like this: [HttpPost] public ActionResult Index(string url, string login_senha) { var _url =…
-
1
votes3
answers4669
viewsQ: Consuming Web Service with Login and Password
I received these guidelines to access and consume the list methodProducts of a Webservice: Standard form of authentication of Java application webservices for entities and associates The client must…
-
2
votes0
answers586
viewsQ: Is it possible to generate the XSD file from XML?
Doubt is how to generate the file .xsd from the xml ? I was analyzing this tutorial C# - Basic XML Operations and it doesn’t say how. It is possible ? XML <?xml version="1.0" encoding="utf-8"…
-
2
votes1
answer64
viewsQ: Doubt in conversion of rows into columns Sql Server 2012
I turned rows into columns and need to improve this query by adding another row in column: This is the query: --****************************EMPRESA******************************…
-
1
votes3
answers314
viewsQ: Jquery function does not find the Controller when I go up to the server
During development the function below finds the Control and makes the request correctly, but after publishing on the server the function no longer finds the Controller: During the development I have…
-
0
votes1
answer157
viewsQ: Display a wait message while downloading a file
How to display the wait message during file generation and compression for dowload ? I’m doing generation, compassion and Generate more than one PDF in memory and export it in a compressed file…
-
1
votes1
answer5846
viewsQ: Scroll through all rows of an Html table and hide if any column 5 is empty
I have no advanced knowledge with jquery and need to go through all lines of an HTML table and hide the Line entire case the column from of the number 5 (JUS) be empty and update the sequence…
-
0
votes1
answer808
viewsQ: How to go through all columns of a jquery table and hide if empty
I have a table html with 15 lines and I need to go through all the columns and check if there is any value, if Column is equal to empty then hidden this column, I know that this example below hides…
-
1
votes1
answer347
viewsQ: Improve performance when generating excel spreadsheet
I’m using this generated NPOI to create excel spreadsheets and am facing the following problem: The generated spreadsheet has 300 lines and takes 1 minute to be generated and sometimes error…
-
0
votes1
answer195
viewsA: Dynamically hide a Webgrid column
I found the solution that worked for my scenario: var gridColumns = new List<WebGridColumn>(); if (Model.Empresa != null) { gridColumns.Add(grid.Column("Empresa", "Empresa")); };…
-
0
votes1
answer195
viewsQ: Dynamically hide a Webgrid column
How can I hide at runtime a column from Webgrid ? For example, I want to hide the column Parametro, it would be something like that: grid.Column("Empresa", "Empresa"), if(item.valor1 == X){…
-
2
votes1
answer1648
viewsQ: How to assign a EXECUTE SP_EXECUTESQL @SQLSTRING to a temporary table
It is possible in the same script to create a temporary table from an execution like this? --****************************EMPRESA****************************** if(Object_id('tempdb..#TBEmpresa') is…
-
0
votes1
answer172
viewsA: Error creating a condition in Webgrid’s Html.Raw
Solved by placing the tag inside a String.format: return Html.Raw(string.Format("<text><div><a href=\"{0}\" target='_blank'>{1}</a></div></text>",…
-
0
votes1
answer172
viewsQ: Error creating a condition in Webgrid’s Html.Raw
I am trying to put a condition in a Webgrid line and the following error occurs: Cannot convert lambda expression to type 'string' because it is not delegate type Even based on this post Variable…
-
1
votes1
answer20
viewsQ: Variable content is not displayed in the View
Instead of displaying the value of item.Endereco in Webgrid what is displayed is a text @item.Endereco.Length > 0 ? item.Endereco.Substring(0, item.Endereco.Length - 3) item: item.. In my current…
-
0
votes1
answer89
viewsA: Error while paging using Pagedlist with List<Dinamyc>
No need to use the PagedList, just use the Skip and the Take that works perfectly: dns = Util.DataTableParaDynamic.ConverterDtParaList(dt); if (dns.Count > pageNumber) { ViewBag.Total =…
-
0
votes1
answer89
viewsQ: Error while paging using Pagedlist with List<Dinamyc>
I’m trying to make a pagination of a Webgrid using Pagedlist but there is conversion error: Additional information: Cannot convert type implicitly 'Pagedlist.Pagedlist' in…
-
2
votes1
answer2388
viewsQ: How to download file via $.ajax()
This doubt arose from this post Send data to an Actionresult from a Controller other than the current one answered by Tiago S, currently have this ActionResult that downloads file through a Post in…
-
1
votes2
answers281
viewsQ: Send data to an Actionresult from a Controller other than the current one
How to make a post sending data to a ActionResult of a Controller different from the current ? Example: I have a link called lnkEnviarDados and I need to post on the page sending the contents of the…
-
1
votes2
answers2012
viewsQ: System.Outofmemoryexception error
I don’t know how to solve this problem: As noted by Marcos Marques this is about the size for each record in total of 4 thousand records. Where can I improve the code: public ActionResult…
-
0
votes1
answer154
viewsA: Type varbinary sql server attribute with c#
Problem solved after changing the type of data in the model: from string for byte[].
-
-1
votes1
answer154
viewsQ: Type varbinary sql server attribute with c#
That column DocumentoPDF until now it was not used by the: I mean I was always null, however at some point added values and then error occurred in my query linq and the problem is that at the moment…
-
2
votes2
answers1339
viewsQ: Open PDF in browser automatically after download
The downalod from the PDF is executed correctly (is minimized at the bottom corner of the browser). How to make it open automatically in a new guide ?: <a href="#" class="download"…
-
4
votes3
answers1052
viewsQ: How to filter a list type Ienumerable<> through another Ienumerable<>?
How to filter a type list IEnumerable<> passing a parameter of type IEnumerable<> preferably via expression lambda or linq? Based on the filter below I expect this result: {MundoId = 0,…