Questions tagged as '.net'

2
answers

How to do query containing MAX and COUNT via LINQ

I have the following model : public class Crm_Analise { [Key] public int id { get; set; } public string cod_item_CRM { get; set; } public string TAG { get; set; } public string data_creat { get; set; } public str...
asked by 14.07.2017 / 13:26
1
answer

Handling Exceptions of Different Types

try { await DoFooAsync(); } catch (Exception e) { if(e is TaskCancelledException || e is UnauthorizedAccessException) { // ... } throw; } The block catch of the above excerpt checks the type of exception captured...
asked by 22.09.2017 / 05:51
2
answers

NewtonJson.Parse with quotation marks in the middle

I have a column of type varchar in the database that takes a JSON. This column is the description of a company, but in 4 languages. The logic I have is as follows: { "PT":"Descrição com "aspas" quebra o meu código", "ES":" "...
asked by 01.03.2017 / 16:10
3
answers

Can not implicitly convert type 'string' to 'int'

protected void btnSave_Click(object sender, EventArgs e) { List<ProdutoAmortizacaoCreditoDias> aDay = new List<ProdutoAmortizacaoCreditoDias>(); ProdutoAmortizacaoCreditoDias ee = new ProdutoAmortizacaoCreditoDias(...
asked by 10.02.2017 / 18:57
2
answers

What are the differences between Visibility.Hidden and Visibility.Collapsed?

What are the differences between WPF visibility% wp% and wpf%? There are practical or theoretical differences between set the Visibility.Hidden and Visibility.Collapsed of a control for zero and set its visibility to H...
asked by 10.09.2016 / 03:41
2
answers

Convert string to integer

I'm not able to convert the text from my TextBox to integer. namespace Pag98_Exe1 { public partial class frmveiculos : Form { public frmveiculos() { InitializeComponent(); } Veiculos...
asked by 21.10.2016 / 02:44
2
answers

What is the name of these parameters in ASP.NET MVC?

What is the name of these parameters in brackets used to restrict some access or define the protocol used, as in the example: [Authorize] and [HttpPost] . Is it possible to create a custom "filter"? for example, to allow access t...
asked by 29.02.2016 / 22:50
3
answers

How to implement custom functionality in a model in .NET?

I needed to implement some functionality in the users model but as you can see right at the beginning this class is automatically generated by Entity, so whenever I update or recreate the model the custom functionality will be lost. Ex...
asked by 04.05.2016 / 16:04
2
answers

MySQL DATE type is shown as DATETIME in a datagrid

I create a very simple database with the following command: CREATE TABLE IF NOT EXISTS 'ABC'.'Socio' ( 'idSocio' INT NOT NULL, 'SocioNome' VARCHAR(45) NULL, 'SocioDataNasc' DATE NULL, PRIMARY KEY ('idSocio')) ENGINE = InnoD...
asked by 09.11.2016 / 22:31
2
answers

How to get only the date, without the time, of a DateTime?

Converting a field using ToDateTime it brings the date and time. parcelamento.data_vencimento = Convert.ToDateTime(reader["data_vencimento"]); Is there any direct conversion to bring only the date without the time?     
asked by 03.01.2016 / 00:11