Exemple #1
0
        //METODOS
        private void Obtener_clasificadores(List <Resultado> lista)
        {
            foreach (Resultado concepto in lista)
            {
                var index = Lista_clasificadores.FindIndex(e => e.clasificador == concepto.Clasificacion);

                if (index == -1)
                {
                    List <Resultado> lista_auxiliar = lista.Where(e => e.Clasificacion == concepto.Clasificacion).ToList();

                    Lista_clasificadores.Add(
                        new Clasificador(lista_auxiliar, Semanas)
                    {
                        clasificador = concepto.Clasificacion
                    });
                }
            }
            Obtener_totales();
        }
Exemple #2
0
        public void Obtener_totales()
        {
            List <Clasificador> lista = new List <Clasificador>();

            foreach (Clasificador clasificador in Lista_clasificadores)
            {
                int index = lista.FindIndex(a => a.clasificador == clasificador.clasificador);
                if (index == -1)
                {
                    lista.Add(clasificador);

                    List <Clasificador> total = Lista_clasificadores.Where(i => i.clasificador == clasificador.clasificador).ToList();

                    switch (clasificador.clasificador.ToUpper())
                    {
                    case "COSTO DE VENTAS":
                        Costo_ventas = resultado_total_clasificadores(total);
                        break;

                    case "UTILIDAD EN OPERACIONES":
                        Utilidad_en_operacion = resultado_total_clasificadores(total);
                        break;

                    case "GASTOS DE OPERACIONES":
                        Gastos_de_operacion = resultado_total_clasificadores(total);
                        break;

                    case "GASTOS DE VENTA":
                        Gastos_de_venta = resultado_total_clasificadores(total);
                        break;

                    case "UTILIDAD NETA OPERACIONES":
                        Utilidad_neta_operacion = resultado_total_clasificadores(total);
                        break;

                    case "INGRESOS NO OPERACIONALES":
                        Ingresos_no_operacionales = resultado_total_clasificadores(total);
                        break;

                    case "UTILIDAD ANTES DE IMPUESTOS":
                        Utilidad_antes_de_impuestos = resultado_total_clasificadores(total);
                        break;

                    case "UTILIDAD NETA":
                        Utilidad_neta = resultado_total_clasificadores(total);
                        break;

                    case "GASTOS FAMILIA IZABAL":
                        Gastos_especiales = resultado_total_clasificadores(total);
                        break;

                    case "GASTOS DE ADMINISTRACION":
                        Gastos_de_administracion = resultado_total_clasificadores(total);
                        break;

                    default:
                        Ventas_netas = resultado_total_clasificadores(total);
                        break;
                    }
                }
            }
        }