Questions tagged as 'c#'

1
answer

Choose which items from an enumerator appear in an EnumDropDownListFor

Is there a way to select only a few items from the enumerator to send to a EnumDropDownListFor ? For example: public enum Documento { CPF = 1, RG = 2, CNPJ= 3 NASCIMENTO = 4 } And I would like that in a given View...
asked by 29.10.2015 / 17:01
1
answer

How do I set columns in a ListView?

I have the following ListView below, I need to leave the first 3 columns fixed and allow the rest scroll. <td colspan="4"> <div class="GradeDados" style="position: relative; width: 1000px; height: 400px; z-index: 1; overflow:...
asked by 26.10.2015 / 14:06
2
answers

How to show the largest number entered using functions?

#include <iostream> using namespace std; void maior(int a, int b); int main() { int cont, maior1; do { cout << "digite um valor: "; cin >> cont; maior(maior1,cont); }while (cont != -1);...
asked by 01.11.2015 / 15:10
3
answers

Close the panel when the mouse comes out

I have Panel in a Form any where Panel is less than Form . I need to do the following: when the mouse leaves the top of Panel it should be closed how could I do this? Note: I'm trying to do this in Windows...
asked by 08.12.2015 / 13:29
1
answer

Convert SQL script to Linq

I need to convert the SQL script below to Linq. SELECT [ID_Pessoa], [ID_ArquivoPagamento], SUM([Peculio_Valor]) AS 'Peculio_Valor' FROM [VW_PESSOA] WHERE [ID_Pessoa] = @ID_Pessoa AND [ID_ArquivoPagamento] = @ID_Arq...
asked by 08.12.2015 / 19:03
1
answer

create custom mascara

How do I create a custom skin for a given field? The mask will be in the following format:
asked by 10.12.2015 / 20:43
2
answers

LINQ Group By with multiple fields

I'm trying to return fields after a join between collections, but I'm getting the following error:    foreach statement can not operate on variables of type   'AnonymousType # 1' because 'AnonymousType # 1' does not contain a public   definit...
asked by 03.09.2015 / 22:41
1
answer

Increase the size of a string

Is it possible to increase the size of a string in the code? string sIdentComanda = ""; if (objComandaParametro.ComandaParametros[0].IsControlaNrComanda) { sIdentComanda += " Comanda: " + nrComanda; }...
asked by 27.08.2015 / 15:54
1
answer

Default value for column of type Datetime

I have a table that has the DataRegistro field of type Datetime . I am using EntityFramework to generate the database ( I am not using the code first ) and I am adding the Computed property so that the column is populated automati...
asked by 01.09.2015 / 03:52
1
answer

I can not implement an @Foreach in MVC

I am a beginner in ASP.NET MVC development and need some help. I can not create a Foreach . Below is my code. @foreach (var item in Model.Fornecedores) { <tr> <td> @Html.DisplayFor(modelItem => mod...
asked by 01.09.2015 / 15:12