目录
一、配置解决方案
配置完IDK登录平台后,需要配置解决方案路径,然后分别在client和server窗口下建立MM,MM项目,分别导入现有项目:
D:\codeSpace\code1\Client\MM;
D:\codeSpace\code1\Server\Dev\MM 路径中的文件。
二、画面
这里我们需要做一个工模具履历查询画面,在拖动组件进行布局前我们需在CLient下添加EH项目以及在工具栏中新建EH工具。
(右键 EF 选项卡选择”选择项”;然 后 点 击 “ 浏 览 ” , 到 解 决 方 案 目 录 如 :
D:\codeSpace\code1\Client\EP 下选中 EF.dll 以及
DevExpress.XtraLayout.v13.2.dll 并点击”打开”; 再点击“确认”)

这里观察表格,然后在 Client\MM\MMTRLG 下新创建MMTRLG110,只需根据查询条件的需求来配置画面,如设备编号,设备类别,操作类型,创建时间起,创建时间止。这里可以参考类似查询画面组件属性来添加修改。画面如图2-1所示

如图2-2所示,创建完画面之后,需要在MES系统中搜索 EPED54自定义配置。搜索表名TMMTRLGTM0,添加表格中的所有字段。
三、查询
因为是查询画面,所以需在前后台编译查询代码。
前端:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using EF;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using System.Collections;
namespace MM
{
public partial class FormMMTRLG110G : EF.EFForm
{
#region 变量定义
private int totalPageCount = 0;
private int currentPage = 0;
private string type = "";
string ActionType = "";
#endregion
public FormMMTRLG110G()
{
InitializeComponent();
}
#region Load事件
private void FormMMTRLG110G_Load(object sender, EventArgs e)
{
EF.Utility.SetGridColumn(new EF.EFDevGrid[] { this.efDevGrid1 }, new string[] { "MMTRLG110G_INQ" });
EFX.EFCGrid.GetEFCGridBase(efDevGrid1).TitleEditEnableColor = Color.Red; //设置成红色
//绑定小代码
EI.EIInfo codeInfo = EF.Utility.GetCodeClassValue("TMT4", "TM30");
BE2.Common.Utility.SetLookUpEditProperty(this.device_type, codeInfo.Tables["TMT4"], true);
BE2.Common.Utility.SetLookUpEditProperty(this.operate_type, codeInfo.Tables["TM30"], true);
}
#endregion
#region 查询事件
private void query_data(int recordFrom, int pageSize)
{
try
{
EI.EIInfo inBlock = new EI.EIInfo(); ;
inBlock.Tables[0].Columns.Add("STAND_NO");//设备编号
inBlock.Tables[0].Columns.Add("DEVICE_TYPE");//设备类别
inBlock.Tables[0].Columns.Add("OPERATE_TYPE");//操作类型
inBlock.Tables[0].Columns.Add("TIME_FROM");//创建时间起
inBlock.Tables[0].Columns.Add("TIME_TO");//创建时间止
inBlock.Tables[0].Rows.Add();
inBlock.Tables[0].Rows[0]["STAND_NO"] = this.stand_no.