汽车管MES4.0——C#查询窗口

目录

 一、配置解决方案

 二、画面

三、查询

前端:

后端:

四、上传系统

1.注册画面

2.测试编译


 一、配置解决方案

配置完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 并点击”打开”; 再点击“确认”)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值