Exemple #1
0
        public static SelectList Setores()
        {
            SetorBusiness setorBusiness = new SetorBusiness();
            List <Setor>  setores;

            try
            {
                setores = setorBusiness.Consultar();
                setores.Insert(0, new Setor()
                {
                    Id = 0, Nome = "Selecione..."
                });
                return(new SelectList(setores, "Id", "Nome"));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public SetorController(SetorBusiness business)
 {
     _business = business;
 }