Пример #1
0
        public bool Adicionar(PPRAViewModel pPRAViewModel)
        {
            var ppra = Mapper.Map <PPRAViewModel, PPRA>(pPRAViewModel);

            BeginTransaction();
            _ppraService.Adicionar(ppra);
            Commit();
            return(true);
        }
Пример #2
0
        public bool Adicionar(PPRAViewModel pPRAViewModel, List <AgentePPRAViewModel> agentePPRAViewModel, List <CronogramaDeAcoesViewModel> cronogramaDeAcoesViewModel)
        {
            var ppra = Mapper.Map <PPRAViewModel, PPRA>(pPRAViewModel);

            ppra.AgentesPPRA       = Mapper.Map <List <AgentePPRAViewModel>, List <AgentePPRA> >(agentePPRAViewModel);
            ppra.CronogramasDeAcao = Mapper.Map <List <CronogramaDeAcoesViewModel>, List <CronogramaDeAcoes> >(cronogramaDeAcoesViewModel);

            BeginTransaction();
            _ppraService.Adicionar(ppra);
            Commit();
            return(true);
        }