You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
5.8 KiB
133 lines
5.8 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using DBFactory;
|
|
|
|
namespace wcfControlMonitorClient
|
|
{
|
|
public partial class FrmBrowseInterFace : Form
|
|
{
|
|
DataView dv;
|
|
DBOperator dboM = CStaticClass.dboM;
|
|
string sql = "";
|
|
|
|
private static FrmBrowseInterFace _formInstance;
|
|
|
|
public static FrmBrowseInterFace FormInstance
|
|
{
|
|
get
|
|
{
|
|
if (_formInstance == null)
|
|
{
|
|
_formInstance = new FrmBrowseInterFace();
|
|
}
|
|
return _formInstance;
|
|
}
|
|
set { _formInstance = value; }
|
|
}
|
|
public FrmBrowseInterFace()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
|
|
private void taskSearch_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
this.interfaceGridView.DataSource = null;
|
|
sql = string.Format("select CONTROL_ID as '{0}',RELATIVE_CONTROL_ID as '{1}',STOCK_BARCODE as '{2}',CONTROL_TASK_TYPE as '{3}',CONTROL_TASK_LEVEL as '{4}',START_DEVICE_CODE as '{5}',END_DEVICE_CODE as '{6}',CONTROL_STATUS as '{7}',CONTROL_BEGIN_TIME as '{8}',CONTROL_END_TIME as '{9}',ERROR_TEXT as '{10}',START_WAREHOUSE_CODE as '{11}',CONTROL_REMARK as '{12}' from IO_CONTROL where START_WAREHOUSE_CODE like '%{13}%'",
|
|
"任务编号","关联任务编号","条码","任务类型","优先级","起点","终点","任务状态","开始时间","完成时间","故障信息","仓库编码","备 注", CStaticClass.UserArea);
|
|
dv = dboM.ExceSQL(sql).Tables[0].DefaultView;
|
|
|
|
|
|
this.interfaceGridView.DataSource = dv;
|
|
|
|
this.labelCounts.Text = string.Format("任务数量:{0}", dv.Count);
|
|
}
|
|
catch (Exception fgkt)
|
|
{
|
|
if (FrmControlMonitor.FormInstance.GetObjectText("tsStatus").IndexOf("手工查询任务表时:" + fgkt.Message) < 0)
|
|
{
|
|
|
|
FrmControlMonitor.FormInstance.FlashPanit("tsStatus", "手工查询任务表时:" + fgkt.Message, true);
|
|
}
|
|
}
|
|
finally { }
|
|
}
|
|
|
|
private void applySearch_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
this.interfaceGridView.DataSource = null;
|
|
sql = string.Format("select CONTROL_APPLY_ID as '{0}',CONTROL_APPLY_TYPE as '{1}',WAREHOUSE_CODE as '{2}',DEVICE_CODE as '{3}',STOCK_BARCODE as '{4}', CONTROL_APPLY_PARA01 as '{5}',CONTROL_APPLY_PARA02 as '{6}',APPLY_TASK_STATUS as '{7}',CREATE_TIME as '{8}',CONTROL_APPLY_REMARK as '{9}' from IO_CONTROL_APPLY where WAREHOUSE_CODE like '%{10}%' ",
|
|
"申请ID", "申请类型", "仓库编码", "申请设备编号", "条码", "高度", "重量", "申请状态", "申请时间","备注", CStaticClass.UserArea);
|
|
dv = dboM.ExceSQL(sql).Tables[0].DefaultView;
|
|
this.interfaceGridView.DataSource = dv;
|
|
this.labelPortCounts.Text = string.Format("申请数量:{0}", dv.Count);
|
|
}
|
|
catch (Exception fgkap)
|
|
{
|
|
if (FrmControlMonitor.FormInstance.GetObjectText("tsStatus").IndexOf("手工查询申请表时:" + fgkap.Message) < 0)
|
|
{
|
|
|
|
FrmControlMonitor.FormInstance.FlashPanit("tsStatus", "手工查询申请表时:" + fgkap.Message, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void routeSearch_Click(object sender, EventArgs e)
|
|
{//20160318
|
|
try
|
|
{
|
|
this.interfaceGridView.DataSource = null;
|
|
sql = string.Format(
|
|
"select CONTROL_ROUTE_ID as '{0}',CONTROL_ROUTE_TYPE as '{1}',CONTROL_ROUTE_CODE as '{2}',CONTROL_ROUTE_NAME as '{3}',START_DEVICE as '{4}',END_DEVICE as '{5}',CONTROL_ROUTE_STATUS as '{6}',CONTROL_ROUTE_REMARK as '{7}' from IO_CONTROL_ROUTE order by CONTROL_ROUTE_ID",
|
|
"路径索引", " 路径类型", "路径编码", "路径名称", "起点设备", "终点设备", "路径状态[1:可用,0:不可用]", "备注");
|
|
dv = dboM.ExceSQL(sql).Tables[0].DefaultView;
|
|
this.interfaceGridView.DataSource = dv;
|
|
this.labelRGVInfoCounts.Text = string.Format("路径数量:{0}", dv.Count);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
if (FrmControlMonitor.FormInstance.GetObjectText("tsStatus").IndexOf("手工查询路径表时:" + ex.Message) < 0)
|
|
{
|
|
|
|
FrmControlMonitor.FormInstance.FlashPanit("tsStatus", "手工查询路径表时:" + ex.Message, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
this.interfaceGridView.DataSource = null;
|
|
sql = string.Format(
|
|
"select IO_CONTROL_DEVICE_CODE as '{0}',IO_CONTROL_DEVICE_STATE as '{1}',IO_CONTROL_DEVICE_STATE_REMARK as '{2}' from IO_CONTROL_DEVICE_STATE order by IO_CONTROL_DEVICE_STATE_ID",
|
|
"设备编号", "是否有货(0:无货,1:有货)","更新时间");
|
|
dv = dboM.ExceSQL(sql).Tables[0].DefaultView;
|
|
this.interfaceGridView.DataSource = dv;
|
|
this.labelDevicesCounts.Text = string.Format("设备数量:{0}", dv.Count);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
if (FrmControlMonitor.FormInstance.GetObjectText("tsStatus").IndexOf("手工查询设备状态表时:" + ex.Message) < 0)
|
|
{
|
|
|
|
FrmControlMonitor.FormInstance.FlashPanit("tsStatus", "手工查询设备状态表时:" + ex.Message, true);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|