Questions tagged as 'c#'

1
answer

Receiving System.Web.Mvc.WebViewPageTModel.Model.get returned null

I'm getting a null reference error and I do not understand why. Here is the error: System.NullReferenceException: 'Referência de objeto não definida para uma instância de um objeto.' System.Web.Mvc.WebViewPage<TModel>.Model.get retornou...
asked by 24.05.2017 / 22:55
1
answer

Return missing date x days to arrive

Scenario: Ciclos id name endDate (datetime?) Data: 1, primeiro, 05/10/2017 2, segundo, 15/10/2017 3, terceiro, 20/10/2017 4, quarto, 30/10/2017 With linq and lambda, I would like to return dates that are above the current date, but ar...
asked by 11.05.2017 / 22:35
1
answer

Why does not this work on my user control?

I have a code that would like to put it in the user control of my windows forms, but it does not make changes to Form1, what's the reason? Code: private void button5_Click(object sender, EventArgs e) { Form1 f1 = new Form1(); var ta...
asked by 18.05.2017 / 00:37
2
answers

apply filter on return from a list

I'm doing an query where I have a array of situations ex: 1, 2, 3 in the query I have to filter for these situations, follow my code. var array = GetSituacoes(); var lista = bll.Query(p => p.Contrato.PessoaFisica.ID == SessionControl.Pess...
asked by 17.05.2017 / 16:34
1
answer

Overload Error C #

I have the following error CS0123 No overload for 'lsvRecebeGrupoLayout_ItemCheck' matches delegate 'ItemCheckEventHandler' in the code below, any suggestion of what might be causing this error? private void lsvRecebeGrupoLayout_ItemCheck(objec...
asked by 06.10.2017 / 14:36
1
answer

how to put a video inside a pdf [closed]

How to insert a video into a pdf generated using the iTextSharp library? I need the library because it also joins digital files and signature.     
asked by 11.10.2017 / 21:10
1
answer

How do I compile this project in C #?

I'm having trouble compiling with the CSC command at prompt and it's giving a namespace error that I can not fix. I do not know if I'm doing it right. Project Link .     
asked by 31.07.2017 / 12:37
1
answer

Return a new object using the ForEach function

Have the following list List<EmployeeTotal> totals = Context.Database.SqlQuery<EmployeeTotal>(query).ToList(); I want to transform all objects from the totals list into a new type list        List<EmployeeTotalA...
asked by 13.06.2017 / 18:26
1
answer

How to have more than one column being displayed in a ComboBox?

The question is the same as the title, I have a ComboBox called txtProfissional and I set the same thing like this: txtProfissional.DataSource = modelOff.profissionals.Where(p => p.idUnidade == oUsuario.unidade); txtProfission...
asked by 12.06.2017 / 20:27
1
answer

How to compare directory path names?

I have two paths: C:\anacarvalho\Database\Updates\2017\2017_04\20170419_AC - Path selected by folder browser dialog . C:\anacarvalho\Database\Updates - Path that is the root of the system. I need a way, that tells me if...
asked by 09.06.2017 / 11:09