Questions tagged as 'c#'

1
answer

C # Moving Files

I'm making an application, and at a certain point it does the following: Checks whether a file to be created already exists in a directory (output), if it already exists, it sends it to the Errors folder, otherwise it sends it to the output f...
asked by 28.04.2015 / 18:40
1
answer

Check if email is valid?

I'm using this function to check: public static bool IsEmail(string strEmail) { string strModelo = "^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"; if (System.Text.RegularExpressions.Regex.IsMatch(...
asked by 05.07.2015 / 02:09
1
answer

Get Project URL

Hello, I need to get the url where my project (wpf) is located. The reason is this: there is an image upload to the Image folder (which is in the solution of my project) and I need the url of it so that the image is saved in the correct folder....
asked by 10.05.2015 / 16:49
1
answer

Error loading MonoDevelop Library

I'm trying to use the Newtonsoft.Json library in mono, but I get the following error: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=null' or one of its depen...
asked by 15.04.2015 / 21:21
1
answer

Radio button using ViewData for an MVC model

I have a ViewData and would like to make it a RadioButton for a model ViewData["tiposPagamento"] = dbo.TiposPagamento.Where(_=>_.Ativo); Radio Button: @Html.RadioButton(m=>m.TipoPagamentiID, ViewData["tiposPagamento"]) But just...
asked by 16.04.2015 / 12:43
1
answer

Is it possible to use copyBulk with datatable to load data into DBMS?

I went through an experience of loading large data from a text file, which needed to be criticized before writing to BD. I used DataTable with copybulk. I realized that loading data into DataTable and later into DB was fast. I have received crit...
asked by 14.04.2015 / 23:47
1
answer

Generate PDF images using PDFSharp -Windows Form

I'm using window form .net and would like to convert scanned images to PDF, thus generating PDF images. I'm using PDFSharp. I have the following code but it only generates a page. What commands should I use to generate grab the images and genera...
asked by 31.03.2015 / 16:08
1
answer

Update tables with the same data in row

When I add a A category, and add a X product with the A category (categories table), after that it will edit the category name A to category B , the category of product X (table products) remains with the category...
asked by 09.06.2015 / 19:13
1
answer

Multiplicity restriction violation

Has anyone ever come across this error in an asp.net mvc application?    Application Server Error '/'.       A relationship multiplicity restriction violation occurred: an EntityReference can not have more than one related object, but the que...
asked by 09.06.2015 / 20:38
1
answer

How to open pdf bytes in a new tab in the browser

I have the bytes of a report in pdf but I just found how to download it. byte[] bytes = Relatorio.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings); HttpResponse response = Ht...
asked by 09.06.2015 / 15:13