Questions tagged as 'c#'

1
answer

How to replace the CheckBox with a String

I need to display "Active" or "Idle" in the Status column of the DataGridView , how do? This"Situation" column is Boolean type: This is the Code where I populate the DataGridView : private void PreencherDataGridView() {...
asked by 15.06.2018 / 23:10
1
answer

Problem canceling a process

I asked a question previously to cancel the process of compressing files. I have 2 problems with this code, the program has the function of compressing files in pairs separately getting 2 files in each 7z, the files are bin, cue using 7z, I...
asked by 17.05.2018 / 02:10
2
answers

Do you doubt about "insertion" of variables in the input command in C #?

Well, my question is, in C # I can use my "constants" be it of any kind on my output command, all normal. However, if I use a "variable" of type int or double and put them in the input command of a Syntax error:    "Convert t...
asked by 16.05.2018 / 04:01
1
answer

ASP.Net and C # - Reducing DropDownList options according to current date

On my client's site, I have on one page a DropDownList with the months of the year. Unfortunately, the value property is written in months rather than numbers. <asp:DropDownList ID="ddlMesReajuste" runat="server" AppendDataBoundItems="true"...
asked by 21.06.2018 / 16:53
1
answer

Coloring Datagridview with C # Comparison

I would like to know if you have any way to color the row in the datagridview without using a loop. I have a minimum stock and when available is below the minimum I would paint the red line. Ididitthatway,butitgotreallyslow.for(inti=0;i&l...
asked by 20.06.2018 / 20:34
1
answer

Add Class DropDownListFor

How do I insert @class="form-control" into the code below? <div class="form-group"> <label for="disabledSelect" class="control-label col-md-2">Status:</label> <div class="col-md-10"> @Htm...
asked by 21.06.2018 / 16:35
1
answer

Is there a ".this" in an Xamarin Android project?

I'm rewriting an application that was originally written in Java in Android Studio. Now I am rewriting in C # for the Xamarin Android, so a doubt came to me, in several classes I came across the java type code that: private void obterWidgets()...
asked by 21.06.2018 / 14:06
1
answer

When injecting a dependency into the controller, Postman returns an error

When doing this in my Controller : [Route("api/[controller]")] public class OptOutClientController : Controller { IOptOutService _service; //Se comentar o construtor dá certo public OptOutClientController...
asked by 21.06.2018 / 19:48
1
answer

SQL error in casting from int to string

I have a method where I need to return the ID ( integer ) of a particular record whose name passes as a parameter, however Visual Studio points to the following error:    Object reference not set to an instance of an object This err...
asked by 13.05.2018 / 18:08
2
answers

transform sql with subquery into query on entity

I'm needing and am having trouble getting this sql with subquery and doing the same thing in c # entity. SELECT Id,Nome, (SELECT Count(Id) FROM Pedidos WHERE Pedidos.ColaboradorId = Colaborador.Id) AS NumeroPedidos FROM Colabora...
asked by 18.06.2018 / 14:27