| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- using com.steering.pss.ydm.entity;
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.YdmPipeManage.Dialog;
- using Core.StlMes.Client.YdmPipeManage.Entity;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- 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;
- namespace Core.StlMes.Client.YdmPipeManage
- {
- public partial class FrmMonerSeq : FrmBase
- {
- OpeBase _ob;
- public string disOk = "";
- MatZcMEntity2 matZcEntity = new MatZcMEntity2();
- string _userName = "";
- string _deptId = "";
- string[] _arr = null;
- string _acount = "";
- public FrmMonerSeq(OpeBase ob, MatZcMEntity matZctity, string userName, string deptId, string[] arr)
- {
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- InitializeComponent();
- _ob = ob;
-
- _deptId = deptId;
- _userName = userName;
- _arr = arr;
- _acount = matZctity.ActCount.ToString3();
- matZcEntity.JudgeStoveNo = matZctity.JudgeStoveNo;
- matZcEntity.BatchNo = matZctity.BatchNo;
- matZcEntity.BatchGroudNo = matZctity.BatchGroudNo;
- matZcEntity.ProductFlag = matZctity.ProductFlag;
- matZcEntity.MatStatus = matZctity.MatStatus;
- matZcEntity.ActLenMin = matZctity.ActLenMin;
- matZcEntity.ActLenMax = matZctity.ActLenMax;
- matZcEntity.BelongCode = matZctity.BelongCode;
- matZcEntity.JudgeResult = matZctity.JudgeResult;
- matZcEntity.FixNum = matZctity.FixNum.ToString2();
- matZcEntity.Pipmemo = matZctity.Pipmemo;
- matZcEntity.StorageNo = matZctity.StorageNo;
- matZcEntity.LocationNo = matZctity.LocationNo;
- }
- /// <summary>
- /// 重写基类方法
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="To
- /// olbarKey"></param>
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "OK":
- doFrim();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- private void doQuery(MatZcMEntity2 matZcEntity2)
- {
- string matZcTity = JSONFormat.Format(matZcEntity2);
- List<MatZcMEntity2> listSource = EntityHelper.GetData<MatZcMEntity2>(
- "com.steering.pss.ydm.pipemanage.FrmPipeMagement.doQueryGoods", new object[] { matZcTity }, this._ob);
- matZcMEntity2BindingSource.DataSource = listSource;
- }
- /// <summary>
- /// 确认
- /// </summary>
- private void doFrim()
- {
- this.ultraGrid1.UpdateData();
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid1.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- return;
- }
- ArrayList parmList = new ArrayList();
- foreach (UltraGridRow row in checkMagRows)
- {
- MatZcMEntity2 matZcTity = (MatZcMEntity2)row.ListObject;
- string matZcEntity = JSONFormat.Format(matZcTity);
- parmList.Add(matZcEntity);
- }
- MonomerDialog monomerDialog = new MonomerDialog(_ob);
- monomerDialog.ShowDialog();
- string monomerExplain = monomerDialog.monomerExplain;
- string monomerFinishedProduct = monomerDialog.momomerFinishedProduct;
- if (monomerExplain.Length == 0)
- {
- return;
- }
- string isRolling = monomerDialog.isRolling;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.pss.ydm.pipemanage.FrmPipeMagement";
- ccp.MethodName = "seqMoner";
- ccp.ServerParams = new object[] { parmList, monomerExplain, isRolling, _userName, _deptId, _arr, monomerFinishedProduct, _acount };
- ccp = _ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("脱单成功!"))
- {
- disOk = "1";
- this.Close();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- private void FrmLikuSeq_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<MatZcMEntity2>(ultraGrid1.DisplayLayout.Bands[0]);
- doQuery(matZcEntity);
- }
- private void ultraGrid1_CellChange(object sender, CellEventArgs e)
- {
- this.ultraGrid1.UpdateData();
- if (e.Cell.Column.Key == "CHK")
- {
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid1.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- this.ultraLabel1.Text = "";
- return;
- }
- int acount = 0;
- double len = 0.0;
- double wgt = 0.0;
- foreach (UltraGridRow row in checkMagRows)
- {
- acount = acount + int.Parse(row.Cells["ActCount"].Text);
- wgt = wgt + double.Parse(row.Cells["ActWeight"].Text);
- len = len + double.Parse(row.Cells["ActLen"].Text);
- }
- this.ultraLabel1.Text = "已选信息:" + acount.ToString3() + "支" + " " + wgt.ToString3() + "吨" + " " + len.ToString3() + "米";
- }
- }
- }
- }
|