| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649 |
- using com.steering.mes.zgmil.entity;
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.ZGMil.Common;
- using Core.StlMes.Client.ZGMil.Entity;
- using Core.StlMes.Client.ZGMil.NodeResultQuery;
- using Core.StlMes.Client.ZGMil.Popup;
- using Core.StlMes.Client.ZGMil.ResultConrtrol;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace Core.StlMes.Client.ZGMil.Signature
- {
- public partial class FrmApplyDecision : FrmBase
- {
- private string[] plineCodes = { };
- public FrmApplyDecision()
- {
- InitializeComponent();
- }
- private void FrmApplyDecision_Load(object sender, EventArgs e)
- {
- DateTime now = DateTime.Now;
- DateTime dt1 = new DateTime(now.Year, now.Month, 1);//当月第一天
- DateTime dt2 = dt1.AddMonths(1).AddDays(-1);//当月最后一天
- this.StartTime2.Value = DateTime.Parse(dt1.ToString("yyyy-MM-dd") + " 00:00:00");
- this.EndTime2.Value = DateTime.Parse(dt2.ToString("yyyy-MM-dd") + " 23:59:59");
- EntityHelper.ShowGridCaption<MatZcMEntity>(ultraGrid6.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<MatZcMEntity>(ultraGrid7.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<QcmZgJugdeApplyEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- plineCodes = BaseMethod.GetPlineCode(ValidDataPurviewIds, ob);
- if (this.CustomInfo.Equals("WG"))
- {
- this.ultraGrid6.DisplayLayout.Bands[0].Columns["Bjz"].Hidden = true;
- this.ultraGrid6.DisplayLayout.Bands[0].Columns["Yjz"].Hidden = true;
- this.ultraGrid6.DisplayLayout.Bands[0].Columns["Xcjz"].Hidden = true;
- this.ultraGrid6.DisplayLayout.Bands[0].Columns["Ycjz"].Hidden = true;
- this.ultraGrid6.DisplayLayout.Bands[0].Columns["InspectionFlag"].Hidden = true;
- this.ultraGrid6.DisplayLayout.Bands[0].Columns["IsOk"].Hidden = true;
- }
- InitBindColumn();
-
- }
- private void WriteTextToGrid()
- {
- foreach(UltraGridRow row in ultraGrid6.Rows)
- {
- if (row.Cells["ChemResultCode"].Value.ToString() == "")
- {
- row.Cells["ChemResultCode"].Value = "合格";
- row.Cells["ChemResultCode"].ActiveAppearance.TextHAlign = Infragistics.Win.HAlign.Center;
- }
- else
- {
- if (row.Cells["ChemResultCode"].Value.ToString() == "40740101")
- {
- row.Cells["ChemResultCode"].Value = "内控合格";
- }
- else if (row.Cells["ChemResultCode"].Value.ToString() == "40740102")
- {
- row.Cells["ChemResultCode"].Value = "内控不合格";
- }
- else if (row.Cells["ChemResultCode"].Value.ToString() == "40740103")
- {
- row.Cells["ChemResultCode"].Value = "交付合格";
- }
- else if (row.Cells["ChemResultCode"].Value.ToString() == "40740104")
- {
- row.Cells["ChemResultCode"].Value = "交付不合格";
- }
- }
- }
- ultraGrid6.UpdateData();
- }
- private void WriteTextToGrid2()
- {
- foreach (UltraGridRow row in ultraGrid7.Rows)
- {
- if (row.Cells["PhyResultCode"].Value.ToString() == "")
- {
- row.Cells["PhyResultCode"].Value = "合格";
- row.Cells["PhyResultCode"].ActiveAppearance.TextHAlign = Infragistics.Win.HAlign.Center;
- }
- else
- {
- if (row.Cells["PhyResultCode"].Value.ToString() == "40740201")
- {
- row.Cells["PhyResultCode"].Value = "内控合格";
- }
- else if (row.Cells["PhyResultCode"].Value.ToString() == "40740202")
- {
- row.Cells["PhyResultCode"].Value = "国标合格";
- }
- else if (row.Cells["PhyResultCode"].Value.ToString() == "40740203")
- {
- row.Cells["PhyResultCode"].Value = "待判";
- }
- else if (row.Cells["PhyResultCode"].Value.ToString() == "40740204")
- {
- row.Cells["PhyResultCode"].Value = "次品";
- }
- else if (row.Cells["PhyResultCode"].Value.ToString() == "40740205")
- {
- row.Cells["PhyResultCode"].Value = "废品";
- }
- }
- }
- ultraGrid7.UpdateData();
- }
- private void InitBindColumn()
- {
- //材料状态
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150101", "材料产出待判");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150102", "材料产出(已判定)");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150103", "材料已编计划");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150104", "材料待处理");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150105", "材料加工");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150201", "材料产出等待(未综合判定)");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150202", "材料产出(已综合判定");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150203", "材料为余材(已综合判定)");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150204", "材料脱单余材(销售组织脱单)");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150205", "材料缴库余材(销售组织缴库)");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150301", "材料可编提单");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150302", "材料已编提单");
- this.ultraGrid7.DisplayLayout.ValueLists[0].ValueListItems.Add("80150303", "销售出厂");
- //材料类别
- this.ultraGrid7.DisplayLayout.ValueLists[1].ValueListItems.Add("801401", "在制品");
- this.ultraGrid7.DisplayLayout.ValueLists[1].ValueListItems.Add("801402", "成品");
- this.ultraGrid7.DisplayLayout.ValueLists[1].ValueListItems.Add("801403", "商品");
- //探伤结果
- this.ultraGrid7.DisplayLayout.ValueLists[2].ValueListItems.Add("40740401", "内控合格");
- this.ultraGrid7.DisplayLayout.ValueLists[2].ValueListItems.Add("40740402", "国标合格");
- this.ultraGrid7.DisplayLayout.ValueLists[2].ValueListItems.Add("40740403", "待判");
- this.ultraGrid7.DisplayLayout.ValueLists[2].ValueListItems.Add("40740404", "废品");
- //表检结果
- this.ultraGrid7.DisplayLayout.ValueLists[3].ValueListItems.Add("40740601", "合格");
- this.ultraGrid7.DisplayLayout.ValueLists[3].ValueListItems.Add("40740602", "不合格");
- this.ultraGrid7.DisplayLayout.ValueLists[3].ValueListItems.Add("40740603", "判废");
- this.ultraGrid7.DisplayLayout.ValueLists[3].ValueListItems.Add("40740604", "待判");
- //综合判定结果
- this.ultraGrid7.DisplayLayout.ValueLists[4].ValueListItems.Add("40740701", "合同内合格");
- this.ultraGrid7.DisplayLayout.ValueLists[4].ValueListItems.Add("40740702", "改判合格");
- this.ultraGrid7.DisplayLayout.ValueLists[4].ValueListItems.Add("40740703", "待判");
- this.ultraGrid7.DisplayLayout.ValueLists[4].ValueListItems.Add("40740704", "次品");
- this.ultraGrid7.DisplayLayout.ValueLists[4].ValueListItems.Add("40740705", "废品");
- //成分结果
- this.ultraGrid7.DisplayLayout.ValueLists[5].ValueListItems.Add("40740101", "内控合格");
- this.ultraGrid7.DisplayLayout.ValueLists[5].ValueListItems.Add("40740102", "内控不合格");
- this.ultraGrid7.DisplayLayout.ValueLists[5].ValueListItems.Add("40740103", "交付合格");
- this.ultraGrid7.DisplayLayout.ValueLists[5].ValueListItems.Add("40740104", "交付不合格");
- //性能结果
- this.ultraGrid7.DisplayLayout.ValueLists[6].ValueListItems.Add("40740201", "内控合格");
- this.ultraGrid7.DisplayLayout.ValueLists[6].ValueListItems.Add("40740202", "国标合格");
- this.ultraGrid7.DisplayLayout.ValueLists[6].ValueListItems.Add("40740203", "待判");
- this.ultraGrid7.DisplayLayout.ValueLists[6].ValueListItems.Add("40740204", "次品");
- this.ultraGrid7.DisplayLayout.ValueLists[6].ValueListItems.Add("40740205", "废品");
- //材料状态
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150101", "材料产出待判");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150102", "材料产出(已判定)");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150103", "材料已编计划");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150104", "材料待处理");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150105", "材料加工");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150201", "材料产出等待(未综合判定)");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150202", "材料产出(已综合判定");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150203", "材料为余材(已综合判定)");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150204", "材料脱单余材(销售组织脱单)");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150205", "材料缴库余材(销售组织缴库)");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150301", "材料可编提单");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150302", "材料已编提单");
- this.ultraGrid6.DisplayLayout.ValueLists[0].ValueListItems.Add("80150303", "销售出厂");
- //材料类别
- this.ultraGrid6.DisplayLayout.ValueLists[1].ValueListItems.Add("801401", "在制品");
- this.ultraGrid6.DisplayLayout.ValueLists[1].ValueListItems.Add("801402", "成品");
- this.ultraGrid6.DisplayLayout.ValueLists[1].ValueListItems.Add("801403", "商品");
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "DoQueryMat":
- if (ultraTabControl1.SelectedTab.Index == 0)
- {
- QueryMat();
- }
- else if (ultraTabControl1.SelectedTab.Index == 1)
- {
- QueryZgJugdeApply();
- }
- break;
- case "DoDecision":
- DoDecision();
- break;
- case "cancelDoDecision":
- cancelDoDecision();
- break;
- case "insertProssWt":
- insertProssWt();
- break;
- case "updateProssWt":
- updateProssWt();
- break;
- case"insertTestingResult":
- insertTestingResult();
- break;
- case "updateTarget":
- updateTarget();
- break;
- case "inspection":
- inspection();
- break;
- case "inspection2":
- inspection2();
- break;
- case "Print":
- printPipe();
- break;
- case "Print1":
- printPipe1();
- break;
- case "Print2":
- printPipe2();
- break;
- case "Print3":
- printPipe3();
- break;
- case "inspection3":
- inspection3();
- break;
- case "doSaveOrdLnDlyPk":
- doSaveOrdLnDlyPk();
- break;
- case "Close":
- this.Close();
- break;
- }
- }
- private void getDeliveryNo(string ordLnPk)
- {
- DataTable dd = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryDeliveryNo", new object[] { ordLnPk }, ob);//快速检索码
- if (dd != null && dd.Rows.Count > 0)
- {
- DeliveryNoText.DataSource = dd;
- DeliveryNoText.ValueMember = "BASECODE";
- DeliveryNoText.DisplayMember = "BASENAME";
- }
- }
- /// <summary>
- /// 报检
- /// </summary>
- private void inspection()
- {
- this.ultraGrid6.UpdateData();
- this.ultraGrid7.UpdateData();
- UltraGridRow uRow1 = this.ultraGrid6.ActiveRow;
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- string departMentid = UserInfo.GetDeptid();
- string flag = "0"; //报检
- if (uRow1 == null)
- {
- MessageUtil.ShowTips("请选择需要报检的炉信息!");
- return;
- }
- if (!(uRow1.Cells["Target"].Value.ToString().Equals("A")||(uRow1.Cells["Target"].Value.ToString().Equals("B")&& uRow1.Cells["StdName"].Text.ToUpper().Contains("JY")&& (!uRow1.Cells["PlineName"].Text.Contains("168")))))
- {
- MessageUtil.ShowTips("不是成品的不能报检!");
- return;
- }
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid7.Rows.AsQueryable().Where(" CHK = 'True'");
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- MatZcMEntity matZcEntity = (MatZcMEntity)uRow.ListObject;
- string matZcTity = JSONFormat.Format(matZcEntity);
- parm.Add(matZcTity);
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "inspection";
- ccp.ServerParams = new object[] { parm, "D", flag , this.UserInfo.GetUserName()};
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("报检成功!"))
- {
- QueryMat();
- MatZcMEntity2bindingSource.Clear();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 报检2(必检)
- /// </summary>
- private void inspection2()
- {
- this.ultraGrid6.UpdateData();
- this.ultraGrid7.UpdateData();
- UltraGridRow uRow1 = this.ultraGrid6.ActiveRow;
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- string departMentid = UserInfo.GetDeptid();
- string flag = "1"; //必检
- if (uRow1 == null)
- {
- MessageUtil.ShowTips("请选择需要报检的炉信息!");
- return;
- }
- if (!uRow1.Cells["Target"].Value.ToString().Equals("A"))
- {
- MessageUtil.ShowTips("不是成品的不能报检!");
- return;
- }
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid7.Rows.AsQueryable().Where(" CHK = 'True'");
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- MatZcMEntity matZcEntity = (MatZcMEntity)uRow.ListObject;
- string matZcTity = JSONFormat.Format(matZcEntity);
- parm.Add(matZcTity);
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "inspection";
- ccp.ServerParams = new object[] { parm, "D", flag, this.UserInfo.GetUserName() };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("报检成功!"))
- {
- QueryMat();
- MatZcMEntity2bindingSource.Clear();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 报检3(免检)
- /// </summary>
- public void inspection3()
- {
- this.ultraGrid6.UpdateData();
- this.ultraGrid6.UpdateData();
- UltraGridRow uRow1 = this.ultraGrid6.ActiveRow;
- string departMentid = UserInfo.GetDeptid();
- string flag = "3"; //免检
- if (uRow1 == null)
- {
- MessageUtil.ShowTips("请选择需要报检的炉信息!");
- return;
- }
- if (!uRow1.Cells["Target"].Value.ToString().Equals("A"))
- {
- MessageUtil.ShowTips("不是成品的不能报检!");
- return;
- }
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid7.Rows.AsQueryable().Where(" CHK = 'True'");
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- MatZcMEntity matZcEntity = (MatZcMEntity)uRow.ListObject;
- string matZcTity = JSONFormat.Format(matZcEntity);
- parm.Add(matZcTity);
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "inspection";
- ccp.ServerParams = new object[] { parm, "D", flag, this.UserInfo.GetUserName() };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("报检成功!"))
- {
- QueryMat();
- MatZcMEntity2bindingSource.Clear();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 修改产品标识
- /// </summary>
- private void updateTarget()
- {
- this.ultraGrid6.UpdateData();
- UltraGridRow uRow = this.ultraGrid6.ActiveRow;
- if (uRow == null)
- {
- return;
- }
- ArrayList parm = new ArrayList();
- MatZcMEntity matZctity = (MatZcMEntity)uRow.ListObject;
- string matZcTity = JSONFormat.Format(matZctity);
- parm.Add(matZcTity);
- if (MessageUtil.ShowYesNoAndQuestion("是否确认修改?") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "updateTarget";
- ccp.ServerParams = new object[] { parm };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- QueryMat();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 获取探伤实绩
- /// </summary>
- private void insertTestingResult()
- {
- string testingType = "";
- string testingGrade = "";
- UltraGridRow uRow = this.ultraGrid6.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择炉信息!");
- return;
- }
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- string departMentid = UserInfo.GetDeptid();
- NativeMethodNew na = new NativeMethodNew(this.ob);
- string plinCode = na.GetPCode(this.UserInfo.GetDepartment());
-
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryTestingResult", new object[] { uRow.Cells["JudgeStoveNo"].Text + "-01",plinCode }, ob);
- if(ds.Rows.Count>0)
- {
- if (plinCode.Equals("C008") || plinCode.Equals("C009") || plinCode.Equals("C017"))
- {
- if (ds.Rows[0]["LO_SURFACE"].ToString() == "")
- {
- MessageUtil.ShowTips("探伤实绩的参数信息为录入,不允许进行申请判定!");
- return;
- }
- else
- {
- testingGrade = ds.Rows[0]["LO_SURFACE"].ToString();
- if (testingGrade.Equals("/"))
- {
- testingType = "";
- }
- else
- {
- testingType = "EMI";
- }
- }
- }
- else if (plinCode.Equals("C010"))
- {
- if (ds.Rows[0]["ACCEPTANCE_GRADE"].ToString() == "")
- {
- MessageUtil.ShowTips("探伤实绩的参数信息未录入,不允许进行申请判定!");
- return;
- }
- else
- {
- testingGrade = ds.Rows[0]["ACCEPTANCE_GRADE"].ToString();
- if (testingGrade.Equals("/"))
- {
- testingType = "";
- }
- else
- {
- testingType = "ET";
- }
- }
- }
- }else
- {
- MessageUtil.ShowTips("探伤工序点未录入实绩,不允许进行申请判定!");
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "updateTestingResult";
- ccp.ServerParams = new object[] { uRow.Cells["JudgeStoveNo"].Text, testingGrade, testingType };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("获取成功!"))
- {
- QueryMat();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 判定单打印
- /// </summary>
- private void printPipe3()
- {
- this.ultraGrid7.UpdateData();
- this.ultraGrid1.UpdateData();
- string jugeNo = "";
- string applyNo = "";
- UltraGrid ultraGrid = null;
- if (ultraTabControl1.SelectedTab.Index == 0)
- {
- ultraGrid = ultraGrid7;
- foreach (UltraGridRow ugr in ultraGrid.Rows)
- {
- string applyNo1 = ugr.Cells["JugdeApplyCode"].Text.Trim();
- if (applyNo == "")
- {
- applyNo = applyNo1;
- }
- else
- {
- if (!applyNo.Contains(applyNo1))
- { applyNo = applyNo + "','" + applyNo1; }
- }
- }
- }
- else if (ultraTabControl1.SelectedTab.Index == 1)
- {
- ultraGrid = ultraGrid1;
- applyNo = ultraGrid.ActiveRow.Cells["JugdeApplyCode"].Text.Trim();
- }
- UltraGridRow uRow = ultraGrid.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要打印的判定信息!");
- return;
- }
- string userGroup = this.UserInfo.GetUserGroup();
- string userOrder = this.UserInfo.GetUserOrder();
- string userName = this.UserInfo.GetUserName();
-
-
- //string applyNo = uRow.Cells["JugdeApplyCode"].Text.Trim();
- if (applyNo == "")
- {
- MessageUtil.ShowTips("未申请判定,不允许判定单的打印!");
- }
- string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilApplyCard.cpt&format=pdf&APPLY_CODE=" + applyNo + "&GROUP=" + userGroup + "&SHIFT=" + userOrder + "&USER_ID="+ userName;
- FrmExcel fre = new FrmExcel(this.ob, strurl);
- fre.AutoSize = true;
- fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fre.WindowState = FormWindowState.Maximized;
- fre.Show();
- }
- /// <summary>
- /// 整炉打印
- /// </summary>
- private void printPipe2()
- {
- this.ultraGrid6.UpdateData();
- this.ultraGrid1.UpdateData();
- string jugeNo = "";
- string plineCode = "";
- UltraGrid ultraGrid = null;
- if (ultraTabControl1.SelectedTab.Index == 0)
- {
- ultraGrid = ultraGrid6;
- }
- else if (ultraTabControl1.SelectedTab.Index == 1)
- {
- ultraGrid = ultraGrid1;
- }
- UltraGridRow uRow = ultraGrid.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要打印的炉信息!");
- return;
- }
- jugeNo = uRow.Cells["JudgeStoveNo"].Value.ToString();
- plineCode = uRow.Cells["PlineCode"].Value.ToString();
- string userGroup = this.UserInfo.GetUserGroup();
- string userOrder = this.UserInfo.GetUserOrder();
- string strurl = "";
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- string departMentid = UserInfo.GetDeptid();
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryApplyCodeNull", new object[] { BaseMethod.getJudgeStoveNo(jugeNo), departMentid, plineCode }, this.ob);
- //if (int.Parse(ds.Rows[0][0].ToString()) > 0)
- //{
- // MessageUtil.ShowTips("有未申请判定的数据,不允许进行缴库单打印!");
- // return;
- //}
- if (plineCode.Equals("C072"))
- {
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilGodownEntryTH.cpt&JUDGE_STOVE_NO=" + jugeNo + "&GROUP=" + userGroup + "&SHIFT=" + userOrder;
- }
- else
- {
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilGodownEntryYMTest1.cpt&format=pdf&JUDGE_STOVE_NO=" + jugeNo + "&GROUP=" + userGroup + "&SHIFT=" + userOrder;
- }
-
- FrmExcel fre = new FrmExcel(this.ob, strurl);
- fre.AutoSize = true;
- fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fre.WindowState = FormWindowState.Maximized;
- fre.Show();
- }
- /// <summary>
- /// 打印缴库单
- /// </summary>
- private void printPipe()
- {
- this.ultraGrid7.UpdateData();
- this.ultraGrid1.UpdateData();
- string jugeNo = "";
- string jugeNo2 = "";
- string plineCode = "";
- UltraGrid ultraGrid = null;
- if (ultraTabControl1.SelectedTab.Index == 0)
- {
- ultraGrid = ultraGrid7;
- }
- else if (ultraTabControl1.SelectedTab.Index == 1)
- {
- ultraGrid = ultraGrid1;
- }
- UltraGridRow uRow = ultraGrid.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要打印的炉信息!");
- return;
- }
- jugeNo = uRow.Cells["JudgeStoveNo"].Value.ToString()+"-01";
- jugeNo2 = uRow.Cells["JudgeStoveNo"].Value.ToString();
- plineCode = uRow.Cells["PlineCode"].Value.ToString();
- string strurl = "";
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- string departMentid = UserInfo.GetDeptid();
- string userGroup = this.UserInfo.GetUserGroup();
- string userOrder = this.UserInfo.GetUserOrder();
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryApplyCodeNull", new object[] { jugeNo.Substring(0,6), departMentid, plineCode }, this.ob);
- //if (int.Parse(ds.Rows[0][0].ToString()) > 0)
- //{
- // MessageUtil.ShowTips("有未申请判定的数据,不允许进行缴库单打印!");
- // return;
- //}
- //string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilGodownEntryYM.cpt&format=pdf&JUDGE_STOVE_NO=" + jugeNo;
-
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilGodownEntryYMTest.cpt&format=pdf&JUDGE_STOVE_NO=" + jugeNo + "&GROUP=" + userGroup + "&SHIFT=" + userOrder;
-
- FrmExcel fre = new FrmExcel(this.ob, strurl);
- fre.AutoSize = true;
- fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fre.WindowState = FormWindowState.Maximized;
- fre.Show();
- }
- /// <summary>
- /// 打印缴库单
- /// </summary>
- private void printPipe1()
- {
- this.ultraGrid7.UpdateData();
- string jugeNo = "";
- string plineCode = "";
- UltraGrid ultraGrid = null;
- if (ultraTabControl1.SelectedTab.Index == 0)
- {
- ultraGrid = ultraGrid7;
- }
- else if (ultraTabControl1.SelectedTab.Index == 1)
- {
- ultraGrid = ultraGrid1;
- }
- UltraGridRow uRow = ultraGrid.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要打印的炉信息!");
- return;
- }
- jugeNo = uRow.Cells["JudgeStoveNo"].Value.ToString();
- plineCode = uRow.Cells["PlineCode"].Value.ToString();
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- string departMentid = UserInfo.GetDeptid();
- string userGroup = this.UserInfo.GetUserGroup();
- string userOrder = this.UserInfo.GetUserOrder();
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryApplyCodeNull", new object[] { jugeNo, departMentid, plineCode }, this.ob);
- //if (int.Parse(ds.Rows[0][0].ToString()) > 0)
- //{
- // MessageUtil.ShowTips("有未申请判定的数据,不允许进行缴库单打印!");
- // return;
- //}
- string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilGodownEntryYMTestAgain.cpt&format=pdf&JUDGE_STOVE_NO=" + jugeNo + "&GROUP=" + userGroup + "&SHIFT=" + userOrder;
- FrmExcel fre = new FrmExcel(this.ob, strurl);
- fre.AutoSize = true;
- fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fre.WindowState = FormWindowState.Maximized;
- fre.Show();
- }
- /// <summary>
- /// 回填过磅重量
- /// </summary>
- private void insertProssWt()
- {
- this.ultraGrid6.UpdateData();
- UltraGridRow uRow = this.ultraGrid6.ActiveRow;
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- string departMentid = UserInfo.GetDeptid();
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要回报过磅重量的炉信息!");
- return;
- }
-
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryMilPlanPrt", new object[] { uRow.Cells["JudgeStoveNo"].Text + "-01" }, ob);
- if(!uRow.Cells["PlineCode"].Text.ToString().Equals("C072"))
- {
- if (ds.Rows[0][0].ToString() == "0" || ds.Rows[0][0].ToString() == "")
- {
- MessageUtil.ShowTips("此炉不允许回报过磅重量!");
- return;
- }
- }
-
- if (Double.Parse(uRow.Cells["PonderGrossWt"].Value.ToString3()) <= 0)
- {
- MessageUtil.ShowTips("请输入正确的过磅重量!");
- return;
- }
- ArrayList list = new ArrayList();
- list.Add(uRow.Cells["JudgeStoveNo"].Value.ToString());
- list.Add(uRow.Cells["PonderGrossWt"].Value.ToString3());
- list.Add(uRow.Cells["LotNo"].Value.ToString());
- list.Add(uRow.Cells["BelongCode"].Value.ToString());
- list.Add(this.UserInfo.GetUserName());
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "insertProssWt";
- ccp.ServerParams = new object[] { list, departMentid };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("回报成功!"))
- {
- QueryMat();
- MatZcMEntity2bindingSource.Clear();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 撤销申请判定
- /// </summary>
- private void cancelDoDecision()
- {
- this.ultraGrid7.UpdateData();
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid7.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请选择需要撤销申请判定的主信息!");
- return;
- }
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- MatZcMEntity matZcTity = (MatZcMEntity)uRow.ListObject;
- string matTity = JSONFormat.Format(matZcTity);
- parm.Add(matTity);
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认撤销?") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "cancelDoDecision";
- ccp.ServerParams = new object[] { parm,this.UserInfo.GetUserName() };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("撤销成功!"))
- {
- QueryMat();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 申请判定
- /// </summary>
- private void DoDecision()
- {
- this.ultraGrid7.UpdateData();
- int m = 0;
- int n = 0;
- int z = 0;
- string target = "";//去向
- //string departMentid = UserInfo.GetDeptid();
- //NativeMethodNew na = new NativeMethodNew(this.ob);
- //string plinCode = na.GetPCode(this.UserInfo.GetDepartment());
- UltraGridRow row = this.ultraGrid6.ActiveRow;
- int JugdeApplyNum1 = int.Parse(row.Cells["ActCount"].Value.ToString());
- int JugdeApplyNum2 = 0;
- double ActWeightTep = 0.0;
- double ActWeightTep1 = 0.0;
- double ActWeightTep2 = 0.0;
- double ActWeightTep3 = 0.0;
- double ActLenTep = 0.0;
- double ActLenTep1 = 0.0;
- double ActLenTep2 = 0.0;
- double ActLenTep3 = 0.0;
- if (row == null) return;
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid7.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请选择需要申请判定的主信息!");
- return;
- }
- if (this.CustomInfo.Equals("ZG"))
- {
- //成品没检验合格的不能送判
- if (row.Cells["Target"].Text == "A" && row.Cells["PlineCode"].Text != "C072")
- {
- //DataTable bj = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryBjCount", new object[] { row.Cells["JudgeStoveNo"].Text.Trim(), row.Cells["PlineCode"].Text }, ob);
- //if (bj.Rows.Count > 0)
- //{
- // if (int.Parse(bj.Rows[0][0].ToString3()) < int.Parse(row.Cells["ActCount"].Text.ToString3()))
- // {
- // MessageUtil.ShowTips("存在未检验合格的支数,不允许申请判定!");
- // return;
- // }
- //}
- if (row.Cells["IsOk"].Text.ToString().Equals("不可送判"))
- {
- MessageUtil.ShowTips("存在未检验合格的支数,不允许申请判定!");
- return;
- }
- }
- if (row.Cells["Target"].Text == "B" && row.Cells["PlineCode"].Text != "C072")
- {
- //DataTable bj = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryBjCount", new object[] { row.Cells["JudgeStoveNo"].Text.Trim(), row.Cells["PlineCode"].Text }, ob);
- //if (bj.Rows.Count > 0)
- //{
- // if (int.Parse(bj.Rows[0][0].ToString3()) < int.Parse(row.Cells["ActCount"].Text.ToString3()))
- // {
- // MessageUtil.ShowTips("存在未检验合格的支数,不允许申请判定!");
- // return;
- // }
- //}
- if (row.Cells["IsOk"].Text.ToString().Equals("不可送判"))
- {
- MessageUtil.ShowTips("存在未检验合格的支数,不允许申请判定!");
- return;
- }
- }
- if (row.Cells["Target"].Text == "C" && row.Cells["PlineCode"].Text != "C072")
- {
- //DataTable dc = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryOfflineCount", new object[] { row.Cells["JudgeStoveNo"].Text.Trim() }, ob);
- //if (dc.Rows.Count > 0)
- //{
- // MessageUtil.ShowTips("该炉有存在待处理品,不允许申请判定!");
- // return;
- //}
- DataTable dd = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryZgContratNo", new object[] { row.Cells["JudgeStoveNo"].Text.Trim() }, ob);
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryZgJugdeCount", new object[] { row.Cells["JudgeStoveNo"].Text.Trim(), dd.Rows[0][0].ToString() }, ob);
- if (ds.Rows.Count > 0)
- {
- if (!ds.Rows[0][0].Equals("0") )
- {
- MessageUtil.ShowTips("炉为C字头,该合同已申请判定过,不允许申请判定!");
- // return;
- }
- }
- MilPlan milPlan3 = new MilPlan();
- milPlan3.JudgeStoveNo = row.Cells["JudgeStoveNo"].Text.Trim();
- milPlan3.LotNo = row.Cells["LotNo"].Text.Trim();
- milPlan3.PlineCode = row.Cells["PlineCode"].Text.Trim();
- milPlan3.ProPlanId = row.Cells["ProOrderId"].Text.Trim();
- milPlan3.GxPlanNo = row.Cells["GxPlanNo"].Text.Trim();
- int num = ServerHelper.SetData("com.steering.mes.signature.FrmInOnlineStore.updateProcess", new object[] { milPlan3 }, this.ob);
- DataTable dtc = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryMilProcess", new object[] { row.Cells["JudgeStoveNo"].Text.Trim(), row.Cells["ProOrderId"].Text.Trim(), row.Cells["GxPlanNo"].Text.Trim() }, ob);
- if (dtc.Rows.Count > 0)
- {
- if (!dtc.Rows[0][0].Equals("0"))
- {
- MessageUtil.ShowTips("炉为C字头,有待处理的数据,不允许申请判定!");
- // return;
- }
- }
- }
- DataTable ddPrtFlag = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryZgPrtFlag", new object[] { row.Cells["JudgeStoveNo"].Text.Trim() }, ob);
- DataTable ddPonderGrossWT = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryZgPonderGrossWT", new object[] { row.Cells["JudgeStoveNo"].Text.Trim() }, ob);
- if (ddPrtFlag.Rows.Count > 0)
- {
- if (ddPrtFlag.Rows[0][0].Equals("1") && ddPonderGrossWT.Rows[0][0].Equals("0"))
- {
- MessageUtil.ShowTips("该炉需要过磅,没过磅不允许申请判定!");
- return;
- }
- }
- }
- ArrayList parm = new ArrayList();
- switch (this.CustomInfo)
- {
- case "ZG":
- if (!doQueryNode(this.ultraGrid6.ActiveRow.Cells["JudgeStoveNo"].Value.ToString(), this.ultraGrid6.ActiveRow.Cells["PlineCode"].Value.ToString()))
- {
- MessageUtil.ShowTips("该炉在交库点未结炉,不允许申请判定!");
- return;
- }
- //DataTable dd = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryMilPlan", new object[] { this.ultraGrid6.ActiveRow.Cells["JudgeStoveNo"].Text + "-01", "", "" }, ob);
- //target = dd.Rows[0]["TARGET"].ToString();
-
- foreach (UltraGridRow uRow in checkMagRows)
- {
- if (uRow.Cells["QcmStaus"].Text.Trim() == "判废" || uRow.Cells["QcmStaus"].Text.Trim() == "待处理")
- {
- m = m + 1;
- }
- if (uRow.Cells["JugdeApplyCode"].Text.Trim() != "")
- {
- n = n + 1;
- }
- //DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryResult", new object[] { uRow.Cells["JudgeStoveNo"].Text, uRow.Cells["BatchNo"].Text, uRow.Cells["BatchGroudNo"].Text, target }, ob);
- //if (int.Parse(ds.Rows[0][0].ToString()) > 0)
- //{
- // z = z + 1;
- //}
- if (int.Parse(uRow.Cells["PonderGrossCount"].Text.ToString3())>0)
- {
- if (uRow.Cells["ActCount"].Text.Trim() != uRow.Cells["PonderGrossCount"].Text.Trim())
- {
- MessageUtil.ShowTips("还有未过磅的管子,不允许申请判定!");
- return;
- }
- }
- MatZcMEntity matZcEntity = (MatZcMEntity)uRow.ListObject;
- matZcEntity.Target = this.ultraGrid6.ActiveRow.Cells["Target"].Value.ToString();
- if (row.Cells["MchDimensionsResult"].Text.Trim() == "")
- {
- matZcEntity.MchDimensionsResult = "合格";
- }
- else {
- matZcEntity.MchDimensionsResult = row.Cells["MchDimensionsResult"].Text.Trim();
- }
- if (row.Cells["MchVisualResult"].Text.Trim() == "")
- {
- matZcEntity.MchVisualResult = "合格";
- }
- else
- {
- matZcEntity.MchVisualResult = row.Cells["MchVisualResult"].Text.Trim();
- }
- string matZcTity = JSONFormat.Format(matZcEntity);
- parm.Add(matZcTity);
- JugdeApplyNum2 += int.Parse(uRow.Cells["ActCount"].Value.ToString());
- string LengthType = uRow.Cells["LengthType"].Value.ToString();//长度类型(0-正尺,1-长尺,2-短尺)
- string InMold = uRow.Cells["InMold"].Value.ToString();//入库区分(801701-非计划入,801703-按计划入)
- double ActLen1 = double.Parse(uRow.Cells["ActLen1"].Value.ToString3());//累计送判米
- double ActWeight1 = double.Parse(uRow.Cells["ActWeight1"].Value.ToString3());//累计送判吨
- double ActWeightL = double.Parse(uRow.Cells["ActWeightL"].Value.ToString3());//累计送判吨(长尺)
- double ActWeightS = double.Parse(uRow.Cells["ActWeightS"].Value.ToString3());//累计送判吨(短尺)
- double ActLen2 = double.Parse(uRow.Cells["ActLen2"].Value.ToString3());//累计送判米(按计划入)
- double ActWeight2 = double.Parse(uRow.Cells["ActWeight2"].Value.ToString3());//累计送判吨(按计划入)
- double PaydownWtMax = double.Parse(uRow.Cells["PaydownWtMax"].Value.ToString3());//缴库量上限
- double Orderweight = double.Parse(uRow.Cells["Orderweight"].Value.ToString3());//估算量
- double OrderWtMaxShort = double.Parse(uRow.Cells["OrderWtMaxShort"].Value.ToString3());//短尺缴库量上限
- double OrderWtMaxLong = double.Parse(uRow.Cells["OrderWtMaxLong"].Value.ToString3());//长尺缴库量上限
- double Kspz = double.Parse(uRow.Cells["Kspz"].Value.ToString3());//预计可送判支
- double Cfz = double.Parse(row.Cells["Cfz"].Value.ToString3());//拆分支
- if (row.Cells["Target"].Text == "A" && row.Cells["PlineCode"].Text != "C072")
- {
- //正尺
- if (LengthType.Equals("正尺") && InMold.Equals("801703"))
- {
- if (row.Cells["OrderUnit"].Value.ToString().Equals("吨"))
- {
- ActWeightTep += double.Parse(uRow.Cells["ActWeight"].Value.ToString());
- if (PaydownWtMax < ActWeight2 + ActWeightTep && checkMagRows.Count() > 1 )
- {
- MessageBox.Show("选中的正尺总量超出缴库量上限,请分开送判");
- return;
- }
- }
- else
- {
- ActLenTep += double.Parse(uRow.Cells["ActLen"].Value.ToString());
- if (PaydownWtMax < ActLen2 + ActLenTep && checkMagRows.Count() > 1)
- {
- MessageBox.Show("选中的正尺总量超出缴库量上限,请分开送判");
- return;
- }
- }
-
- }
- //长尺
- if (LengthType.Equals("长尺") && InMold.Equals("801703"))
- {
- if (row.Cells["OrderUnit"].Value.ToString().Equals("吨"))
- {
- ActWeightTep1 += double.Parse(uRow.Cells["ActWeight"].Value.ToString());
- if (OrderWtMaxLong < ActWeightL + ActWeightTep1 && checkMagRows.Count() > 1)
- {
- MessageBox.Show("选中的长尺总量超出长尺缴库量上限,请分开送判");
- return;
- }
- }
- else
- {
- ActLenTep1 += double.Parse(uRow.Cells["ActLen"].Value.ToString());
- if (OrderWtMaxLong < ActWeightL + ActLenTep1 && checkMagRows.Count() > 1)
- {
- MessageBox.Show("选中的长尺总量超出长尺缴库量上限,请分开送判");
- return;
- }
- }
-
- }
- //短尺
- if (LengthType.Equals("短尺") && InMold.Equals("801703"))
- {
- if (row.Cells["OrderUnit"].Value.ToString().Equals("吨"))
- {
- ActWeightTep2 += double.Parse(uRow.Cells["ActWeight"].Value.ToString());
- if (OrderWtMaxShort < ActWeightS + ActWeightTep2 && checkMagRows.Count() > 1)
- {
- MessageBox.Show("选中的短尺总量超出短尺缴库量上限,请分开送判");
- return;
- }
- }
- else
- {
- ActLenTep2 += double.Parse(uRow.Cells["ActLen"].Value.ToString());
- if (OrderWtMaxShort < ActWeightS + ActLenTep2 && checkMagRows.Count() > 1)
- {
- MessageBox.Show("选中的短尺总量超出短尺缴库量上限,请分开送判");
- return;
- }
- }
-
- }
- //按计划入
- if (InMold.Equals("801703"))
- {
- if (row.Cells["OrderUnit"].Value.ToString().Equals("吨"))
- {
- ActWeightTep3 += double.Parse(uRow.Cells["ActWeight"].Value.ToString());
- if (PaydownWtMax < ActWeight2 + ActWeightTep3 && checkMagRows.Count() > 1)
- {
- MessageBox.Show("选中的总量超出缴库量上限,请分开送判");
- return;
- }
- }
- else
- {
- ActLenTep3 += double.Parse(uRow.Cells["ActLen"].Value.ToString());
- if (PaydownWtMax < ActWeight2 + ActLenTep3 && checkMagRows.Count() > 1)
- {
- MessageBox.Show("选中的总量超出缴库量上限,请分开送判");
- return;
- }
- }
-
- }
- //非计划入
- if (InMold.Equals("801701"))
- {
- if (Cfz > int.Parse(row.Cells["ActCount"].Value.ToString()))
- {
- MessageBox.Show("输入的拆分支数不能大于实际送判支数");
- return;
- }
- }
- }
-
- }
- if (z > 0)
- {
- //if (MessageUtil.ShowYesNoAndQuestion("炉批组下探伤种类没有的信息,是否继续进行申请判定?") == DialogResult.No) return;
- MessageUtil.ShowTips("炉批组下探伤种类没有的信息,不能进行申请判定!");
- return;
- }
- if (m > 0)
- {
- MessageUtil.ShowTips("废品/待处理的炉批组信息,不允许申请判定!");
- return;
- }
-
- break;
- case "WG":
- foreach (UltraGridRow uRow in checkMagRows)
- {
- if (uRow.Cells["Target"].Text.Trim().Equals("A"))
- {
- if (uRow.Cells["ActCount"].Text.Trim() != uRow.Cells["PonderGrossCount"].Text.Trim())
- {
- MessageUtil.ShowTips("还有未过磅的管子,不允许申请判定!");
- return;
- }
- }
- if (uRow.Cells["JugdeApplyCode"].Text.Trim() != "")
- {
- n = n + 1;
- }
- MatZcMEntity matZcEntity = (MatZcMEntity)uRow.ListObject;
- string matZcTity = JSONFormat.Format(matZcEntity);
- parm.Add(matZcTity);
- JugdeApplyNum2 += int.Parse(uRow.Cells["ActCount"].Value.ToString());
- }
- break;
- }
- if (n > 0)
- {
- MessageUtil.ShowTips("正在进行判定的炉批组信息,不允许重复申请判定!");
- return;
- }
- if (JugdeApplyNum1 < JugdeApplyNum2)
- {
- MessageUtil.ShowTips("上下两部分的送判支数不一致,请把查询范围放大!");
- return;
- }
-
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "doDecision";
- ccp.ServerParams = new object[] { parm, this.ultraGrid6.ActiveRow.Cells["JudgeStoveNo"].Value.ToString(), this.ultraGrid6.ActiveRow.Cells["ProductFlag"].Value.ToString(), UserInfo.GetUserName(), this.txtMemo.Text.Trim(), this.ultraGrid6.ActiveRow.Cells["PlineCode"].Value.ToString(), this.CustomInfo };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("申请判定成功!"))
- {
- string zpMLh = "";
- string zpColl = "";
- string jugdeApplyCode = "";
- DataTable dtZp = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryZpJudgeStoveNo", new object[] { this.ultraGrid6.ActiveRow.Cells["JudgeStoveNo"].Value.ToString(),this.ultraGrid6.ActiveRow.Cells["PlineCode"].Value.ToString() }, ob);
- if (dtZp.Rows.Count > 0)
- {
- if (!dtZp.Rows[0][0].Equals("0") )
- {
- DataTable dtZp2 = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryZpMLh", new object[] { this.ultraGrid6.ActiveRow.Cells["JudgeStoveNo"].Value.ToString(), this.ultraGrid6.ActiveRow.Cells["PlineCode"].Value.ToString() }, ob);
- if (dtZp2.Rows.Count > 0)
- {
- zpMLh = dtZp2.Rows[0]["ZP_M_LH"].ToString();
- zpColl = dtZp2.Rows[0]["ZP_COLL"].ToString();
- jugdeApplyCode = dtZp2.Rows[0]["JUGDE_APPLY_CODE"].ToString();
- }
- foreach (UltraGridRow Crow in checkMagRows)
- {
- OpeBase obPss = new OpeBase { MainUrl = CoreCommon.coreCommon.UrlList["pssserver"].Url };
- ccp.ServerName = "com.steering.pss.judge.Bll.BllCreateGroupStoveInfo";
- ccp.MethodName = "Create";
- ccp.ServerParams = new object[] { "D", Crow.Cells["LotNo"].Value.ToString(),Crow.Cells["JudgeStoveNo"].Value.ToString(),
- Crow.Cells["BatchNo"].Value.ToString(),jugdeApplyCode };
- ccp = obPss.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnInfo != "")
- {
- MessageUtil.ShowWarning(ccp.ReturnInfo);
- }
- }
- }
- }
-
- QueryMat();
- this.txtMemo.Text = "";
- MessageUtil.ShowTips("申请判定成功!");
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 查询送判数据
- /// </summary>
- private void QueryZgJugdeApply()
- {
-
- string plinCode = "";
- string jugeNo = "";
- string startTim = "";
- string endTim = "";
- string departMentid = UserInfo.GetDeptid();
- NativeMethodNew na = new NativeMethodNew(this.ob);
- plinCode = na.GetPCode(this.UserInfo.GetDepartment());
- if (this.chkHeatNo2.Checked && this.txtHeatNo2.Text.Trim() != "")
- {
- jugeNo = this.txtHeatNo2.Text.Trim();
- }
- if (chkTim2.Checked)
- {
- if (DateTime.Parse(StartTime2.Value.ToString()) > DateTime.Parse(EndTime2.Value.ToString()))
- {
- MessageUtil.ShowTips("选择的前面时间不能大于后面的时间!");
- return;
- }
- else
- {
- startTim = this.StartTime2.Value.ToString("yyyy-MM-dd HH:mm:ss");
- endTim = this.EndTime2.Value.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- List<QcmZgJugdeApplyEntity> listSource = EntityHelper.GetData<QcmZgJugdeApplyEntity>(
- "com.steering.mes.signature.FrmInOnlineStore.QueryZgJugdeApply", new object[] { jugeNo, startTim, endTim, departMentid, plinCode, this.ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
- qcmZgJugdeApplyEntityBindingSource.DataSource = listSource;
- WriteTextToGrid();
- }
- /// <summary>
- /// 查询炉信息
- /// </summary>
- private void QueryMat()
- {
- //查询前清空炉批组信息
- this.MatZcMEntity2bindingSource.Clear();
- string plinCode = "";
- string jugeNo = "";
- string startTim = "";
- string endTim = "";
- ArrayList list = new ArrayList();
- List<MatZcMEntity> listSource = null;
- //string departMentid = PipeManageClass.GetDepartIdBySectionId(UserInfo.GetDeptid(), ob);
- switch (this.CustomInfo)
- {
- case "WG":
- if (this.chkHeatNo2.Checked && this.txtHeatNo2.Text.Trim() != "")
- {
- jugeNo = this.txtHeatNo2.Text.Trim();
- }
- if (chkTim2.Checked)
- {
- if (DateTime.Parse(StartTime2.Value.ToString()) > DateTime.Parse(EndTime2.Value.ToString()))
- {
- MessageUtil.ShowTips("选择的前面时间不能大于后面的时间!");
- return;
- }
- else
- {
- startTim = this.StartTime2.Value.ToString("yyyy-MM-dd HH:mm:ss");
- endTim = this.EndTime2.Value.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
-
- list.Add(jugeNo);
- listSource = EntityHelper.GetData<MatZcMEntity>(
- "com.steering.mes.signature.FrmInOnlineStore.doQueryMatWG", new object[] { list, startTim, endTim, this.ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
- MatZcMEntity1bindingSource.DataSource = listSource;
- break;
- case "ZG":
- string departMentid = UserInfo.GetDeptid();
- NativeMethodNew na = new NativeMethodNew(this.ob);
- plinCode = na.GetPCode(this.UserInfo.GetDepartment());
- if (this.chkHeatNo2.Checked && this.txtHeatNo2.Text.Trim() != "")
- {
- jugeNo = this.txtHeatNo2.Text.Trim();
- }
- if (chkTim2.Checked)
- {
- if (DateTime.Parse(StartTime2.Value.ToString()) > DateTime.Parse(EndTime2.Value.ToString()))
- {
- MessageUtil.ShowTips("选择的前面时间不能大于后面的时间!");
- return;
- }
- else
- {
- startTim = this.StartTime2.Value.ToString("yyyy-MM-dd HH:mm:ss");
- endTim = this.EndTime2.Value.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
-
- list.Add(jugeNo);
- list.Add(plinCode);
- listSource = EntityHelper.GetData<MatZcMEntity>(
- "com.steering.mes.signature.FrmInOnlineStore.doQueryMat", new object[] { list, startTim, endTim, departMentid, plinCode, this.ultraOptionSet1.CheckedItem.DataValue.ToString(), plineCodes }, this.ob);
- MatZcMEntity1bindingSource.DataSource = listSource;
- foreach (UltraGridRow uRow in this.ultraGrid6.Rows)//StdName
- {
- if (uRow.Cells["Target"].Text == "A" && uRow.Cells["PlineCode"].Text != "C072")
- {
- if (int.Parse(uRow.Cells["Bjz"].Text.ToString3()) > 0 && int.Parse(uRow.Cells["Bjz"].Text.ToString3()) >= int.Parse(uRow.Cells["ActCount"].Text.ToString3()) && int.Parse(uRow.Cells["Bjz"].Text.ToString3()) == int.Parse(uRow.Cells["Yjz"].Text.ToString3()) && int.Parse(uRow.Cells["Xcjz"].Text.ToString3()) == 0)
- {
- uRow.Cells["IsOk"].Value = "可送判";
- }
- else
- {
- uRow.Cells["IsOk"].Value = "不可送判";
- }
- //待报检支= 送判支+下线支-报检支+重检支
- int dbjz = int.Parse(uRow.Cells["Spz"].Text.ToString3()) + int.Parse(uRow.Cells["ActCount"].Text.ToString3()) - int.Parse(uRow.Cells["Bjz"].Text.ToString3()) + int.Parse(uRow.Cells["Ycjz"].Text.ToString3());
- if(dbjz > 0 )
- {
- uRow.Cells["DBJZ"].Value = dbjz;
- }else{
- uRow.Cells["DBJZ"].Value = 0;
- }
-
- }
- if (uRow.Cells["Target"].Text == "B" && uRow.Cells["PlineCode"].Text != "C072"&& uRow.Cells["StdName"].Text.ToUpper().Contains("JY") &&(! uRow.Cells["PlineName"].Text.Contains("168")))
- {
- if (int.Parse(uRow.Cells["Bjz"].Text.ToString3()) > 0 && int.Parse(uRow.Cells["Bjz"].Text.ToString3()) >= int.Parse(uRow.Cells["ActCount"].Text.ToString3()) && int.Parse(uRow.Cells["Bjz"].Text.ToString3()) == int.Parse(uRow.Cells["Yjz"].Text.ToString3()) && int.Parse(uRow.Cells["Xcjz"].Text.ToString3()) == 0)
- {
- uRow.Cells["IsOk"].Value = "可送判";
- }
- else
- {
- uRow.Cells["IsOk"].Value = "不可送判";
- }
- //待报检支= 送判支+下线支-报检支+重检支
- int dbjz = int.Parse(uRow.Cells["Spz"].Text.ToString3()) + int.Parse(uRow.Cells["ActCount"].Text.ToString3()) - int.Parse(uRow.Cells["Bjz"].Text.ToString3()) + int.Parse(uRow.Cells["Ycjz"].Text.ToString3());
- if (dbjz > 0)
- {
- uRow.Cells["DBJZ"].Value = dbjz;
- }
- else
- {
- uRow.Cells["DBJZ"].Value = 0;
- }
- }
- }
- break;
- }
- WriteTextToGrid();
- }
- /// <summary>
- /// 查询是否该炉已交库结炉
- /// </summary>
- /// <param name="jugeNo"></param>
- /// <param name="plineCode"></param>
- /// <returns></returns>
- private Boolean doQueryNode(string jugeNo,string plineCode)
- {
- bool node = true;
- string nodeStaus = "";
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryNode", new object[] { jugeNo, plineCode }, ob);
- if (int.Parse(ds.Rows[0][0].ToString())>0)
- {
- node = false;
- }
- return node;
- }
- /// <summary>
- /// 查询炉批组信息
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void chkTim2_CheckedChanged(object sender, EventArgs e)
- {
- this.StartTime2.Enabled = this.EndTime2.Enabled = this.chkTim2.Checked;
- }
- private void chkHeatNo2_CheckedChanged(object sender, EventArgs e)
- {
- this.txtHeatNo2.Enabled = this.chkHeatNo2.Checked;
- }
- private void ultraGrid6_ClickCellButton(object sender, CellEventArgs e)
- {
- if (e.Cell.Column.Key == "ChemResultCode")
- {
- updateChemResult(this.ultraGrid6.ActiveRow.Cells["JudgeStoveNo"].Value.ToString());
- }
- }
- /// <summary>
- /// 修改成分结果
- /// </summary>
- /// <param name="jugeNo"></param>
- private void updateChemResult(string jugeNo)
- {
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "updateChemResult";
- ccp.ServerParams = new object[] { jugeNo };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- QueryMat();
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- private void updatePhyResult(string jugeNo,string bathNo)
- {
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "updatePhyResult";
- ccp.ServerParams = new object[] { jugeNo, bathNo };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- QueryMat();
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- private void doSaveOrdLnDlyPk()
- {
- IQueryable<UltraGridRow> checkMags = this.ultraGrid7.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMags.Count() == 0)
- {
- MessageUtil.ShowTips("请选择需要修改的数据!");
- return;
- }
- ArrayList parmList = new ArrayList();
- foreach (UltraGridRow row in checkMags)
- {
- MatZcMEntity matBcEntity1 = (MatZcMEntity)row.ListObject;
- string OrdLnDlyPk = row.Cells["OrderSeqNo"].Value.ToString();
- string OrderSeqNo = row.Cells["OrderSeqNo"].Text.ToString();
- if (OrdLnDlyPk.Equals(OrderSeqNo))
- {
- return;
- }
- matBcEntity1.OrdLnDlyPk = OrdLnDlyPk;
- matBcEntity1.OrderSeqNo = OrderSeqNo;
- string matEntity = JSONFormat.Format(matBcEntity1);
- parmList.Add(matEntity);
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "doSaveOrdLnDlyPk";
- ccp.ServerParams = new object[] { parmList };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("保存成功!"))
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- /// <summary>
- /// 查询炉次计划号详细炉批组
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGrid6_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow uRow = this.ultraGrid6.ActiveRow;
- this.MatZcMEntity2bindingSource.Clear();
- List<MatZcMEntity> listSource = null;
- switch (this.CustomInfo)
- {
- case "ZG":
- listSource = EntityHelper.GetData<MatZcMEntity>(
- "com.steering.mes.signature.FrmInOnlineStore.doQueryMatData", new object[] { uRow.Cells["JudgeStoveNo"].Value.ToString(), this.ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
- MatZcMEntity2bindingSource.DataSource = listSource;
- break;
- case "WG":
- listSource = EntityHelper.GetData<MatZcMEntity>(
- "com.steering.mes.signature.FrmInOnlineStore.doQueryMatDataWG", new object[] { uRow.Cells["JudgeStoveNo"].Value.ToString(), this.ultraOptionSet1.CheckedItem.DataValue.ToString() }, this.ob);
- MatZcMEntity2bindingSource.DataSource = listSource;
- break;
- }
- DataTable ds = ServerHelper.GetData("com.steering.mes.signature.FrmInOnlineStore.doQueryJugeMemo", new object[] { uRow.Cells["JudgeStoveNo"].Text }, ob);
- if (listSource.Count > 0)
- {
- this.getDeliveryNo(listSource[0].OrdLnPk.ToString());
- }
- this.txtMemo.Text = "";
- if (ds.Rows.Count > 0)
- {
- this.txtMemo.Text = ds.Rows[0]["MEMO"].ToString();
- }
-
- foreach (UltraGridRow ugr in this.ultraGrid7.Rows)
- {
- ugr.Cells["CHK"].Value = true;
- }
- WriteTextToGrid2();
- }
- private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- UltraGridRow row = ultraGrid6.ActiveRow;
- if (e.Button.Key.ToLower().Equals("select"))
- {
- if (ultraGrid6.ActiveCell.Column.Key == "DetectResultPath")
- {
- //探伤报告
- string filePath = row.GetValue("DetectResultPath");
- dlgOrderAskDown down = new dlgOrderAskDown(this.ob, filePath);
- down.DeleteButton.Visible = false;
- down.ShowDialog();
- }
- else if (ultraGrid6.ActiveCell.Column.Key == "FaceResultPath")
- {
- //表检报告
- string filePath = row.GetValue("FaceResultPath") ;
- dlgOrderAskDown down = new dlgOrderAskDown(this.ob, filePath);
- down.DeleteButton.Visible = false;
- down.ShowDialog();
- }
- }
-
- }
- private void ultraTabControl1_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if (toolMenu == null) return;
- if (ultraTabControl1.SelectedTab.Index == 0)
- {
- chkTim2.Text = "入库日期";
- }
- else if (ultraTabControl1.SelectedTab.Index == 1)
- {
- chkTim2.Text = "送判日期";
- }
- }
- private void ultraGrid1_ClickCellButton(object sender, CellEventArgs e)
- {
- this.ultraGrid1.UpdateData();
- if (e.Cell.Column.Key == "JugdeApplyCode")
- {
- string jugdeApplyCode = ultraGrid1.ActiveRow.Cells["JugdeApplyCode"].Value.ToString();
- string judgeStoveNo = ultraGrid1.ActiveRow.Cells["JudgeStoveNo"].Value.ToString();
- string ordenNo = ultraGrid1.ActiveRow.Cells["ProOrderNo"].Value.ToString();
- FrmQcmAddAsk orderZg = new FrmQcmAddAsk(jugdeApplyCode, judgeStoveNo, ordenNo,this.ob);
- orderZg.ShowDialog();
-
- }
- }
- /// <summary>
- /// 获取测量点重量
- /// </summary>
- private void updateProssWt()
- {
- this.ultraGrid7.UpdateData();
- IQueryable<UltraGridRow> checkMagRows = this.ultraGrid7.Rows.AsQueryable().Where(" CHK = 'True'");
- if (checkMagRows.Count() == 0)
- {
- MessageUtil.ShowTips("请选择需要撤销申请判定的主信息!");
- return;
- }
- ArrayList parm = new ArrayList();
- foreach (UltraGridRow uRow in checkMagRows)
- {
- MatZcMEntity matZcTity = (MatZcMEntity)uRow.ListObject;
- string matTity = JSONFormat.Format(matZcTity);
- parm.Add(matTity);
- }
- //if (MessageUtil.ShowYesNoAndQuestion("是否确认获取测量点重量?") == DialogResult.No) return;
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.signature.FrmInOnlineStore";
- ccp.MethodName = "updateProssWt";
- ccp.ServerParams = new object[] { parm, this.UserInfo.GetUserName() };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- if (ccp.ReturnInfo.Equals("获取测量点重量成功!"))
- {
- QueryMat();
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- }
- }
|