Ejemplo n.º 1
0
        private void excelKayittan_ItemClick(object sender, ItemClickEventArgs e)
        {
            string        dizin = Directory.GetCurrentDirectory();
            List <string> dizi  = Directory.GetFiles(dizin, "*.xls*", SearchOption.AllDirectories).ToList();

            if (dizi.Count > 0)
            {
                using (new WaitIndicator())
                {
                    CollectVerili c = new CollectVerili(dizi.First());
                    c.get();
                    var data = c.satislar.ToList();
                    this.liste = data;
                    bindingSource1.DataSource = data;
                    gridControl1.DataSource   = bindingSource1;
                }
            }
        }
Ejemplo n.º 2
0
        private void excelYukle_ItemClick(object sender, ItemClickEventArgs e)
        {
            string         path      = "";
            OpenFileDialog choofdlog = new OpenFileDialog();

            choofdlog.Filter      = "Excel Files|*.xls;*.xlsx;";
            choofdlog.FilterIndex = 1;
            choofdlog.Multiselect = false;

            if (choofdlog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                path = choofdlog.FileName;
                using (new WaitIndicator())
                {
                    CollectVerili c = new CollectVerili(path);
                    c.get();
                    var data = c.satislar.ToList();
                    this.liste = data;
                    bindingSource1.DataSource = data;
                    gridControl1.DataSource   = bindingSource1;
                }
            }
        }