| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.PlnSaleOrd.炉计划.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.PlnSaleOrd.Controls
- {
- public partial class FrmMatGpInfo : FrmBase
- {
- public string matNo = "";
- public string flag = "";
- private UltraGridRow row = null;
- private OpeBase _ob;
- public int count = 0;
- public FrmMatGpInfo(UltraGridRow uRow, OpeBase ob)
- {
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- InitializeComponent();
- row = uRow;
- _ob = ob;
- }
- private void FrmMatGpInfo_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<MatGpMEntityLk>(ultraGrid1.DisplayLayout.Bands[0]);
- doQueryMatGpInfo(row);
- }
- /// <summary>
- /// 查询库存信息
- /// </summary>
- /// <param name="row"></param>
- private void doQueryMatGpInfo(UltraGridRow row)
- {
- MatGpMEntity matGpEntity = (MatGpMEntity)row.ListObject;
- string matGpTity = JSONFormat.Format(matGpEntity);
- List<MatGpMEntityLk> listSource = EntityHelper.GetData<MatGpMEntityLk>("com.steering.pss.plnsaleord.planStove.FrmPlanMaterialSelection.queryMatGpInfo", new object[] { matGpTity }, _ob);
- matGpMEntityBindingSource.DataSource = listSource;
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "doFrim":
- doFrim();
- break;
- case "Close":
- closeFrm();
- break;
- }
- }
- /// <summary>
- /// 关闭
- /// </summary>
- private void closeFrm()
- {
- flag = "0";
- this.Close();
- }
- /// <summary>
- /// 确认
- /// </summary>
- private void doFrim()
- {
- this.ultraGrid1.UpdateData();
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid1.Rows.AsQueryable().Where(" CHK = 'True'");
-
- foreach(UltraGridRow uRow in checkMagRows)
- {
- MatGpMEntityLk matGpTity = (MatGpMEntityLk)uRow.ListObject;
- string matGpEntity = JSONFormat.Format(matGpTity);
- DataTable ds = ServerHelper.GetData("com.steering.pss.plnsaleord.planStove.FrmPlanMaterialSelection.queryGpMatNo", new object[] { matGpEntity }, _ob);
- for (int i = 0; i < ds.Rows.Count; i++)
- {
- matNo = matNo + ds.Rows[i]["MAT_NO"].ToString2()+",";
- count = count + 1;
- }
- }
- flag = "1";
- this.Close();
-
- }
- }
- }
|