Пример #1
0
 private void AddStats(Entities.StatsObject StatsObject)
 {
     BoxReferencesTotal.Text  = Convert.ToString(StatsObject.ReferencesTotal);
     BoxReferencesFull.Text   = Convert.ToString(StatsObject.ReferencesFull);
     BoxReferencesUnfull.Text = Convert.ToString(StatsObject.ReferencesUnfull);
     BoxReferencesWrong.Text  = Convert.ToString(StatsObject.ReferencesWrong);
     BoxAcuseFull.Text        = Convert.ToString(StatsObject.AcusesFull);
     BoxAcuseUnfull.Text      = Convert.ToString(StatsObject.AcusesUnfull);
     BoxAcuseWrong.Text       = Convert.ToString(StatsObject.AcusesWrong);
     BoxAcuseEmpty.Text       = Convert.ToString(StatsObject.AcusesEmpty);
     BoxDetailFull.Text       = Convert.ToString(StatsObject.DetailsFull);
     BoxDetailUnfull.Text     = Convert.ToString(StatsObject.DetailsUnfull);
     BoxDetailWrong.Text      = Convert.ToString(StatsObject.DetailsWrong);
     BoxDetailEmpty.Text      = Convert.ToString(StatsObject.DetailsEmpty);
 }
Пример #2
0
        private void GetStats()
        {
            Entities.StatsObject StatsObject = new Entities.StatsObject();

            if (RelationText != "Todos")                          //Algún año en particular
            {
                if (ClientsText == "Todos" || ClientsIndex == -1) //Si no tiene cliente seleccionado o elige "todos"
                {
                    StatsObject = ProcessStats.GetStats(Convert.ToInt32(RelationText));
                }
                else
                {
                    StatsObject = ProcessStats.GetStats(Convert.ToInt32(RelationText), ClientsText);
                }
            }
            else //Todos los años
            {
                if (ClientsText == "Todos" || ClientsIndex == -1) //Si no tiene cliente seleccionado o elige "todos"
                {
                    StatsObject = ProcessStats.GetStats();
                }
                else
                {
                    StatsObject = ProcessStats.GetStats(ClientsText);
                }
            }

            if (ProcessStats.GetStatsFlag)
            {
                AddStats(StatsObject);
            }
            else
            {
                MainForm.MessageText("El proceso de Obtención de Estadísticas ha fallado. Contacte con soporte.", Color.Red);
            }
        }