| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Mcp.Treatment.Entity;
- using CoreFS.CA06;
- 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;
- namespace Core.StlMes.Client.Mcp.Treatment.HeatTreatment
- {
- public partial class FrmHttAppearancecheckRecord : FrmBase
- {
- OpeBase OB;
- private string ResultNo = "";
- private string plineCode = "";
- private string heatPlanNo = "";
- public FrmHttAppearancecheckRecord(string ResultNo,string heatPlanNo,string plineCode, OpeBase ob)
- {
- InitializeComponent();
- EntityHelper.ShowGridCaption<HttAppearancecheckRecordEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- OB = ob;
- this.ResultNo = ResultNo;
- this.plineCode = plineCode;
- this.heatPlanNo = heatPlanNo;
- List<HttAppearancecheckRecordEntity> listSource = EntityHelper.GetData<HttAppearancecheckRecordEntity>(
- "com.steering.mes.mcp.heatTreatment.HttAppearancecheckRecordService.getHttAppearancecheckRecord", new object[] { ResultNo }, OB);
- httAppearancecheckRecordEntityBindingSource.DataSource = listSource;
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "Save":
- Save();
- break;
- case "Close":
- CloseFrm();
- break;
- }
- }
- private void CloseFrm()
- {
- this.DialogResult = System.Windows.Forms.DialogResult.OK;
- this.Close();
- }
-
- private void Save()
- {
- this.ultraGrid1.UpdateData();
- HttAppearancecheckRecordEntity sto = this.ultraGrid1.ActiveRow.ListObject as HttAppearancecheckRecordEntity;
-
- var template = new HttAppearancecheckRecordEntity
- {
- PipeNo = sto.PipeNo,
- EastPipeEndStaightess = sto.EastPipeEndStaightess.Value,
- EastPipeExternal = sto.EastPipeExternal.Value,
- EastPipeMax = sto.EastPipeMax.Value,
- EastPipeMin = sto.EastPipeMin.Value,
- EastPipeNoy = sto.EastPipeNoy.Value,
- WestPipeEndStaightess = sto.WestPipeEndStaightess.Value,
- WestPipeExternal = sto.WestPipeExternal.Value,
- WestPipeMax = sto.WestPipeMax.Value,
- WestPipeMin = sto.WestPipeMin.Value,
- WestPipeNoy = sto.WestPipeNoy.Value,
- Fulllengthstraightness=sto.Fulllengthstraightness.Value,
- ResultNo=ResultNo,
- HeatPlanNo=heatPlanNo,
- PlineCode=plineCode,
- RecordNo=sto.RecordNo
- };
- var ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.heatTreatment.HttAppearancecheckRecordService";
- ccp.MethodName = "addHttAppearancecheckRecord";
- ccp.ServerParams = new object[] { JSONFormat.Format(template) };
- ccp = OB.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips("录入成功!");
- List<HttAppearancecheckRecordEntity> listSource = EntityHelper.GetData<HttAppearancecheckRecordEntity>(
- "com.steering.mes.mcp.heatTreatment.HttAppearancecheckRecordService.getHttAppearancecheckRecord", new object[] { ResultNo }, OB);
- httAppearancecheckRecordEntityBindingSource.DataSource = listSource;
- }
- else
- {
- MessageUtil.ShowTips("录入失败!");
- return;
- }
- }
- private void ultraGrid1_AfterRowInsert(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e)
- {
- }
- }
- }
|