예제 #1
0
        public EventoResultado CriarApresentacoes(NovoEventoFase1 info, int EventoID)
        {
            bool async = false;


            this.InfoFase1 = info;

            List <int> apresentacoes = null;
            List <GerarEventoEtapa1Fase3Model.SetoresNovo> setores = null;

            Evento evento = new Evento();

            evento.Control.ID    = EventoID;
            evento.LocalID.Valor = info.Etapa1.LocalID;

            this.Resultado.Evento = evento;

            using (BD bd = new BD())
            {
                bd.IniciarTransacao();

                apresentacoes = this.InsereApresentacoes(bd);
                setores       = this.InsereSetores(bd, apresentacoes);
                bd.FinalizarTransacao();

                this.Fluxo.Evento.OK();


                this.Resultado.Apresentacoes = apresentacoes;
                this.Resultado.Setores       = setores;
                this.empresaID       = Local.getEmpresaID(InfoFase1.Etapa1.LocalID, bd);
                evento.LocalID.Valor = InfoFase1.Etapa1.LocalID;
            }


            if (async)
            {
                Task.Run(() => GerarIngressosEvento());
            }
            else
            {
                GerarIngressosEvento();
            }

            return(this.Resultado);
        }
예제 #2
0
        public EventoResultado CriarEvento(NovoEventoFase1 info, bool async = true)
        {
            this.InfoFase1 = info;

            CriarEstruturaEvento();

            if (async)
            {
                Task.Run(() => GerarIngressosEvento());
            }
            else
            {
                GerarIngressosEvento();
            }


            DistribuicoesSecundarias(async);

            return(this.Resultado);
        }