Esempio n. 1
0
        public static string DataMarcacao(int idProcesso)
        {
            string[] andamentosAgenda =
            {
                "LICITAÇÃO MARCADA",
                "DISPUTA",
                "SESSÃO FINAL",
                "SESSÃO DE RESULTADO - HABILITAÇÃO",
                "SESSÃO DE RESULTADO - PROPOSTA COMERCIAL",
                "SESSÃO DE ABERTURA - PROPOSTA COMERCIAL",
                "SESSÃO DE ABERTURA - PROPOSTA TÉCNICA",
                "SESSÃO DE RESULTADO - PROPOSTA TÉCNICA"
            };

            DetachedCriteria dc = DetachedCriteria.For(typeof(ProcessoAndamento));

            dc.Add(Expression.Eq("Processo.Id", idProcesso));
            dc.Add(Expression.IsNull("AndamentoCorrigido"));
            dc.Add(Expression.IsNull("AndamentoAdiado"));
            dc.CreateAlias("FluxoAndamento", "fan");
            dc.CreateAlias("fan.Atividade", "ati");
            dc.Add(Expression.In("ati.Descricao", andamentosAgenda));
            dc.Add(Expression.Sql(" this_.dat_andamento_pan >= '" + DateTime.Now + "' order by this_.dat_andamento_pan desc "));
            ProcessoAndamento andamento = ProcessoAndamento.FindFirst(dc);
            string            retorno   = string.Empty;

            if (andamento != null && Utilidade.UtdValidador.ValidarData(Convert.ToString(andamento.DataAndamento)))
            {
                retorno = andamento.DataAndamento.ToString("dd/MM/yyyy");
            }
            return(retorno);
        }
Esempio n. 2
0
        private void RegistrarAndamentoIncluindoPessoa(Atividade tipoAndamento, Pessoa responsavel, Pessoa destinatario, string observacao, bool incluirData, bool UnidExercicio, string fase)
        {
            ProcessoAndamento andamento = new ProcessoAndamento();

            DetachedCriteria dcFluxo = DetachedCriteria.For(typeof(FluxoAndamento));

            dcFluxo.CreateAlias("Fase", "fas");
            dcFluxo.CreateAlias("Atividade", "ati");
            dcFluxo.Add(Expression.Eq("fas.Descricao", fase));
            dcFluxo.Add(Expression.Eq("ati.Descricao", tipoAndamento.Descricao));
            dcFluxo.Add(Expression.Sql("this_.fk_cod_workflow_wor in (select wor.pk_cod_workflow_wor from adm_licitar.tb_workflow_modalidade_unidade_exercicio_wmu wmu inner join adm_licitar.tb_workflow_wor wor on wmu.fk_cod_workflow_wor = wor.pk_cod_workflow_wor where wmu.fk_cod_modalidade_mod=" + this.Classificacao.Modalidade.Id + ")"));
            FluxoAndamento objFluxo = FluxoAndamento.FindFirst(dcFluxo);

            //INSERIR ANDAMENTO
            andamento.Cadastrante    = responsavel;
            andamento.Processo       = this;
            andamento.FluxoAndamento = objFluxo;
            andamento.Pessoa         = destinatario;
            if (incluirData)
            {
                andamento.DataCadastro = DateTime.Now;
            }

            andamento.Andamento = observacao ?? null;
            andamento.SaveAndFlush();
        }
Esempio n. 3
0
        public static DateTime DataProcesso(int id, string tipoData)
        {
            DetachedCriteria dc = DetachedCriteria.For(typeof(ProcessoAndamento));

            dc.CreateAlias("FluxoAndamento", "fa");
            dc.CreateAlias("fa.Atividade", "at");
            dc.Add(Expression.Eq("Processo.Id", id));
            dc.Add(Expression.Eq("at.Descricao", tipoData));
            dc.AddOrder(Order.Asc("DataCadastro"));

            ProcessoAndamento pa = ProcessoAndamento.FindFirst(dc);

            if (pa != null)
            {
                return(pa.DataAndamento);
            }

            return(DateTime.MinValue);
        }
Esempio n. 4
0
 /// <summary>
 /// Lista todos os andamentos da unidade de exercicio.
 /// </summary>
 /// <returns>
 /// A <see cref="ProcessoAndamento"/>
 /// </returns>
 public virtual ProcessoAndamento[] ListarAndamentos()
 {
     return(ProcessoAndamento.FindAll(Expression.Eq("UnidadeExercicio.Id", this.Id)));
 }
Esempio n. 5
0
 /// <summary>
 /// Lista os andamentos do processo.
 /// </summary>
 /// <returns>
 /// A <see cref="ProcessoAndamento"/>
 /// </returns>
 public virtual ProcessoAndamento[] ListarAndamentos()
 {
     return(ProcessoAndamento.FindAll(Order.Asc("DataCadastro"), Expression.Eq("Processo.Id", this.Id)));
 }
Esempio n. 6
0
 public virtual ProcessoAndamento[] ListarProcessosAndamento()
 {
     return(ProcessoAndamento.FindAll(Expression.Eq("FluxoAndamento.Id", this.Id)));
 }