コード例 #1
0
        public Form_App()
        {
            InitializeComponent();
            Datab = new DBWinFormEntities();

            var types = Datab.Categories.ToList <Categorie>();

            foreach (var item in types)
            {
                comboBox.Items.Add(item.NumeCategorie);
            }
        }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (DBWinFormEntities Db = new DBWinFormEntities())
     {
         SeriesCollection series = new SeriesCollection();
         foreach (var item in Db.Angajats)
         {
             series.Add(new PieSeries()
             {
                 Title = item.Name.ToString(), Values = new ChartValues <int> {
                     item.Vanzari
                 }, DataLabels = true, LabelPoint = label
             });
             pieChart1.Series = series;
         }
     }
 }