Questions tagged as 'c#'

1
answer

Form using BeginCollectionItem gets null viewModel in foreach

I want to make a form where I can register multiple addresses and phones for a single person, and I want to be able to do this when I am registering the person. Based on the answers to my other question , I came to the part where I put te...
asked by 13.08.2015 / 19:41
1
answer

Picking an object from a list by reference and not by position

Hello, I would like to know how I can create a list of objects in C #, but instead of getting them by posição ([0], [i]) , I want to get by reference [LacoAzul] [CorVermelha] . Can you create a list like this? Thanks in advance!  ...
asked by 10.07.2014 / 14:52
1
answer

Controller Edit - Inserting Values

My method responsible for editing is inserting values into the CONSUL_EnciclopediasCONSUL_Promocoes table instead of editing. If I have the options x with id = 1 and y id = 2 within the course a with id = 1 and I originally choose the opt...
asked by 12.09.2014 / 19:49
2
answers

How to use ReferenceEquals, Equals, GetType, CompareTo, GetTypeCode?

I would like to know how to use the methods ReferenceEquals , Equals , GetType , CompareTo , GetTypeCode .     
asked by 02.09.2014 / 21:35
1
answer

Query works in database but not via code

using (var cnx = new OleDbConnection(new AdministradorDAO().conexao)) { var sql = @"insert into usuarios(matricula, nome, senha, nivel, maleta, email) values (@matricula, @nome, @senha, @nivel,...
asked by 16.09.2014 / 22:42
3
answers

Uppercase Method for Metroframework

IneedhelpwithTextBox,whereIworkonc#using Metroframework . I need to turn all typed text into TextBox into uppercase. How can I do it?     
asked by 06.08.2015 / 21:14
2
answers

Why can not I query for an object added before SaveChanges?

I need to add multiple objects to the database and some objects need another specific object that I've added earlier. When I make a query to get the object, it comes null. Example: var subItem = new SubItem { Valor1 = 1, Valor2 = "...
asked by 25.09.2014 / 20:01
2
answers

Problems installing a service in Windows Server

Developed an application in Windows Service, in Visual Studio; IcannotinstalltheserviceonWindowsServer;
asked by 19.09.2014 / 19:04
2
answers

String was not recognized as a valid DateTime

protected void ButtonPesquisar_Click(object sender, EventArgs e) { var _macro = new LFSistemas.VLI.ACTWeb.Entities.Macro(); var macroController = new MacroController(); var itens = macroController.ObterTodos(new Entities.FiltroMacro(...
asked by 22.09.2014 / 20:31
1
answer

Is there a way in ASP.Net MVC, in controller to access a variable in sessionstorage or localstorage?

I need to get the value of a variable stored in the sessionstorage through a controller where this method is not passed the parameter of this variable. Session / localstorage are administered through javascript. In contrast situations it...
asked by 01.02.2014 / 19:33