// GET: Clientes/Create
 public ActionResult Criar()
 {
     ViewBag.ClienteId     = new SelectList(_clienteApp.GetAll(), "ClienteId", "Nome");
     ViewBag.ColaboradorId = new SelectList(_colaboradorApp.GetAll(), "ColaboradorId", "Nome");
     ViewBag.ServicosId    = new SelectList(_servicoApp.GetAll(), "ServicosId", "Nome");
     return(View());
 }
Beispiel #2
0
 public async Task <List <Servico> > Get()
 {
     try
     {
         return(await _servicoAppService.GetAll(servico => servico.Ativo == true));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Beispiel #3
0
        public ActionResult Index()
        {
            var servicoViewModel = Mapper.Map <IEnumerable <Services>, IEnumerable <ServiceViewModel> >(_servicoApp.GetAll());

            return(View(servicoViewModel));
        }
 //
 // GET: /IndiqueProfissional/Create
 public ActionResult Create()
 {
     ViewBag.ListaServico = _iServicoApp.GetAll();
     return(View());
 }
Beispiel #5
0
        //
        // GET: /Servico/
        public ActionResult ListarTodos()
        {
            var servicos = Mapper.Map <IEnumerable <Servico>, IEnumerable <ServicoViewModel> >(_iServicoApp.GetAll());

            foreach (var servico in servicos)
            {
                var categoria = _iCategoriaApp.GetById(servico.cat_Id);
                servico.Categoria = categoria;
            }
            ViewBag.Retorno = msgRetorno;
            return(View(servicos.OrderBy(s => s.serv_Nome)));
        }