| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- 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.Data;
- using System.Linq;
- namespace Core.StlMes.Client.Qcm
- {
- public partial class FrmProcess : FrmBase
- {
- public FrmProcess()
- {
- InitializeComponent();
- ExceptionHelper.RegistException();
- }
- private OpeBase ob1;
- public OpeBase Ob1
- {
- get { return ob1; }
- set { ob1 = value; }
- }
- private string code;
- public string Code
- {
- get { return code; }
- set { code = value; }
- }
- private string desc;
- public string Desc
- {
- get { return desc; }
- set { desc = value; }
- }
- private string processStyle = "";
- public string ProcessStyle
- {
- get { return processStyle; }
- set { processStyle = value; }
- }
- //查询
- public void DoQuery()
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.qcm.ComBaseQuery.getSecProcess", new Object[] { processStyle }, this.Ob1);
- GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true);
- }
- /// <summary>
- /// 初始被选择项
- /// </summary>
- private void SetSelect()
- {
- if (desc.Equals(""))
- return;
- string[] str = desc.Split('|');
- for (int i = 0; i < ultraGrid1.Rows.Count; i++)
- {
- if (str.Contains(ultraGrid1.Rows[i].Cells["PROCESS_DESC_C"].Value.ToString()))
- {
- this.ultraGrid1.Rows[i].Cells["CHK"].Value = true;
- }
- }
- ultraGrid1.UpdateData();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- ultraGrid1.UpdateData();
- UltraGridRow row = null;
- string modelcode = "";
- string modeldesc = "";
- for (int i = 0; i < ultraGrid1.Rows.Count; i++)
- {
- row = ultraGrid1.Rows[i];
- if (Convert.ToBoolean(row.Cells["CHK"].Value))
- {
- if (modelcode == "")
- modelcode = row.Cells["PROCESS_CDOE_C"].Value.ToString();
- else
- modelcode = modelcode + "|" + row.Cells["PROCESS_CDOE_C"].Value.ToString();
- if (modeldesc == "")
- modeldesc = row.Cells["PROCESS_DESC_C"].Value.ToString();
- else
- modeldesc = modeldesc + "|" + row.Cells["PROCESS_DESC_C"].Value.ToString();
- }
- }
- this.Code = modelcode;
- this.Desc = modeldesc;
- this.Close();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void FrmProcess_Load(object sender, EventArgs e)
- {
- DoQuery();
- SetSelect();
- }
- private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- ultraGrid1.UpdateData();
- }
- }
- }
|