| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Core.Mes.Client.Comm.Control;
- using Infragistics.Win.UltraWinGrid;
- namespace Core.StlMes.Client.Plan.Order
- {
- public partial class ComMscPilneCtrl : UserControl
- {
- /// <summary>
- /// 质量设计
- /// </summary>
- private string desginKey = "";
- /// <summary>
- /// 制程
- /// </summary>
- private string cheMscPline = "";
- private ComMscPilneBLL mscPilneBLL;
- public ComMscPilneCtrl()
- {
- InitializeComponent();
- }
- public void ComBLL(OpeBase ob)
- {
- mscPilneBLL = new ComMscPilneBLL(ob);
- }
- /// <summary>
- /// 查询制程
- /// </summary>
- public void DoQuery()
- {
- DataTable dt = mscPilneBLL.Query(desginKey);
- GridHelper.CopyDataToDatatable(dt, this.dataTable1, true);
- PlanComm.setGridActivation(this.ultraGridMscPline.DisplayLayout.Bands[0], "CHC");
- if (!cheMscPline.Equals("") && ultraGridMscPline.Rows.Count > 0)
- {
- foreach (UltraGridRow uRow in this.ultraGridMscPline.Rows)
- {
- if (uRow.Cells["MSC_PLINE"].Value.ToString().Equals(cheMscPline))
- {
- uRow.Cells["CHC"].Value = true;
- ultraGridMscPline.ActiveRow = uRow;
- }
- }
- }
- }
- /// <summary>
- /// 查询制程信息
- /// </summary>
- public void DoQueryInfo(string mscPline)
- {
- DataTable dtPrc = mscPilneBLL.QueryPrc(desginKey, mscPline);
- DataTable dtGrade = mscPilneBLL.QueryGrade(desginKey, mscPline);
- lblStationPath.Value = mscPilneBLL.QueryStation(desginKey, mscPline);
- GridHelper.CopyDataToDatatable(dtPrc, this.dataTable2, true);
- GridHelper.CopyDataToDatatable(dtGrade, this.dataTable3, true);
- PlanComm.setGridActivation(this.ultraGridProcess.DisplayLayout.Bands[0]);
- PlanComm.setGridActivation(this.ultraGridGrade.DisplayLayout.Bands[0]);
- }
- private void ultraGridMscPline_AfterRowActivate(object sender, EventArgs e)
- {
- string mscPline = ultraGridMscPline.ActiveRow.Cells["MSC_PLINE"].Value.ToString();
- DoQueryInfo(mscPline);
- }
- private void ultraGridMscPline_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- if (e.Cell.Column.Key.Equals("CHC"))
- {
- if (Convert.ToBoolean(e.Cell.Row.Cells["CHC"].Text))
- {
- cheMscPline = e.Cell.Row.Cells["MSC_PLINE"].Value.ToString();
- foreach (UltraGridRow uRow in ultraGridMscPline.Rows)
- {
- if (uRow != e.Cell.Row)
- {
- uRow.Cells["CHC"].Value = false;
- }
- }
- }
- else
- {
- e.Cell.Row.Cells["CHC"].Value = true;
- }
- }
- }
- /// <summary>
- /// 质量设计
- /// </summary>
- public string DesginKey
- {
- get { return desginKey; }
- set { desginKey = value; }
- }
- /// <summary>
- /// 制程
- /// </summary>
- public string CheMscPline
- {
- get { return cheMscPline; }
- set { cheMscPline = value; }
- }
- /// <summary>
- /// 制程grid
- /// </summary>
- public Infragistics.Win.UltraWinGrid.UltraGrid UltraGridMscPline
- {
- get { return ultraGridMscPline; }
- set { ultraGridMscPline = value; }
- }
- }
- }
|