Questions tagged as 'c#'

2
answers

use of distinct in a dropdownlist

I want to remove equal names from my dropdownlist, but they are from different id's. I wanted to where I would have to deploy the code if it would be in the view, or in the controller somewhere else. Data in the table: Andthat'swhatthedropdo...
asked by 24.11.2017 / 18:30
1
answer

How to sort words from an array without repeating them? [duplicate]

I'm doing a college project where I need to simulate the library, so I have an array with the name of 20 teams and I need to raffle 10 teams but not repeat any of them and present those teams in a ListBox , however I'm not getting it, could y...
asked by 20.11.2017 / 05:58
2
answers

Report generated with reportview, directly in pdf

I have a form, and in this form, I have a print button that opens a reportviwer report made with a dataset. What I need to do with this report is to automate it, instead of clicking the print button, it opens the reportviwer screen afterwards...
asked by 17.11.2017 / 19:03
2
answers

Razor form field validation

I'm using MVC5 Razor to create my forms, now I have a question for the validations of the fields of this form; Example: @Html.LabelFor(m => m.Nome, "Nome:") @Html.DropDownListFor(m => m.Nome, "Nenhum" , new { @class = "form-d...
asked by 26.10.2017 / 14:36
1
answer

Using C # 6.0 on VS2010

I have Visual Studio 2010 installed. I would like to know if it is possible to use the features of version 6.0 of C # in my IDE     
asked by 24.10.2017 / 21:33
2
answers

Do you need to use the AppCompat and Support Design libraries when the minimum API is 21?

Recently I upgraded an application that I'm developing to use a minimum API at 21 (Lollipop), before it was at 19 (KitKat). In the case of KitKat I needed to use AppCompat and Support Design to enjoy the DrawerLayout, CoordinatorLayout, Float...
asked by 13.09.2017 / 16:55
1
answer

Group objects and add values

I have a ListaBid class with multiple objects, in this class there are attributes Partnumber(Chave) , Quantidade SaldoPartnumber . I can have X objects with partnumber Y and other X objects with% co_of...
asked by 11.09.2017 / 16:46
2
answers

Number formatting is not working

I have this line, where I need to format a field. I did it in different ways and nothing: lista.ForEach(e => e.Total = string.Format("{0:N}", float.Parse(e.Total))); and so lista.ForEach(e => e.Total = string.Format("{0:0.00}", floa...
asked by 12.09.2017 / 00:15
1
answer

Update QueryExpression

I made a select to bring all the entities which contain the field "se_customdate" to null. Until then, no problem. However, I now need to assign the value of the "createdon" variable to the null fields, but I'm not getting any progress in the co...
asked by 13.09.2017 / 19:28
1
answer

Error trying to login user with mysql

I am trying to log a user to my system using a MySql database, but it is returning me a NullReference error. I've tried to check if it was null before converting to string, but the error persists. Why does the mistake happen? How to fix? Meth...
asked by 30.08.2017 / 02:06