| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- 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.Mcp.Coupling
- {
- public partial class ComCoupBug : FrmBase
- {
- private string _woid = "";
- private string _judgeNo = "";
- private DataTable _dtMatList = null;
- private OpeBase _ob = null;
- ArrayList list = new ArrayList();
- private int sumPieces = 0;
- public int SumPieces
- {
- get { return sumPieces; }
- set { sumPieces = value; }
- }
- public ArrayList List
- {
- get { return list; }
- set { list = value; }
- }
- public ComCoupBug(string woid,string judgeNo,OpeBase ob)
- {
- InitializeComponent();
- _woid = woid;
- _judgeNo = judgeNo;
- _ob = ob;
- }
- private string strNum = "";
- private string strMemo = "";//备注
- public string StrNum
- {
- get { return strNum; }
- set { strNum = value; }
- }
- public string StrMemo
- {
- get { return strMemo; }
- set { strMemo = value; }
- }
- private string strat = "";
- public string Strat
- {
- get { return strat; }
- set { strat = value; }
- }
- private void DoSave()
- {
- UltraGridRow row = ultraGrid1.ActiveRow;
- if (row == null) return;
- ultraGrid1.UpdateData();
- int count = 0;
-
- foreach (UltraGridRow checkrow in ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(checkrow.Cells["CHK"].Text) == true)
- {
- if (checkrow.Cells["FAILNUM"].Value == null || checkrow.Cells["FAILNUM"].Value.ToString() == "")
- {
- MessageUtil.ShowTips("请输入合理个数!");
- return;
- }
- count += 1;
- sumPieces += Convert.ToInt32(checkrow.Cells["FAILNUM"].Value.ToString());
- ArrayList arr = new ArrayList();
- arr.Add(checkrow.Cells["FAIL_TYPE_NAME"].Value.ToString());
- arr.Add(checkrow.Cells["FAILNUM"].Value.ToString());
- list.Add(arr);
- }
- }
- if(count == 0)
- {
- MessageUtil.ShowTips("请勾选废品并输入合理个数!");
- return;
- }
- this.Close();
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "Save":
- DoSave();
- break;
- case "Close":
- DoClose();
- break;
- }
- }
- private void DoClose()
- {
- this.Close();
- }
- private void ComCoupBug_Load(object sender, EventArgs e)
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.ThreadInspectResultService.getQueryComInfo", new object[] { "7024" }, this._ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
- }
- private void ultraGrid1_CellChange(object sender, CellEventArgs e)
- {
- UltraGridRow urg = ultraGrid1.ActiveRow;
- if(urg==null)
- {
- return;
- }
- if(e.Cell.Column.Key.Equals("FAILNUM")&&urg.Cells["FAILNUM"].Text!="")
- {
- urg.Cells["CHK"].Value = true;
- }
- }
- }
- }
|