Пример #1
0
 private void montariaAnterior()
 {
     if (this.classifEtapa)
     {
         Modelo.SGCRPContexto contexto = new Modelo.SGCRPContexto();
         Modelo.Etapa         etapa    = contexto.Etapa.Find(etapaID);
         if (pos > 6)
         {
             pos -= 10;
             Funcoes.Telao.gerarClassificacao(etapaID, pos);
             lblWarning.Text = "";
         }
         else
         {
             lblWarning.Text = "*Não possui página anterior";
         }
     }
     else
     {
         Modelo.SGCRPContexto contexto = new Modelo.SGCRPContexto();
         Modelo.Round         round    = contexto.Round.Find(etapaID);
         if (pos > 6)
         {
             pos -= 10;
             Funcoes.Telao.gerarClassificacao(etapaID, pos);
             lblWarning.Text = "";
         }
         else
         {
             lblWarning.Text = "*Não possui página anterior";
         }
     }
 }
Пример #2
0
 private void proxClick()
 {
     if (classifEtapa)
     {
         Modelo.SGCRPContexto contexto = new Modelo.SGCRPContexto();
         Modelo.Etapa         etapa    = contexto.Etapa.Find(etapaID);
         if (pos < etapa.etapaCompetidor.Count)
         {
             pos += 5;
             Funcoes.Banner.bannerClassificacaoEtapa(etapaID, true, pos);
             lblWarning.Text = "";
         }
         else
         {
             lblWarning.Text = "Não possui página posterior";
         }
     }
     else
     {
         Modelo.SGCRPContexto contexto = new Modelo.SGCRPContexto();
         Modelo.Round         round    = contexto.Round.Find(etapaID);
         if (pos < round.montaria.Count(t => t.notas.Count > 0 && t.rep != "R" && t.pulo))
         {
             pos += 5;
             Funcoes.Banner.bannerClassificacaoRound(etapaID, true, pos);
             lblWarning.Text = "";
         }
         else
         {
             lblWarning.Text = "Não possui página posterior";
         }
     }
 }
Пример #3
0
        private void frmTouroTelao_Load(object sender, EventArgs e)
        {
            Modelo.SGCRPContexto contexto = new Modelo.SGCRPContexto();
            Modelo.Round         round    = contexto.Round.Find(roundID);
            int qtdTouro = round.montaria.Count(n => n.touroID != null && n.notas.Count > 0 && n.pulo && n.mediaBoiada);

            if (qtdTouro > 0)
            {
                int qtd = qtdTouro % 5 == 0 ? qtdTouro / 5 : qtdTouro / 5 + 1;
                for (int i = 0; i < qtd; i++)
                {
                    cmbPosicao.Items.Add((i * 5 + 1) + "º ATÉ O " + ((i * 5 + 5) + "º"));
                }
            }
        }
Пример #4
0
        private void carregarComboBox()
        {
            Modelo.SGCRPContexto contexto = new Modelo.SGCRPContexto();
            Modelo.Round         round    = contexto.Round.Find(roundID);
            int qtdTouros = round.montaria.Count(n => n.touroID != null && n.notas.Count > 0 && n.pulo && n.mediaBoiada);

            if (qtdTouros > 0)
            {
                int qtd = qtdTouros % 5 == 0 ? qtdTouros / 5 : qtdTouros / 5 + 1;
                for (int i = 0; i < qtd; i++)
                {
                    cmbPosicao.Items.Add((i * 5 + 1) + "º ATÉ O " + ((i * 5 + 5) + "º"));
                }
            }
        }
Пример #5
0
        private void loadRound()
        {
            Modelo.SGCRPContexto contexto = new Modelo.SGCRPContexto();
            Modelo.Round         round    = contexto.Round.Find(this.etapaID);
            int qtd = round.montaria.Count(t => t.notas.Count > 0 && t.rep != "R" && t.pulo);

            if (qtd != 0)
            {
                qtd = qtd % 5 == 0 ? qtd / 5 : qtd / 5 + 1;
                for (int i = 0; i < qtd; i++)
                {
                    cmbPosicao.Items.Add((i * 5 + 1) + "º ATÉ O " + ((i * 5 + 5) + "º"));
                }
            }
        }