Questions tagged as 'c#'

1
answer

Problems reading all the rows of an Excel with OLEDB and C #

I am developing a program to import Excel spreadsheets with language C# , using the OLEDB component, when importing a spreadsheet with 100547 rows the program can only read 54046. Here is the source code: public class Re...
asked by 29.03.2017 / 19:16
1
answer

Additional information: The input string was not in a correct format [duplicate]

What's wrong with my code? conexao.conectarBD(); conectar.Open(); comando.CommandType = CommandType.StoredProcedure; comando = new SqlCommand("INSERIR_CLIENTE", conectar); comando.Parameters.AddWithValue("@CODIGO", Convert.ToInt32(txtCodigo...
asked by 20.03.2017 / 20:26
0
answers

What is the best way to do database replication? [closed]

I have an application in WPF + MS ACCESS where users make registrations, queries, etc. The main server is located in SP, but we have branches in RJ, BA, MG, PR, RS, GO, etc., which also access the tool. Due to connection problems at these bran...
asked by 20.03.2017 / 14:44
0
answers

Insert Sequential Number in a C #

I have this table called ArticleBarCode : IntheCodecolumnIneedtoenterasequentialnumber,ieIhavetoreadthemaximumnumberthatisthereandinsertthenextonethatisavailable!Ihavetousethefollowinglineofcodetoseewhattheavailablevalueis:SELECTISNULL(MAX...
asked by 27.04.2017 / 17:52
1
answer

Retrieve IEnumerable values from View [duplicate]

I have a table / model called ItemPriceFactory: public class ItemTabelaPreco { public string Nome { get; set; } public decimal ValorUnitario { get; set; } public int QtdPacote { get; set; } public decimal ValorPacote { get; s...
asked by 27.04.2017 / 14:35
1
answer

Format String after it is converted from HTML

I made a code that turns all HTML into a String, however, by doing so the code is coming like this: <div class=\"page\">\r\n<div class=\"bloco\">\r\n <table id=\"canhoto\">\r\n The characters \ r \ n I can already remove...
asked by 15.03.2017 / 17:48
2
answers

Read specific XML tags?

I need to read tags specific to this file XML : <?xml version="1.0" encoding="UTF-8"?> <EnviarLoteRpsEnvio xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns...
asked by 14.03.2017 / 21:13
0
answers

iTextSharp PDF coming in white

Good afternoon guys, I have the following code: public void GerarPDF(long id) { string HTMLemString = RenderizaHtmlComoString("~/Views/item/item.cshtml", id); var regex = new Regex("(\<script(.+?)\</script\>)|(\&l...
asked by 14.03.2017 / 20:51
1
answer

Remove CSS link with Regex

Good morning, when pulling the html from the entire page in string it also brings some reference links: <link href="~/Content/item/item.min.css" rel="stylesheet" /> I've already removed the tags and, but I need to remove this and I'm...
asked by 15.03.2017 / 14:46
0
answers

Process.start () does not properly start another application

Hello. I have a solution consisting of three applications. One is a Windows service ( BoardService.exe ). Another is a Windows Forms application that opens a splash screen and creates an icon in the Windows clock tray ( BoardPlayer.exe ). The th...
asked by 13.03.2017 / 20:02