56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
|
|
using Sunny.UI;
|
|||
|
|
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 材料热传导系数;
|
|||
|
|
|
|||
|
|
namespace 全自动水压检测仪
|
|||
|
|
{
|
|||
|
|
public partial class ScanImport : Form
|
|||
|
|
{
|
|||
|
|
private ConductivityRepository _repository;
|
|||
|
|
public ScanImport()
|
|||
|
|
{
|
|||
|
|
InitializeComponent();
|
|||
|
|
_repository = new ConductivityRepository();
|
|||
|
|
uiDataGridView1.AutoGenerateColumns = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void save_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
double diffpressure = 0, temperature = 0, dwelltime = 0;
|
|||
|
|
double.TryParse(uiTextBox4.Text, out diffpressure);
|
|||
|
|
double.TryParse(uiTextBox9.Text, out temperature);
|
|||
|
|
double.TryParse(uiTextBox5.Text, out dwelltime);
|
|||
|
|
|
|||
|
|
_repository.InsertScanItems(new ScanData
|
|||
|
|
{
|
|||
|
|
barcode = uiTextBox4.Text,
|
|||
|
|
diffpressure = diffpressure,
|
|||
|
|
temperature = temperature,
|
|||
|
|
dwelltime = dwelltime,
|
|||
|
|
});
|
|||
|
|
LoadData();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void ScanImport_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
LoadData();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void LoadData()
|
|||
|
|
{
|
|||
|
|
var data = _repository.GetScanData();
|
|||
|
|
uiDataGridView1.DataSource = data;
|
|||
|
|
|
|||
|
|
uiDataGridView1.Refresh();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|