Questions tagged as 'c#'

2
answers

List group only containing items

And an example of model : public class Grupo { public int Id {get;set;} public string Nome {get;set;} public ICollection<Item> Itens {get;set:} } And the items public class Item { publit int Id {get;set;} public...
asked by 25.02.2015 / 02:44
1
answer

WebRequest 504 Gateway Timeout

Hey guys, I'm having trouble understanding why gateway timeout is given in a request, because being tested by cURL and it was normal, I'm using Basic Auth. Following: var authorization = "apikey:"; HttpWebRequest wbRequ...
asked by 02.02.2015 / 14:29
2
answers

Capture selected DropDownList item

I have DropDownList with some items, and I did a click event to get what is selected and redirect to a page, but it is not working right, see: switch(ddlMenu.SelectedValue){ case "0": lblMensagem.Text = "Por fa...
asked by 05.02.2015 / 03:30
2
answers

Forcing the subclass [closed]

How do I force the subclass to display the correct data? class Program { static void Main(string[] args) { var tran = new List<Transporte>(); tran.Add(new Navio()); // Objetos das subclasses tran.Add(...
asked by 20.04.2015 / 01:08
1
answer

C # Threads How to optimize a SELECT with BLOB

I have a C # application (.Net 4.5) that when loading a screen among other operations it searches the database for a background image and sounds. It turns out that for some loaded screens this operation (search for images + sounds) takes 29 seco...
asked by 16.04.2015 / 17:09
1
answer

How do I search for the record when the table has composite primary key?

I have in my database the table t_command_control . This table has a composite primary key formed by the CD_STATION and CD_COMMAND fields. If the primary key was simple (just as CD_STATION field) I would use the...
asked by 30.11.2014 / 18:50
1
answer

Add N items to a Textbox based on a NumericUpDown

I created a program that generates passwords , but only generates one at a time. What I wanted was to be able to make a NumericUpDown available so that the user could choose how many passwords , which would then be displayed in Te...
asked by 16.04.2015 / 16:11
1
answer

Prevent user from being logged in twice

In my project, I have a login module that works perfectly. So quiet, but the way it is I can not bar the same user logged in twice. That is, I can log in with the same user twice, and that's not what I want. Because I can have problems with that...
asked by 30.11.2014 / 01:37
1
answer

Error trying to generate PDF file with the same name

When trying to generate PDF files, many times I come across the error:    Message: The process can not access the file 'D: .... \ 23381708.pdf' because it is being used by another process. That tells me that the file can not be created be...
asked by 02.12.2014 / 12:39
1
answer

Where to find the Microsoft.WindowsMobile.Forms library?

I'm developing an application on Smart Device for Windows Mobile 6 in Visual Studio 2008 C #. In this application I need to use the functions of the object CameraCaptureDialog , because the main purpose of it is to capture photos throug...
asked by 20.01.2015 / 16:12