| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282 |
- 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 System.Collections;
- using CoreFS.CA06;
- using Infragistics.Win;
- using Infragistics.Win.UltraWinGrid;
- using System.Diagnostics;
- using System.Text.RegularExpressions;
- namespace Core.LZMes.Client.QCM
- {
- public partial class QCM030614 :FrmBase
- {
- public QCM030614()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Judge":
- this.Judge();
- break;
- case "Q_Judge":
- this.Q_Judge();
- break;
- case "Cancel":
- this.canceljudge();
- break;
- case "Exit":
- this.Close();
- break;
- case "Export":
- this.DoExport();
- break;
- case "Pass":
- this.pass();
- break;
- case "C":
- this.C();
- break;
- case "P":
- this.P();
- break;
- case "Lock":
- this.locked();
- break;
- }
- }
- private void locked()
- {
- try
- {
- foreach (UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
- {
- string material_no = ugr.Cells["MATERIAL_NO"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0307.QcmRejudgeApplyServiceImpl";
- ccp.MethodName = "JudgeLocking";
- ccp.ServerParams = new object[] { material_no, username };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- }
- MessageBox.Show("异常材锁定成功!");
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void pass()
- {
- try
- {
- QCM030607 frm = new QCM030607();
- if (frm.ShowDialog() == DialogResult.OK)
- {
- string remark = frm._memo;
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
- {
- string material_no = ugr.Cells["MATERIAL_NO"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "ultimateJudgeAutoByHuman";
- ccp.ServerParams = new object[] { material_no, username, remark, "1" };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- MessageBox.Show("判定成功!");
- }
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void C()
- {
- try
- {
- QCM030607 frm = new QCM030607();
- if (frm.ShowDialog() == DialogResult.OK)
- {
- string remark = frm._memo;
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
- {
- string material_no = ugr.Cells["MATERIAL_NO"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "ultimateJudgeAutoByHuman";
- ccp.ServerParams = new object[] { material_no, username, remark, "3" };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- MessageBox.Show("判定成功!");
- }
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void P()
- {
- try
- {
- QCM030607 frm = new QCM030607();
- if (frm.ShowDialog() == DialogResult.OK)
- {
- string remark = frm._memo;
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
- {
- string material_no = ugr.Cells["MATERIAL_NO"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "ultimateJudgeAutoByHuman";
- ccp.ServerParams = new object[] { material_no, username, remark, "4" };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- MessageBox.Show("判定成功!");
- }
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void Judge()
- {
- try
- {
- if (this.ultraGrid1.Selected.Rows.Count == 0)
- this.ultraGrid1.ActiveRow.Selected = true;
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
- {
- string material_no = ugr.Cells["MATERIAL_NO"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "ultimateJudgeAuto";
- ccp.ServerParams = new object[] { material_no, username,"" };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- MessageBox.Show("判定成功!");
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void Q_Judge()
- {
- try
- {
- if (this.ultraGrid1.Selected.Rows.Count == 0)
- this.ultraGrid1.ActiveRow.Selected = true;
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in this.ultraGrid1.Selected.Rows)
- {
- string material_no = ugr.Cells["MATERIAL_NO"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "ultimateJudgeAutoQZ";
- ccp.ServerParams = new object[] { material_no, username };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- MessageBox.Show("强制判定成功!");
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void canceljudge()
- {
- try
- {
- QCM030607 frm = new QCM030607();
- if (frm.ShowDialog() == DialogResult.OK)
- {
- string remark = frm._memo;
- if (remark == "")
- {
- MessageBox.Show("请录入备注信息!");
- return;
- }
- if (this.ultraGrid18.Selected.Rows.Count == 0)
- this.ultraGrid18.ActiveRow.Selected = true;
- foreach (UltraGridRow ugr in this.ultraGrid18.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- string MATERIAL_NO = ugr.Cells["MATERIAL_NO"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- string utm_id = ugr.Cells["UTM_ID"].Value.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "cancelUltimateJudge";
- ccp.ServerParams = new object[] { username, MATERIAL_NO, utm_id,remark };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- }
- }
- MessageBox.Show("取消判定成功!");
- }
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void DoQuery()
- {
- if (this.ultraTabControl1.Tabs[0].Selected) //待判信息
- {
- DoQueryMe();
- }
- if (this.ultraTabControl1.Tabs[1].Selected) //判定记录
- {
- DoQueryRe();
- }
- }
- //查询待判信息
- private void DoQueryMe()
- {
- try
- {
- this.dataSet1.Clear();
- string ebatchno = "";
- string bbatchno = textBox4.Text.Trim();
- if (textBox2.Text.ToString() == "")
- {
- ebatchno = this.textBox4.Text.Trim();
- }
- else
- {
- ebatchno = textBox2.Text.Trim();
- }
- string design_key = textBox1.Text.Trim();
- string psc = textBox3.Text.Trim();
- string cert_inst_name = this.comboBox1.Text.ToString();
- string prodline = comboBox3.Text.ToString();
- string heat_no = this.textBox5.Text.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "GetUnjudgeInfoJ2N";
- ccp.ServerParams = new object[] { this.dateTimePicker1.Value.ToString("yyyyMMdd"), this.dateTimePicker2.Value.ToString("yyyyMMdd"), bbatchno, ebatchno, design_key, psc, prodline, cert_inst_name,heat_no };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- //查询判定记录
- private void DoQueryRe()
- {
- try
- {
- this.dataSet2.Clear();
- string ebatchno = "";
- string bbatchno = textBox4.Text.Trim();
- if (textBox2.Text.ToString() == "")
- {
- ebatchno = this.textBox4.Text.Trim();
- }
- else
- {
- ebatchno = textBox2.Text.Trim();
- }
- string design_key = textBox1.Text.Trim();
- string psc = textBox3.Text.Trim();
- string cert_inst_name = this.comboBox1.Text.ToString();
- string prodline = comboBox3.Text.ToString();
- string heat_no = this.textBox5.Text.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "GetjudgeInfoJLZ";
- ccp.ServerParams = new object[] { this.dateTimePicker1.Value.ToString("yyyyMMdd"), this.dateTimePicker2.Value.ToString("yyyyMMdd"), bbatchno, ebatchno, design_key, psc, prodline, cert_inst_name,heat_no };
- ccp.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- //for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- //{
- // foreach (UltraGridRow ugr2 in this.ultraGrid18.Rows)
- // {
- // if (ugr2.Cells["ISVALID"].Value.ToString() == "是 ")
- // {
- // ugr2.Cells["ISVALID"].Appearance.BackColor = Color.FromArgb(185, 235, 204);
- // ugr2.Cells["ISVALID"].Appearance.ForeColor = Color.Black;
- // }
- // else
- // {
- // ugr2.Cells["ISVALID"].Appearance.BackColor = Color.FromArgb(249, 198, 186);
- // ugr2.Cells["ISVALID"].Appearance.ForeColor = Color.Black;
- // }
- // }
- //}
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- this.dataSet18.Clear();
- UltraGridRow ugr1 = this.ultraGrid1.ActiveRow;
- ArrayList list = new ArrayList();
- //成分
- ArrayList al = new ArrayList();
- string cic_id = ugr1.Cells["R_CHEMID"].Value.ToString();
- if (ugr1.Cells["R_CHEMRESULT_DESC"].Value.ToString() != "")
- {
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0301.QcmJhyElementsServiceImpl";
- ccp1.MethodName = "GetChemeOrd";
- ccp1.ServerParams = new object[] { cic_id };
- //ccp1.ReturnObject = "";
- this.ExecuteQueryToDataTable(ccp1, CoreInvokeType.Internal);
- //ArrayList deskey = ccp1.ReturnObject as ArrayList;
- string design_key = ccp1.ReturnObject.ToString();
- string ord_no = design_key.Substring(0,design_key.Length-3);
- string ord_seq = design_key.Substring(design_key.Length - 3);
- list.Add(al);
- al.Add("UIB030220_CHEM.SELECT");
- al.Add(this.ultraGrid1.ActiveRow.Cells["SLAB_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["SLAB_NO"].Text);
- /*al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);*/
- al.Add(ord_no);
- al.Add(ord_seq);
- }
- else
- {
- list.Add(al);
- al.Add("UIB030220_CHEM.SELECT");
- al.Add(this.ultraGrid1.ActiveRow.Cells["SLAB_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["SLAB_NO"].Text);
- al.Add("");
- al.Add("");
- }
-
- //材质
- al = new ArrayList();
- list.Add(al);
- if (ugr1.Cells["PHYSRESULT_DESC"].Value.ToString() != "")
- {
- al.Add("UIB030110_036N.SELECT");
- al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text);
- }
- else
- {
- al.Add("UIB030110_036N.SELECT");
- al.Add("");
- }
- //其它
- /*al = new ArrayList();
- list.Add(al);
- al.Add("UIB030110_OTHERS.SELECT");
- al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text);//厚度
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_WTH"].Text);//宽度
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_INDIA"].Text);//内径
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ACT_WGT"].Text);//重量
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["EXTSHAPE_QUALITY"].Text);//外观
- al.Add(this.ultraGrid1.ActiveRow.Cells["CR_DK1"].Text);//缺陷
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["PACKAGE_LEVEL"].Text);//包装
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["PROC_DEC_RST"].Text);//切边
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);*/
- //this.dataSet1.Tables[1].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doContinuousQluery";
- ccp.ServerParams = new object[] { list };
- CoreClientParam ccpList = this.ExecuteQuery(ccp, CoreInvokeType.Internal);
- if (ccpList.ReturnInfo.Length == 0)
- {
- ArrayList aList = ccpList.ReturnObject as ArrayList;
- if (aList[0] != null)
- {
- this.dataSet18.Tables["ingr"].Clear();
- System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[0] as System.Collections.ArrayList, this.dataSet18.Tables["ingr"]);
- tab0.TableName = "ingr";
- this.dataSet18.Tables["ingr"].Merge(tab0);
- }
- if (aList[1] != null)
- {
- this.dataSet18.Tables["qlty"].Clear();
- System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[1] as System.Collections.ArrayList, this.dataSet18.Tables["qlty"]);
- tab0.TableName = "qlty";
- this.dataSet18.Tables["qlty"].Merge(tab0);
- }
- /*if (aList[2] != null)
- {
- this.dataSet18.Tables["other"].Clear();
- System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[2] as System.Collections.ArrayList, this.dataSet18.Tables["other"]);
- tab0.TableName = "other";
- this.dataSet18.Tables["other"].Merge(tab0);
- }*/
-
- }//end else if
- this.dataSet18.Tables["other"].Clear();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "getToleranceInfoLZOther";
- ccp.ServerParams = new object[] { ugr1.Cells["SIZEID"].Text, ugr1.Cells["COIL_THK"].Text,
- ugr1.Cells["COIL_WTH"].Text, ugr1.Cells["COIL_INDIA"].Text,ugr1.Cells["SURFACEID"].Text,ugr1.Cells["ORD_NO"].Text,
- ugr1.Cells["ORD_SEQ"].Text,ugr1.Cells["PACKAGE_LEVEL"].Text,ugr1.Cells["ACT_WGT"].Text,ugr1.Cells["PROC_DEC_RST"].Text,
- ugr1.Cells["CR_DK1"].Text,ugr1.Cells["EXTSHAPE_QUALITY"].Text };
- ccp.SourceDataTable = this.dataSet18.Tables["other"];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- //成分判断
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- double min = Convert.ToDouble(ugr.Cells["CHEM_MIN"].Text == "" ? "0" : ugr.Cells["CHEM_MIN"].Text);
- double max = Convert.ToDouble(ugr.Cells["CHEM_MAX"].Text == "" ? "9999" : ugr.Cells["CHEM_MAX"].Text);
- double value = Convert.ToDouble(ugr.Cells["CHEM_VAL"].Text == "" ? "-1" : ugr.Cells["CHEM_VAL"].Text);
- if (value < min || value > max)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == -1)//缺少实际值
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- //材质判断
- foreach (UltraGridRow ugr in this.ultraGrid4.Rows)
- {
- if ((IsNumberal(ugr.Cells["QLTY_MIN"].Text) == true) || (IsNumberal(ugr.Cells["QLTY_MAX"].Text) == true))
- {
- double min = Convert.ToDouble(ugr.Cells["QLTY_MIN"].Text == "" ? "0" : ugr.Cells["QLTY_MIN"].Text);
- double max = Convert.ToDouble(ugr.Cells["QLTY_MAX"].Text == "" ? "9999" : ugr.Cells["QLTY_MAX"].Text);
- double value = Convert.ToDouble(ugr.Cells["QLTY_VAL_WK"].Text == "" ? "-1" : ugr.Cells["QLTY_VAL_WK"].Text);
- if (value < min || value > max)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == -1)//缺少实际值
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- else
- {
- string min = ugr.Cells["QLTY_MIN"].Text.ToString();
- string value = ugr.Cells["QLTY_VAL_WK"].Text.ToString();
- if (!value.Equals(min))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == "")
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
-
-
-
- }
- //其它判断
- foreach (UltraGridRow ugr in this.ultraGrid5.Rows)
- {
- string name = ugr.Cells["T_NAME"].Text.Trim();
- if ("外观" == name)
- {
- //不相等显示红色
- string waiguan = ugr.Cells["T_MIN"].Text;
- if (waiguan != null && waiguan != "" && !waiguan.Equals("0") && String.Compare(waiguan, ugr.Cells["T_VALUE"].Text) > 0)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- continue;
- }
- else if ("内径" == name)
- {
- //不相等显示红色
- string india = ugr.Cells["T_MIN"].Text;
- if (india != null && india != "" && !india.Equals("0") && !india.Equals(ugr.Cells["T_VALUE"].Text))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- continue;
- }
- else if ("包装" == name)
- {
- if ("不包装".Equals(ugr.Cells["T_MIN"].Text) && "XX".Equals(ugr.Cells["T_VALUE"].Text))
- { }
- else
- {
- //不相等显示红色
- if (!ugr.Cells["T_MIN"].Text.Equals(ugr.Cells["T_VALUE"].Text))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- continue;
- }
- else if ("切边" == name)
- {
- if ("Y".Equals(ugr.Cells["T_MIN"].Text) && "2".Equals(ugr.Cells["T_VALUE"].Text))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
-
- }
- continue;
- }
- if ((IsNumberal(ugr.Cells["T_MIN"].Text) == true) || (IsNumberal(ugr.Cells["T_MAX"].Text) == true))
- {
- double min = Convert.ToDouble(ugr.Cells["T_MIN"].Text == "" ? "0" : ugr.Cells["T_MIN"].Text);
- double max = Convert.ToDouble(ugr.Cells["T_MAX"].Text == "" ? "9999" : ugr.Cells["T_MAX"].Text);
- double value = Convert.ToDouble(ugr.Cells["T_VALUE"].Text == "" ? "-1" : ugr.Cells["T_VALUE"].Text);
- if (value < min || value > max)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == -1)//缺少实际值
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- /*else
- {
- string min = ugr.Cells["T_MIN"].Text.ToString();
- string value = ugr.Cells["T_VALUE"].Text.ToString();
- if (!value.Equals(min))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == "")
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }*/
- }
-
-
- }
-
-
- private void DoQueryD()
- {
- }
- public static bool IsNumberal(string input)
- {
- bool flag = true;
- int count = 0;
- int count1 = 0;
- if (input.Length == 0)
- {
- flag = false;
- }
- else
- {
- char[] x = input.ToCharArray();
- for (int i = 0; i < input.Length; i++)
- {
- if (!char.IsNumber(x[i]) && x[i] != '.'&&x[i] != '-')
- {
- flag = false; break;
- }
- if (x[i] == '.')
- {
- count++;
- if (i == 0 || i == input.Length - 1) flag = false;
- }
- if (x[i] == '-')
- {
- count1++;
- if (i >1) flag = false;
- }
- }
- if (count > 1 || count1 > 1) flag = false;
- }
- return flag;
- }
- private static bool ishz(string text)
- {
- if (Regex.IsMatch(text, @"[\u4e00-\u9fa5]"))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- private void DoQueryP()
- {
- try
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- return;
- this.dataSet11.Clear();
- if (ugr.Cells["PHYSID"].Text.ToString() == "")
- {
- return;
- }
- string pic_id = ugr.Cells["PHYSID"].Value.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "querryJudgeResult";
- ccp.ServerParams = new object[] { pic_id };
- ccp.SourceDataTable = this.dataSet11.Tables[1];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0302.QcmJudgePhysicalServiceImpl";
- ccp.MethodName = "querryJudgetItem";
- ccp.ServerParams = new object[] { pic_id };
- ccp.SourceDataTable = this.dataSet11.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- foreach (UltraGridRow ugr1 in this.ultraGrid4.Rows)
- {
- foreach (UltraGridRow ugrs in ugr1.ChildBands[0].Rows)
- {
- if (ugrs.Cells["defect_flag"].Value.ToString() == "是")
- {
- ugrs.Cells["defect_flag"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["isjudge"].Value.ToString() == "是")
- {
- if (ugrs.Cells["judge_basis"].Value.ToString() == "逐值判定")
- {
- if (ugrs.Cells["val1"].Text.ToString() == "")
- {
- ugrs.Cells["val1"].Appearance.BackColor = Color.Yellow;
- }
- }
- else if (ugrs.Cells["judge_basis"].Value.ToString() == "平均值")
- {
- if (ugrs.Cells["avg_val"].Text.ToString() == "")
- {
- ugrs.Cells["avg_val"].Appearance.BackColor = Color.Yellow;
- }
- }
- }
- if (ugrs.Cells["isjudge"].Value.ToString() == "是")
- {
- if (ugrs.Cells["judge_basis"].Value.ToString() == "逐值判定")
- {
- DataTable dt = new DataTable();
- if (IsNumberal(ugrs.Cells["val1"].Value.ToString()))
- {
- if (ishz(ugrs.Cells["jf_stdmin"].Value.ToString()) || ishz(ugrs.Cells["jf_stdmax"].Value.ToString()))
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- else
- {
- if (ugrs.Cells["jf_stdmin"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val1"].Value.ToString() + ugrs.Cells["jf_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["jf_stdmax"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val1"].Value.ToString() + ugrs.Cells["jf_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- }
- }
- else
- {
- if (ugrs.Cells["jf_stdmin"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && "="+ ugrs.Cells["val1"].Value.ToString() != ugrs.Cells["jf_stdmin"].Value.ToString())
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["jf_stdmax"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && "="+ ugrs.Cells["val1"].Value.ToString() != ugrs.Cells["jf_stdmax"].Value.ToString())
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- }
- if (ugrs.Cells["jf_stdmin"].Value.ToString() != "" && ugrs.Cells["val2"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val2"].Value.ToString() + ugrs.Cells["jf_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val2"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["jf_stdmax"].Value.ToString() != "" && ugrs.Cells["val2"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val2"].Value.ToString() + ugrs.Cells["jf_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val2"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["jf_stdmin"].Value.ToString() != "" && ugrs.Cells["val3"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val3"].Value.ToString() + ugrs.Cells["jf_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val3"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["jf_stdmax"].Value.ToString() != "" && ugrs.Cells["val3"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val3"].Value.ToString() + ugrs.Cells["jf_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val3"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmin"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val1"].Value.ToString() + ugrs.Cells["nk_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmax"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val1"].Value.ToString() + ugrs.Cells["nk_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmin"].Value.ToString() != "" && ugrs.Cells["val2"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val2"].Value.ToString() + ugrs.Cells["nk_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val2"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmax"].Value.ToString() != "" && ugrs.Cells["val2"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val2"].Value.ToString() + ugrs.Cells["nk_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val2"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmin"].Value.ToString() != "" && ugrs.Cells["val3"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val3"].Value.ToString() + ugrs.Cells["nk_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val3"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmax"].Value.ToString() != "" && ugrs.Cells["val3"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val3"].Value.ToString() + ugrs.Cells["nk_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val3"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmin"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val1"].Value.ToString() + ugrs.Cells["kh_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmax"].Value.ToString() != "" && ugrs.Cells["val1"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val1"].Value.ToString() + ugrs.Cells["kh_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val1"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmin"].Value.ToString() != "" && ugrs.Cells["val2"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val2"].Value.ToString() + ugrs.Cells["kh_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val2"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmax"].Value.ToString() != "" && ugrs.Cells["val2"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val2"].Value.ToString() + ugrs.Cells["kh_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val2"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmin"].Value.ToString() != "" && ugrs.Cells["val3"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val3"].Value.ToString() + ugrs.Cells["kh_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["val3"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmax"].Value.ToString() != "" && ugrs.Cells["val3"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["val3"].Value.ToString() + ugrs.Cells["kh_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["val3"].Appearance.ForeColor = Color.Red;
- }
- }
- else if (ugrs.Cells["judge_basis"].Value.ToString() == "平均值")
- {
- DataTable dt = new DataTable();
- if (ugrs.Cells["jf_stdmin"].Value.ToString() != "" && ugrs.Cells["avg_val"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["avg_val"].Value.ToString() + ugrs.Cells["jf_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["avg_val"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["jf_stdmax"].Value.ToString() != "" && ugrs.Cells["avg_val"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["avg_val"].Value.ToString() + ugrs.Cells["jf_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["avg_val"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmin"].Value.ToString() != "" && ugrs.Cells["avg_val"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["avg_val"].Value.ToString() + ugrs.Cells["kh_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["avg_val"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["kh_stdmax"].Value.ToString() != "" && ugrs.Cells["avg_val"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["avg_val"].Value.ToString() + ugrs.Cells["kh_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["avg_val"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmin"].Value.ToString() != "" && ugrs.Cells["avg_val"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["avg_val"].Value.ToString() + ugrs.Cells["nk_stdmin"].Value.ToString(), ""))
- {
- ugrs.Cells["avg_val"].Appearance.ForeColor = Color.Red;
- }
- if (ugrs.Cells["nk_stdmax"].Value.ToString() != "" && ugrs.Cells["avg_val"].Value.ToString() != "" && !(bool)dt.Compute(ugrs.Cells["avg_val"].Value.ToString() + ugrs.Cells["nk_stdmax"].Value.ToString(), ""))
- {
- ugrs.Cells["avg_val"].Appearance.ForeColor = Color.Red;
- }
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
-
-
-
- private void QCM030614_Load(object sender, EventArgs e)
- {
- ValueList vsflv = new ValueList();
- CoreClientParam ccp = new CoreClientParam();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findCretInstName";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- vsflv.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["CERT_INST_CODE"].ToString(), ccp.SourceDataTable.Rows[i]["CERT_INST_NAME"].ToString());
- }
- this.comboBox1.DataSource = vsflv.ValueListItems;
- this.comboBox3.SelectedIndex = 0;
- this.ultraGrid1.DisplayLayout.Override.FilterUIType = FilterUIType.HeaderIcons;
- this.ultraGrid2.DisplayLayout.Override.FilterUIType = FilterUIType.HeaderIcons;
- this.ultraGrid4.DisplayLayout.Override.FilterUIType = FilterUIType.HeaderIcons;
- this.dateTimePicker1.Value = System.DateTime.Now.AddDays(-7);
- //this.DoQuery();
- }
-
-
-
-
-
-
- private void ultraGrid12_InitializeLayout(object sender, InitializeLayoutEventArgs e)
- {
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- SetFilterUIType(this.ultraGrid1, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid18, this.checkBox1.Checked);
-
- SetFilterUIType(this.ultraGrid4, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid5, this.checkBox1.Checked);
-
- SetFilterUIType(this.ultraGrid16, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid7, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid11, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid12, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid13, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid14, this.checkBox1.Checked);
- SetFilterUIType(this.ultraGrid15, this.checkBox1.Checked);
- }
- private void SetFilterUIType(UltraGrid grid, bool checkType)
- {
- if (checkType)
- {
- grid.DisplayLayout.Override.FilterUIType = FilterUIType.HeaderIcons;
- }
- else
- {
- grid.DisplayLayout.Bands[0].ColumnFilters.ClearAllFilters();
- grid.DisplayLayout.Override.FilterUIType = FilterUIType.Default;
- }
- }
- private void ultraTabControl1_Click(object sender, EventArgs e)
- {
- if (this.ultraTabControl1.Tabs[1].Selected) //判定记录
- {
- this.label6.Text = "判定时间";
- }
- if (this.ultraTabControl1.Tabs[0].Selected) //判定记录
- {
- this.label6.Text = "生产时间";
- }
- }
- private void DoExport()
- {
- try
- {
- if (this.ultraTabControl1.Tabs[0].Selected) //判定记录
- {
- if (this.ultraGrid1.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的数据", "提示");
- return;
- }
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(this.ultraGrid1, fName);
- Process.Start(fName);
- }
- }
- if (this.ultraTabControl1.Tabs[1].Selected) //判定记录
- {
- if (this.ultraGrid18.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的数据", "提示");
- return;
- }
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(this.ultraGrid18, fName);
- Process.Start(fName);
- }
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void checkBox2_CheckedChanged(object sender, EventArgs e)
- {
- if (this.ultraTabControl1.Tabs[0].Selected) //待判信息
- {
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows.Where(p => p.IsFilteredOut == false).ToList())
- {
- if (checkBox2.Checked)
- {
- ugr.Selected = true;
- }
- else
- {
- ugr.Selected = false;
- }
- }
- }
- if (this.ultraTabControl1.Tabs[1].Selected) //判定记录
- {
- foreach (UltraGridRow ugr in this.ultraGrid18.Rows.Where(p => p.IsFilteredOut == false).ToList())
- {
- if (checkBox2.Checked)
- {
- ugr.Cells["CHECK"].Value = "True";
- }
- else
- {
- ugr.Cells["CHECK"].Value = "False";
- }
- }
- }
- }
- private void ultraGrid18_AfterRowActivate(object sender, EventArgs e)
- {
- this.dataSet18.Clear();
- UltraGridRow ugr1 = this.ultraGrid18.ActiveRow;
- ArrayList list = new ArrayList();
- //成分
- ArrayList al = new ArrayList();
-
- list.Add(al);
- al.Add("UIB030220_CHEM.SELECT");
- al.Add(this.ultraGrid18.ActiveRow.Cells["SLAB_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["SLAB_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Substring(0,this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Length - 3));
- al.Add(this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Substring(this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Length - 3));
-
- //材质
- al = new ArrayList();
- list.Add(al);
- /*if (ugr1.Cells["PHYSRESULT_DESC"].Value.ToString() != "")
- {*/
- al.Add("UIB030110_036N.SELECT");
- al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text);
- /*}
- else
- {
- al.Add("UIB030110_036N.SELECT");
- al.Add("");
- al.Add("");
- }*/
- //其它
- /*al = new ArrayList();
- list.Add(al);
- al.Add("UIB030110_OTHERS.SELECT");
- al.Add(this.ultraGrid18.ActiveRow.Cells["COIL_THK"].Text);//厚度
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["COIL_WTH"].Text);//宽度
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["COIL_INDIA"].Text);//内径
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ACT_WGT"].Text);//重量
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["EXTSHAPE_QUALITY"].Text);//外观
- al.Add(this.ultraGrid18.ActiveRow.Cells["CR_DK1"].Text);//缺陷
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["PACKAGE_LEVEL"].Text);//包装
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["PROC_DEC_RST"].Text);//切边
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_NO"].Text);
- al.Add(this.ultraGrid18.ActiveRow.Cells["ORD_SEQ"].Text);*/
- //this.dataSet1.Tables[1].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doContinuousQluery";
- ccp.ServerParams = new object[] { list };
- CoreClientParam ccpList = this.ExecuteQuery(ccp, CoreInvokeType.Internal);
- if (ccpList.ReturnInfo.Length == 0)
- {
- ArrayList aList = ccpList.ReturnObject as ArrayList;
- if (aList[0] != null)
- {
- this.dataSet18.Tables["ingr"].Clear();
- System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[0] as System.Collections.ArrayList, this.dataSet18.Tables["ingr"]);
- tab0.TableName = "ingr";
- this.dataSet18.Tables["ingr"].Merge(tab0);
- }
- if (aList[1] != null)
- {
- this.dataSet18.Tables["qlty"].Clear();
- System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[1] as System.Collections.ArrayList, this.dataSet18.Tables["qlty"]);
- tab0.TableName = "qlty";
- this.dataSet18.Tables["qlty"].Merge(tab0);
- }
- /*if (aList[2] != null)
- {
- this.dataSet18.Tables["other"].Clear();
- System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[2] as System.Collections.ArrayList, this.dataSet18.Tables["other"]);
- tab0.TableName = "other";
- this.dataSet18.Tables["other"].Merge(tab0);
- }*/
- }//end else if
- this.dataSet18.Tables["other"].Clear();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "getToleranceInfoLZOther";
- ccp.ServerParams = new object[] { ugr1.Cells["SIC_ID"].Text, ugr1.Cells["COIL_THK"].Text,
- ugr1.Cells["COIL_WTH"].Text, ugr1.Cells["COIL_INDIA"].Text,ugr1.Cells["SFU_ID"].Text,
- this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Substring(0,this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Length - 3),
- this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Substring(this.ultraGrid18.ActiveRow.Cells["DESIGN_KEY"].Text.Length - 3),
- ugr1.Cells["PACKAGE_LEVEL"].Text,ugr1.Cells["ACT_WGT"].Text,ugr1.Cells["PROC_DEC_RST"].Text,
- ugr1.Cells["CR_DK1"].Text ,ugr1.Cells["EXTSHAPE_QUALITY"].Text};
- ccp.SourceDataTable = this.dataSet18.Tables["other"];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- //成分判断
- foreach (UltraGridRow ugr in this.ultraGrid6.Rows)
- {
- double min = Convert.ToDouble(ugr.Cells["CHEM_MIN"].Text == "" ? "0" : ugr.Cells["CHEM_MIN"].Text);
- double max = Convert.ToDouble(ugr.Cells["CHEM_MAX"].Text == "" ? "9999" : ugr.Cells["CHEM_MAX"].Text);
- double value = Convert.ToDouble(ugr.Cells["CHEM_VAL"].Text == "" ? "-1" : ugr.Cells["CHEM_VAL"].Text);
- if (value < min || value > max)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == -1)//缺少实际值
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- //材质判断
- foreach (UltraGridRow ugr in this.ultraGrid9.Rows)
- {
- if ((IsNumberal(ugr.Cells["QLTY_MIN"].Text) == true) || (IsNumberal(ugr.Cells["QLTY_MAX"].Text) == true))
- {
- double min = Convert.ToDouble(ugr.Cells["QLTY_MIN"].Text == "" ? "0" : ugr.Cells["QLTY_MIN"].Text);
- double max = Convert.ToDouble(ugr.Cells["QLTY_MAX"].Text == "" ? "9999" : ugr.Cells["QLTY_MAX"].Text);
- double value = Convert.ToDouble(ugr.Cells["QLTY_VAL_WK"].Text == "" ? "-1" : ugr.Cells["QLTY_VAL_WK"].Text);
- if (value < min || value > max)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == -1)//缺少实际值
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- else
- {
- string min = ugr.Cells["QLTY_MIN"].Text.ToString();
- string value = ugr.Cells["QLTY_VAL_WK"].Text.ToString();
- if (!value.Equals(min))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == "")
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- }
- //其它判断
- foreach (UltraGridRow ugr in this.ultraGrid8.Rows)
- {
- string name = ugr.Cells["T_NAME"].Text.Trim();
- if ("外观" == name)
- {
- //不相等显示红色
- string waiguan = ugr.Cells["T_MIN"].Text;
- if (waiguan != null && waiguan != "" && !waiguan.Equals("0") && String.Compare(waiguan, ugr.Cells["T_VALUE"].Text) > 0)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- continue;
- }
- else if ("内径" == name)
- {
- //不相等显示红色
- string india = ugr.Cells["T_MIN"].Text;
- if (india != null && india != "" && !india.Equals("0") && !india.Equals(ugr.Cells["T_VALUE"].Text))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- continue;
- }
- else if ("包装" == name)
- {
- if ("不包装".Equals(ugr.Cells["T_MIN"].Text) && "XX".Equals(ugr.Cells["T_VALUE"].Text))
- { }
- else
- {
- //不相等显示红色
- if (!ugr.Cells["T_MIN"].Text.Equals(ugr.Cells["T_VALUE"].Text))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- continue;
- }
- else if ("切边" == name)
- {
- if ("Y".Equals(ugr.Cells["T_MIN"].Text) && "2".Equals(ugr.Cells["T_VALUE"].Text))
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- continue;
- }
- if ((IsNumberal(ugr.Cells["T_MIN"].Text) == true) || (IsNumberal(ugr.Cells["T_MAX"].Text) == true))
- {
- double min = Convert.ToDouble(ugr.Cells["T_MIN"].Text == "" ? "0" : ugr.Cells["T_MIN"].Text);
- double max = Convert.ToDouble(ugr.Cells["T_MAX"].Text == "" ? "9999" : ugr.Cells["T_MAX"].Text);
- double value = Convert.ToDouble(ugr.Cells["T_VALUE"].Text == "" ? "-1" : ugr.Cells["T_VALUE"].Text);
- if (value < min || value > max)
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- if (value == -1)//缺少实际值
- {
- ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- }
- }
- }
- }
- }
- }
|