/// <summary> /// The SetLabels /// </summary> private void SetLabels() { try { lblTotal.Text = DbData.Table.AsEnumerable().Select(p => p.Field <decimal>("Amount")).Sum().ToString("c"); lblAve.Text = DbData.Table.AsEnumerable().Select(p => p.Field <decimal>("Amount")).Average().ToString("N"); lblDev.Text = ((double)DbData.Table.Compute("StDev(Amount)", "Amount > 0")).ToString("N"); lblVar.Text = ((double)DbData.Table.Compute("Var(Amount)", "Amount > 0")).ToString("N"); lblCount.Text = DbData.GetCount(Table).ToString(); } catch (Exception ex) { new Error(ex).ShowDialog(); } }