Ejemplo n.º 1
0
        public async Task <IReadOnlyCollection <CommandRM> > Run(GetAllCommands criteria, IContext context)
        {
            var s = (await Run(new CollectionQueryState <CommandRM>(), context)).Result();

            return(s
                   .Where(x => x.Parent == null)
                   .ToArray());
        }
Ejemplo n.º 2
0
        private void IninitializareGrafic()
        {
            chart1.Series.Clear();

            List <MeniuModel> comenzi = GetAllCommands.Get(utilizator.Id);

            Series serie = new Series("Kcal");

            foreach (var item in comenzi.GroupBy(x => x.DenumereaProdus))
            {
                serie.Points.AddXY(item.First().DenumereaProdus, item.Sum(x => x.KCal));
            }

            chart1.Series.Add(serie);

            chart1.ChartAreas[0].AxisX.Interval  = 1;
            chart1.Series[0].IsValueShownAsLabel = true;
        }