using Bro.Common.Helper;
|
using Bro.UI.Model.Winform;
|
using NPOI.SS.Formula.Functions;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Drawing.Printing;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using System.Windows.Forms;
|
|
namespace Bro.M141.Process
|
{
|
[MenuNode("篮具码界面", "篮具码界面", 2, EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
|
public partial class BasketCodeUI : MenuFormBase
|
{
|
public BasketCodeUI()
|
{
|
InitializeComponent();
|
}
|
M141Config Config141 => Process.IConfig as M141Config;
|
M141Process Process141 => Process as M141Process;
|
|
public override void OnProcessUpdated()
|
{
|
base.OnProcessUpdated();
|
|
Process141.RerefreshBasketcodeUI += RerefreshUI;
|
RerefreshUI();
|
}
|
|
|
M141Process_Mysql mysqlhelper = new M141Process_Mysql();
|
|
public void RerefreshUI()
|
{
|
mysqlhelper.IniDBIP(Config141.IPforall);
|
DataTable dt = mysqlhelper.getBasketCode();
|
List<codedata> codes = new List<codedata>();
|
|
if (dt != null)
|
{
|
for (int i = 0; i < dt.Rows.Count; i++)
|
{
|
codes.Add(new codedata
|
{
|
code = dt.Rows[i][1].ToString(),
|
time = dt.Rows[i][2].ToString(),
|
});
|
}
|
}
|
|
this.Invoke(()=>
|
{
|
Codesdataview.DataSource = codes;
|
Codesdataview.Refresh();
|
});
|
}
|
|
|
public class codedata
|
{
|
public string code { get; set; }
|
public string time { get; set; }
|
}
|
|
|
}
|
}
|