| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.YdmStuffManage.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.YdmStuffManage
- {
- public partial class FrmUpdateLenth : FrmBase
- {
- public FrmUpdateLenth()
- {
- InitializeComponent();
- }
- private void FrmUpdateLenth_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<MatGpMEntity3>(ultraGrid1.DisplayLayout.Bands[0]);
- }
- /// <summary>
- /// 重写基类方法
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="ToolbarKey"></param>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "DoQuery":
- doQuery();
- break;
- case"Update":
- updateLength();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- /// <summary>
- /// 查询未送判 余材
- /// </summary>
- private void doQuery()
- {
- string stoveNo = "";
- string judgeNo = "";
- if(this.chkStoveNo.Checked)
- {
- stoveNo = this.txtStoveNo.Text.Trim();
- }
- if(this.chkJugeHeatNo.Checked)
- {
- judgeNo = this.txtJugeNo.Text.Trim();
- }
- ArrayList parmList = new ArrayList();
- parmList.Add(stoveNo);
- parmList.Add(judgeNo);
- List<MatGpMEntity3> listSource = EntityHelper.GetData<MatGpMEntity3>(
- "Core.LgMes.Server.Stuffmanage.FrmUpdateLenth.doQuery", new object[] { parmList }, this.ob);
- MatGpMEntity3bindingSource.DataSource = listSource;
- }
- /// <summary>
- /// 修改坯长
- /// </summary>
- private void updateLength()
- {
- this.ultraGrid1.UpdateData();
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid1.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请选择需要修改的库存信息!");
- return;
- }
- ArrayList parmList = new ArrayList();
- foreach (UltraGridRow row in checkMagRows)
- {
- MatGpMEntity3 matBcEntity = (MatGpMEntity3)row.ListObject;
- string matBcTity = JSONFormat.Format(matBcEntity);
- parmList.Add(matBcTity);
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "Core.LgMes.Server.Stuffmanage.FrmUpdateLenth";
- ccp.MethodName = "updateLen";
- ccp.ServerParams = new object[] { parmList };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- doQuery();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- private void chkStoveNo_CheckedChanged(object sender, EventArgs e)
- {
- this.txtStoveNo.Enabled = this.chkStoveNo.Checked;
- }
- private void chkJugeHeatNo_CheckedChanged(object sender, EventArgs e)
- {
- this.txtJugeNo.Enabled = this.chkJugeHeatNo.Checked;
- }
- }
- }
|