Beispiel #1
0
 public bool ExistePorProcessoERegraEStatus(int processoId, int regraId, RegraVioladaStatus status)
 {
     return(this.Session.QueryOver <RegraViolada>()
            .Where(x => x.Processo.Id == processoId)
            .Where(x => x.Status == status)
            .Where(x => x.Regra.Id == regraId)
            .RowCount() > 0);
 }
Beispiel #2
0
 public void AlterarStatus(int id, RegraVioladaStatus status)
 {
     this.Session
     .CreateQuery("update RegraViolada set Status = :status where Id = :id")
     .SetInt32("id", id)
     .SetParameter("status", status)
     .ExecuteUpdate();
 }
Beispiel #3
0
 public int ObterTotalPorProcessoEStatusRegra(int regraId, int processoId, RegraVioladaStatus status)
 {
     return(this.Session.QueryOver <RegraViolada>()
            .Where(x => x.Status == status)
            .And(x => x.Id == regraId)
            .JoinQueryOver(x => x.Processo)
            .Where(x => x.Id == processoId)
            .RowCount());
 }
Beispiel #4
0
        public void AlterarStatus(Processo processo, int regraId, RegraVioladaStatus statusAtual, RegraVioladaStatus statusNovo)
        {
            this.Session
            .CreateQuery(@"
update RegraViolada set Status = :statusNovo 
where Processo.Id = :processoId
and Status = :statusAtual
and Regra.Id = :regraId")
            .SetParameter("statusNovo", statusNovo)
            .SetParameter("processoId", processo.Id)
            .SetParameter("statusAtual", statusAtual)
            .SetParameter("regraId", regraId)
            .ExecuteUpdate();
        }