Questions tagged as 'c#'

1
answer

Error while doing counter via C #

I'm trying to make a pendulum counter to my system, but it's giving error, at the time of calculating, could anyone help me? You are giving error in .Count as you can see in the picture below. MyControllerpublicasyncTask<ActionResult&g...
asked by 27.03.2018 / 15:22
2
answers

How to hide and unhide taskbar in C #?

I want my application to have a button that hides and reexits the Windows taskbar in C # to block user access to it. Any suggestions?     
asked by 19.01.2017 / 14:32
1
answer

how to create index order desc through DataAnnotations

I need to create an index in my model, however I need it to be decreasing How do I do: [Index("Ix_PrecoConsultData", IsUnique = false, Order = 1)] public DateTime DataCadastro { get; set; } It creates the index but with ASC order it need...
asked by 11.01.2017 / 21:07
1
answer

TimeSpan: count occurrences of a specific time

How could I assemble this method that counts the occurrences of a specific set of times in a period? public static int OcorrenciasDeHorarios( DateTime Inicio, DateTime Final, params string[] Horarios) { // ?? } Example: If passed...
asked by 27.01.2017 / 23:25
1
answer

Change the color line according to the contents of the cell in the datagridview

I have a Windows Form that loads a DataGridView , it has a column that contains both positive and negative values, so when the value of this column is negative, the line has a different color. How can I do this? follows the Code: p...
asked by 15.09.2017 / 21:32
2
answers

SQL conversion to LINQ C #

How do I convert the last row of this SQL to LINQ? SELECT* FROM ACOMPANHAMENTO A, PRESOS_ACOMPANHAMENTO PA, PRESOSS P WHERE P.ID_PRESOS = 300 AND...
asked by 07.12.2016 / 17:08
2
answers

How to store information from a SELECT into variables

Good evening community, I have a stock program that I'm finishing and I want to do a validation for it always check if you have enough of that product before adding it to the sale. For this I used a simple math operation, where one variable stor...
asked by 07.12.2016 / 00:30
3
answers

Entity Framework 4 - Error Migrations: The type ... is not defined in namespace namespace.Map (Alias = Self)

I have a problem with my application mappings. [EDITED] Follow the complete DataContext Class: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.Entity; using System.Data.Entity.Mo...
asked by 05.12.2016 / 03:09
1
answer

Save image to Xamarin Forms

How to save the image from BD to any folder in the project? I need to create a new folder or save the image to any folder inside the app so I can use it in View . My code: byte[] imageBytes; var FileImage = new Image(); imageBy...
asked by 07.12.2016 / 16:17
1
answer

Join 3 lists in C # from queries in the database [closed]

I'm making a page to generate a report. In this I make 3 different selects , placing the result of each query in a list: public IEnumerable<RelatorioVencerVencidos> ObterRelatorioVencerVencidos(ParametrosVencerVencidos filtro) {...
asked by 08.12.2016 / 12:06