| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Control;
- using Core.StlMes.Client.ZGMil;
- using Infragistics.Win.UltraWinGrid;
- using com.steering.mes.zgmil.entity;
- namespace Core.StlMes.Client.ZGMil.ResultConrtrol
- {
- public partial class RollResult : UserControl
- {
- private Infragistics.Win.UltraWinGrid.UltraGrid _grid = null;
- public RollResult()
- {
- InitializeComponent();
- GridHelper.InitCardGrid(RollingDataSource, ultraGrid2);
- _grid = this.ultraGrid2;
- }
- private MilRollingResultEntity rollResult = new MilRollingResultEntity();
- public MilRollingResultEntity Value
- {
- get { return rollResult; }
- set
- {
- if (value != null)
- {
- rollResult = value;
- UpdateData();
- }
- }
- }
- private bool isCellSelect = false;
- public bool IsCellSelect
- {
- get { return isCellSelect; }
- set { isCellSelect = value; }
- }
- public void UpdateData()
- {
- if (rollResult != null)
- {
- //轧制支数
- RollingDataSource.Rows[0]["ROLLINGNUM"] = rollResult.Rollingnum;
- //轧废支数
- RollingDataSource.Rows[0]["SCRAPNUM"] = rollResult.ScrapNum;
- //交接班支数
- RollingDataSource.Rows[0]["CHANGECLASSNUM"] = rollResult.Changeclassnum;
- //备注
- RollingDataSource.Rows[0]["Remark1"] = rollResult.Remark;
- //VRS转速
- RollingDataSource.Rows[0]["VXSSPEED"] = rollResult.VrsSpeed;
- //预插入长度
- RollingDataSource.Rows[0]["INSERTLENGTH"] = rollResult.InsertLength;
- //毛管名义尺寸
- RollingDataSource.Rows[0]["SIZE"] = rollResult.Tubesize;
- //EM转速
- RollingDataSource.Rows[0]["EMSPEED"] = rollResult.Emspeed;
- //限动速度
- RollingDataSource.Rows[0]["SPEEDLIMIT"] = rollResult.LimitSpeed;
- //EX1脱管机架速度
- RollingDataSource.Rows[0]["EXT1SPEED"] = rollResult.Ext1RackSpeed;
- //连轧开始时间
- RollingDataSource.Rows[0]["StartTime"] = rollResult.StartTime;
- //连轧结束时间
- RollingDataSource.Rows[0]["EndTime"] = rollResult.EndTime;
- //辊缝1
- RollingDataSource.Rows[0]["ROLLSPACE1"] = rollResult.RackSpace1;
- //辊缝2
- RollingDataSource.Rows[0]["ROLLSPACE2"] = rollResult.RackSpace2;
- //辊缝3
- RollingDataSource.Rows[0]["ROLLSPACE3"] = rollResult.RackSpace3;
- //辊缝4
- RollingDataSource.Rows[0]["ROLLSPACE4"] = rollResult.RackSpace4;
- //辊缝5
- RollingDataSource.Rows[0]["ROLLSPACE5"] = rollResult.RackSpace5;
- //辊缝6
- RollingDataSource.Rows[0]["ROLLSPACE6"] = rollResult.RackSpace6;
- //辊缝7
- RollingDataSource.Rows[0]["ROLLSPACE7"] = rollResult.RackSpace7;
- //辊速1
- RollingDataSource.Rows[0]["ROLLSPEED1"] = rollResult.RackSpeed1;
- //辊速2
- RollingDataSource.Rows[0]["ROLLSPEED2"] = rollResult.RackSpeed2;
- //辊速3
- RollingDataSource.Rows[0]["ROLLSPEED3"] = rollResult.RackSpeed3;
- //辊速4
- RollingDataSource.Rows[0]["ROLLSPEED4"] = rollResult.RackSpeed4;
- //辊速5
- RollingDataSource.Rows[0]["ROLLSPEED5"] = rollResult.RackSpeed5;
- //辊速6
- RollingDataSource.Rows[0]["ROLLSPEED6"] = rollResult.RackSpeed6;
- //辊速7
- RollingDataSource.Rows[0]["ROLLSPEED7"] = rollResult.RackSpeed7;
- //机架轧制力1
- RollingDataSource.Rows[0]["ROLLINGFORCE1"] = rollResult.RollingForce1;
- //机架轧制力2
- RollingDataSource.Rows[0]["ROLLINGFORCE2"] = rollResult.RollingForce2;
- //机架轧制力3
- RollingDataSource.Rows[0]["ROLLINGFORCE3"] = rollResult.RollingForce3;
- //机架轧制力4
- RollingDataSource.Rows[0]["ROLLINGFORCE4"] = rollResult.RollingForce4;
- //机架轧制力5
- RollingDataSource.Rows[0]["ROLLINGFORCE5"] = rollResult.RollingForce5;
- //机架轧制力6
- RollingDataSource.Rows[0]["ROLLINGFORCE6"] = rollResult.RollingForce6;
- //机架轧制力7
- RollingDataSource.Rows[0]["ROLLINGFORCE7"] = rollResult.RollingForce7;
- RollingDataSource.Rows[0]["startRollTemp"] = rollResult.StartRollTemp;
- //交班取消
- RollingDataSource.Rows[0]["CHANGENUMCANCEL"] = "交班取消";
- }
- }
- public void UpdateDataForRack()
- {
- if (rollResult != null)
- {
- //轧制支数
- RollingDataSource.Rows[0]["ROLLINGNUM"] = rollResult.Rollingnum;
- //轧废支数
- RollingDataSource.Rows[0]["SCRAPNUM"] = rollResult.ScrapNum;
- //交接班支数
- RollingDataSource.Rows[0]["CHANGECLASSNUM"] = rollResult.Changeclassnum;
- //交班取消
- RollingDataSource.Rows[0]["CHANGENUMCANCEL"] = "交班取消";
- }
- }
- public void UpdateDateForPrama(MilRollingResultEntity rollResult)
- {
- //VRS转速
- RollingDataSource.Rows[0]["VXSSPEED"] = rollResult.VrsSpeed;
- //预插入长度
- RollingDataSource.Rows[0]["INSERTLENGTH"] = rollResult.InsertLength;
- //毛管名义尺寸
- RollingDataSource.Rows[0]["SIZE"] = rollResult.Tubesize;
- //EM转速
- RollingDataSource.Rows[0]["EMSPEED"] = rollResult.Emspeed;
- //限动速度
- RollingDataSource.Rows[0]["SPEEDLIMIT"] = rollResult.LimitSpeed;
- //EX1脱管机架速度
- RollingDataSource.Rows[0]["EXT1SPEED"] = rollResult.Ext1RackSpeed;
-
- //辊缝1
- RollingDataSource.Rows[0]["ROLLSPACE1"] = rollResult.RackSpace1;
- //辊缝2
- RollingDataSource.Rows[0]["ROLLSPACE2"] = rollResult.RackSpace2;
- //辊缝3
- RollingDataSource.Rows[0]["ROLLSPACE3"] = rollResult.RackSpace3;
- //辊缝4
- RollingDataSource.Rows[0]["ROLLSPACE4"] = rollResult.RackSpace4;
- //辊缝5
- RollingDataSource.Rows[0]["ROLLSPACE5"] = rollResult.RackSpace5;
- //辊缝6
- RollingDataSource.Rows[0]["ROLLSPACE6"] = rollResult.RackSpace6;
- //辊缝7
- RollingDataSource.Rows[0]["ROLLSPACE7"] = rollResult.RackSpace7;
- //辊速1
- RollingDataSource.Rows[0]["ROLLSPEED1"] = rollResult.RackSpeed1;
- //辊速2
- RollingDataSource.Rows[0]["ROLLSPEED2"] = rollResult.RackSpeed2;
- //辊速3
- RollingDataSource.Rows[0]["ROLLSPEED3"] = rollResult.RackSpeed3;
- //辊速4
- RollingDataSource.Rows[0]["ROLLSPEED4"] = rollResult.RackSpeed4;
- //辊速5
- RollingDataSource.Rows[0]["ROLLSPEED5"] = rollResult.RackSpeed5;
- //辊速6
- RollingDataSource.Rows[0]["ROLLSPEED6"] = rollResult.RackSpeed6;
- //辊速7
- RollingDataSource.Rows[0]["ROLLSPEED7"] = rollResult.RackSpeed7;
- //机架轧制力1
- RollingDataSource.Rows[0]["ROLLINGFORCE1"] = rollResult.RollingForce1;
- //机架轧制力2
- RollingDataSource.Rows[0]["ROLLINGFORCE2"] = rollResult.RollingForce2;
- //机架轧制力3
- RollingDataSource.Rows[0]["ROLLINGFORCE3"] = rollResult.RollingForce3;
- //机架轧制力4
- RollingDataSource.Rows[0]["ROLLINGFORCE4"] = rollResult.RollingForce4;
- //机架轧制力5
- RollingDataSource.Rows[0]["ROLLINGFORCE5"] = rollResult.RollingForce5;
- //机架轧制力6
- RollingDataSource.Rows[0]["ROLLINGFORCE6"] = rollResult.RollingForce6;
- //机架轧制力7
- RollingDataSource.Rows[0]["ROLLINGFORCE7"] = rollResult.RollingForce7;
- RollingDataSource.Rows[0]["startRollTemp"] = rollResult.StartRollTemp;
- }
- private void ultraGrid2_CellChange(object sender, CellEventArgs e)
- {
- isCellSelect = true;
- }
- private void ultraGrid2_Error(object sender, ErrorEventArgs e)
- {
- e.Cancel = true;
- if (ultraGrid2.ActiveCell.Column.Key == "StartTime" || ultraGrid2.ActiveCell.Column.Key == "EndTime")
- {
- MessageBox.Show("请输入完整的时间");
- }
- }
- private void ultraGrid2_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == (char)13)
- {
- ultraGrid2.PerformAction(UltraGridAction.NextCell);
- ultraGrid2.PerformAction(UltraGridAction.EnterEditMode);
- }
- }
- }
- }
|