BaoKai_202508_Wms_Jingwang_.../Scada/FrmDec.cs

52 lines
1.6 KiB
C#
Raw Normal View History

2025-08-24 21:52:42 +08:00
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 WMS.Business;
using WMS.Business.Base;
namespace Scada
{
public partial class FrmDec : Form
{
string decId = string.Empty;
public FrmDec(string id)
{
InitializeComponent();
decId = id;
t_decId.Text = decId;
}
void BindData()
{
DataTable tb = IBussFactory<BussDecSts>.Instance().GetDecSts(decId);
if (tb != null)
{
if (tb.Rows.Count > 0)
{
manual.Checked = tb.Rows[0]["manual"].ToString()=="1"?true:false;
auto.Checked = tb.Rows[0]["auto"].ToString() == "1" ? true : false;
online.Checked = tb.Rows[0]["online"].ToString() == "1" ? true : false;
In.Checked = tb.Rows[0]["inmode"].ToString() == "1" ? true : false;
Out.Checked = tb.Rows[0]["outmode"].ToString() == "1" ? true : false;
error.Checked = tb.Rows[0]["error"].ToString() == "1" ? true : false;
t_bay.Text = tb.Rows[0]["nowbay"].ToString();
t_lev.Text = tb.Rows[0]["nowlevel"].ToString();
t_error.Text = tb.Rows[0]["errorText"].ToString();
}
}
}
private void FrmDec_Load(object sender, EventArgs e)
{
//manual.Checked = true;
BindData();
}
}
}