| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using Core.Mes.Client.Comm.Control;
- 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 QcmBcPhyJudgeCtrl : UserControl
- {
- private Dal _d;
- public QcmBcPhyJudgeCtrl(Control container, OpeBase ob)
- {
- InitializeComponent();
- container.Controls.Add(this);
- this.Dock = DockStyle.Fill;
- _d = new Dal(ob);
- }
- public void Query(string judgeStoveNo, string batchNo, string judgeResult, string timeBegin, string timeEnd,
- string[] plineCodes, string process)
- {
- DataTable dt = _d.GetTableByXmlId("JdgQcmZcCheckconsign.getPhyChemJudgeInfo", judgeStoveNo, batchNo, judgeResult,
- timeBegin, timeEnd, plineCodes.Length, plineCodes, process);
- GridHelper.CopyDataToDatatable(dt, dataTable1, true);
- GridHelper.RefreshAndAutoSizeExceptColumns(ultraGrid1, "chemMemo", "phyMemo");
- foreach (var row in ultraGrid1.Rows)
- {
- if (row.GetValue("chemMemo") != "")
- {
- row.Cells["chemMemo"].EditorComponent = ultraTextEditor1;
- }
- if (row.GetValue("phyMemo") != "")
- {
- row.Cells["phyMemo"].EditorComponent = ultraTextEditor1;
- }
- }
- }
- public void Clear()
- {
- dataTable1.Clear();
- }
- private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- PopupTextBox popup = new PopupTextBox(ultraGrid1.ActiveCell.Value.ToString(), 5000);
- popup.TxtInfo.ReadOnly = true;
- popup.UltraPanel1.Visible = false;
- popup.ShowDialog();
- }
- private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
- {
- Color red = Color.FromArgb(255, 106, 106);
- if (e.Row.GetValue("chemResultCode") == "40740102")
- {
- e.Row.Cells["chemResult"].Appearance.BackColor = red;
- }
- if (e.Row.GetValue("phyResultCode") == "40740202")
- {
- e.Row.Cells["phyResult"].Appearance.BackColor = red;
- }
- if (e.Row.GetValue("judgeResultCode") == "40740704")
- {
- e.Row.Cells["judgeResult"].Appearance.BackColor = red;
- }
- }
- }
- }
|