using iWare_SCADA_BusinessLogical.BLL; using iWare_SCADA_BusinessLogical; using iWare_SCADA_BusinessLogical.Utils; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using iWare_SCADA_Model.TableModelSC; namespace iWare_SCADA_DataCaptureV3 { public partial class FormTest : Form { public FormTest() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { AlarmLogManager.UpdateAlarmLogs(new AlarmLog()); //openFileDialog1.Filter = "Excel2003(*.xls)|*.csv|Excel2007(*.xlsx)|*.xlsx"; //if (openFileDialog1.ShowDialog() != DialogResult.OK) // return; //string FileNameWrite = openFileDialog1.FileName; //var datatable = CSVHelper.ReadCSV(FileNameWrite); //this.dataGridView1.DataSource = datatable; } catch(Exception ex) { MessageBox.Show(ex.Message); } } private void button2_Click(object sender, EventArgs e) { try { var log2=AlarmLogManager.GetAlarmLogs(); //var log = WorkPieceLogManager.GetAlarmLog(); this.dataGridView1.DataSource = log2; } catch (Exception ex) { MessageBox.Show(ex.Message); } } } }