Questions tagged as 'c#'

1
answer

Generic Method of Finding, Using ADO.NET and Procedures

I'm looking for a solution from a generic repository for a DAL with a generic Find method, so there is no redundancy in my code. Using ADO.NET and Procedures. I found something on this link: Generic Subscription: List Selecionar(IEnum...
asked by 24.09.2014 / 00:59
2
answers

How to publish an ASP.NET MVC project to a specified URL

So, I'm in a situation that I do not know how and do not even know if it's possible. I have a site in ASP.NET MVC, let's call it sitedokelvin.com , this site is an asp.net mvc project. And I also have another site, let's call it projectd...
asked by 28.09.2014 / 19:54
1
answer

Problems connecting mysql with asp.net c #

A small problem appeared, which in my old application worked normally. My DAL Class is not connecting in Mysql. Being all the connection parameters, I believe it is correct. MyDALthatmakestheconnection.usingSystem;usingSystem.Collections.G...
asked by 24.09.2014 / 06:17
1
answer

Enable delete cascade in only one list

I have my model that has multiple lists. For example: public class Funcionario { public ICollection<FuncionarioNotificacao> Notificacoes {get;set;} public ICollection<FuncionarioExame> Exames {get;set;} } Let's see that...
asked by 27.03.2015 / 15:12
1
answer

Add values from object list columns in Razor

I have a table, where I get the data from a View (SQL Server) and perform some operations on my page. On this page, I have a filter, to display only the pages for the selected year. Until this part is all correct, along with the filter, such...
asked by 26.03.2015 / 21:18
1
answer

C # creating a property in a UserControl

I have a project in C # and I created a usercontrol with two components: a combobox and a button . I need to create a property to change the properties of the usercontrol's combobox. I tried the following way: public Co...
asked by 20.08.2014 / 15:26
1
answer

Constructor abstract class

I'm not able to develop the following environment: public abstract class AplicacaoGenerica<TEntity> where TEntity : class { private IRepositorio<TEntity> repositorio; public AplicacaoGenerica(IRepositorio<TEntity> rep...
asked by 09.09.2014 / 16:09
1
answer

Change DIV style according to FORM

I have the following application to login public ActionResult Logar(String Login, String Senha) { var bdUsuario = ClientesAplicacaoConstrutor.ClientesAplicacaoEF(); var usuario = bdUsuario.ListarTodos().Where(x => x.Codigo == Login...
asked by 07.07.2014 / 15:26
1
answer

Get Organization / Departament and Organization / Title with UserPrincipal - AD and C #

I'm using the System.DirectoryServices.AccountManagement reference and I have the following code: string dnsAD = "USINA.REDE"; string groupName = "Grupo Controle Acesso Gestao de Ativos"; //seta o grupo de acesso PrincipalContext principalCont...
asked by 02.07.2014 / 18:28
1
answer

Can we create the business rule in our model?

What best practice? Create the rule in the model itself or create another class Ex: public class Item { public void Faturar() { //fatura item } } ou public class ItemBLL { public void Faturar(Item ) {...
asked by 03.07.2014 / 21:23