| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Server;
- using Core.StlMes.Client.Judge.Commons;
- using Core.StlMes.Client.Judge.Forms;
- using CoreFS.CA06;
- using System;
- using System.Data;
- using System.Drawing;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.Judge.Controls
- {
- public partial class StlIncisionCtrl : UserControl
- {
- private Dal _d;
- private string _customInfo="";
- public StlIncisionCtrl(Control container, OpeBase ob,string customInfo)
- {
- InitializeComponent();
- container.Controls.Add(this);
- this.Dock = DockStyle.Fill;
- this.BringToFront();
- this.ultraGrid1.DisplayLayout.Bands[0].Columns["stoveNo"].MergedCellStyle = Infragistics.Win.UltraWinGrid.MergedCellStyle.Always;
- ClsBaseInfo.FillComBaseInfo(ultraComboEditor1, "407401", ob, false);
- //判定结果只显示内控合格和不合格。 40740101内控合格 40740102内控不合格
- DataTable dt = (DataTable)ultraComboEditor1.DataSource;
- for (int i = 0; i < dt.Rows.Count; i++)
- {
- if (dt.Rows[i]["BASECODE"].ToString() != "40740101"
- && dt.Rows[i]["BASECODE"].ToString() != "40740102")
- {
- dt.Rows[i].Delete();
- }
- }
- dt.AcceptChanges();
- ClsBaseInfo.SetComboItemHeight(ultraComboEditor1);
- _d = new Dal(ob);
- _customInfo=customInfo;
- }
- public void Query(string stoveNo, string judgeStoveNo, string state, string judgeTimeB,
- string judgeTimeE, string[] plines, string chemType, string gpSource, string[] plinesGp )
- {
- DataTable dt = _d.GetTableByXmlId("StlIncisionDAL.Query", stoveNo, judgeStoveNo, state,
- judgeTimeB, judgeTimeE, plines.Length, plines, chemType, gpSource, plinesGp.Length, plinesGp, _customInfo);
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "memo");
- }
- public void Query(string stoveNo)
- {
- ultraGrid1.BeginUpdate();
- DataTable dt = _d.GetTableByXmlId("StlIncisionDAL.Query", stoveNo, "", "", "", "", "0", "", "", "", "0", "", _customInfo);
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "memo");
- ultraGrid1.EndUpdate();
- }
- public void Clear()
- {
- //this.stlIncisionCtrlEntityBindingSource.Clear();
- }
- private void entityGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- e.Cell.Row.Update();
- }
- private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- PopupTextBox popupText = new PopupTextBox(ultraGrid1.ActiveCell.Value.ToString(), 2000);
- if (popupText.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- ultraGrid1.ActiveCell.Value = popupText.TextInfo.Trim();
- ultraGrid1.ActiveRow.Update();
- }
- }
- private void entityGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
- {
- e.Layout.Override.DataErrorRowAppearance.BackColor = Color.Transparent;
- }
- private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- e.Cell.Row.Update();
- }
- private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
- {
- Color yellow = Color.FromArgb(238, 238, 0);
- Color red = Color.FromArgb(255, 106, 106);
- Color green = Color.FromArgb(60, 179, 113);
- if (e.Row.GetValue("judgeresultChem") == "40740102")
- {
- e.Row.RowSelectorAppearance.BackColor = red;
- }
- }
- }
- }
|