schangxiang@126.com
2024-09-04 bd8936f8feb44c0d3e95a0d19685f2ab018670bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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);
            }
        }
    }
}