Questions tagged as 'c#'

0
answers

Multi-thread concurrency control

I need to develop a Windows Service with C # that checks a table in the database (Sql Server 2008). In this table you have the data I need and a Status field ( Ready,Processing, Processed, Error ). The service will always get the first...
asked by 27.01.2017 / 16:33
1
answer

How to make second select in "reader.Read"?

Here is the code: public FileContentResult Foto() { byte[] byte_image = null; string query = "SELECT * FROM Tabela WHERE Coluna = @Parameter"; using (var connection = new SqlConnection(ConfigurationM...
asked by 27.12.2016 / 20:40
2
answers

Compile string as code

How can I compile a string inside C #? Example: Console.WriteLine(\"Hello World\"); . As if it were a eval of JavaScript? I had a project to load a code into a text file or something else.     
asked by 10.05.2014 / 02:10
0
answers

C # Choose Email box when sending

I was wondering if there is any way to send mail to the other inboxes, for example gmail Atthemomentmycodeforsendingemailsisthis:using(varsmtpClient=newSmtpClient(WebConfigurationManager.AppSettings["smtpHost"], 587)) { smtpClient.Cre...
asked by 20.01.2017 / 17:17
0
answers

Help in Binding C #

I have this code: private void DataGrid_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { var i = 0; var d = DataContext as TicketExplorerViewModel; if (d == null) return; var entityTypes = d.EntityType...
asked by 21.01.2017 / 20:03
0
answers

Error in use of Asynchronous Action (Async)

This action should send an email Asynchronously, everything very simple until then, even use the same class in other projects with the same version of MVC. But to my surprise, this project does not work. You simply see the error below. Error:...
asked by 19.01.2017 / 02:58
1
answer

How to adjust the Form according to the size of the PictureBox?

How do I resize my form according to the size of the PictureBox component? In this case, captcha images may have different sizes. So I'd like my Form to fit the size of the PictureBox. For example, if the image increases in size, the Form sho...
asked by 18.01.2017 / 18:20
0
answers

SQL query for ASP.NET page with C #

On my client's site, I have a SQL query that brings the readiness result of multiple collaborators. However, for the moment I can only translate the result of the query into a GridView: SQL CONSULTATION SELECT codigoAvaliacao, codigoColab...
asked by 18.01.2017 / 18:08
0
answers

Error loading partialView

I have a somewhat curious problem. I created a page that lists records and it has two links, one to delete and one to display details. Both call a modal. Each modal is a partialView . The partialview that displays the delete mode is...
asked by 25.12.2016 / 20:44
0
answers

Prevent page break on report Microsoft Report

I created a report in Visual Studio 2015. The information is displayed correctly: However,whenIclicktoviewprint,itiscut(seetheinformationI'vepaintedisnotshowing): Howdoyoupreventthepagefrombeing"broken"?     
asked by 20.12.2016 / 04:45