| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using com.steering.mes.mcp.entity;
- using Core.Mes.Client.Comm.Server;
- using Infragistics.Win.UltraWinGrid;
- using Core.Mes.Client.Comm.Control;
- using Core.StlMes.Client.Mcp.Common;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Mcp.CollarMaterial;
- using System.Collections;
- using Core.StlMes.Client.Mcp.Control;
- using Core.StlMes.Client.Mcp.Coupling;
- using Core.StlMes.Client.Mcp.Entity;
- using Core.StlMes.Client.Mcp.Report;
- using Infragistics.Win;
- namespace Core.StlMes.Client.Coup
- {
- public partial class FrmPhosphateResult : FrmBase
- {
- private string departm = "";//获取部门ID
- private string[] plineCode = null;//获取产线代码
- private string Process= "";//工序
- private string ProName = "";//工序名称
- private string PbGx = "";//喷标工序
- private string PbName = "";//喷标工序名称
- private string LiXian = "";
- private string StrMemo = "";//备注
- private string[] plineCodes;
- private int CutPiece = 0;
- private int phosphatePiece = 0;
- public FrmPhosphateResult()
- {
- InitializeComponent();
- }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- this.ultraGrid2.DisplayLayout.Override.AllowAddNew = Infragistics.Win.UltraWinGrid.AllowAddNew.TemplateOnBottom;
- this.ultraGrid2.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- this.ultraGrid2.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.Select;
- //this.coupThreadingControl1.Grid.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- //禁控件过滤
- //this.coupWoIdPlanControl1.Grid.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- //this.phosphateContro1.Grid.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- //设置计划区控件只读
- //this.coupWoIdPlanControl1.SetAllColumnsActiveOnly();
- //coupWoIdPlanControl1.Ob = this.ob;
-
- initControl();
- }
- private void FrmPhosphateResult_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<PlnZyJgWorkbillEntity>(ultraGridWoId.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<PlnZyJgWorkbillEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<PlnZyJgWorkMidbillEntity>(ultraGrid3.DisplayLayout.Bands[0]);
- departm = UserInfo.GetDeptid();
- //plineCode = McpBaseHelper.GetPCodePline(departm, this.ob);
- plineCodes = comm.GetPlineCode(this.ValidDataPurviewIds, "H", ob);
- //McpBaseHelper.InitPlineUnit(cmbCname, plineCode, this.ob);
- ProTime.Value = DateTime.Today;
- dateTime.Value = DateTime.Today;
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryColUser", new object[] { "7030" }, this.ob);
- if (dt.Rows.Count > 0)
- {
- Operator.DataSource = dt;
- Operator.DisplayMember = "BASENAME";
- Operator.ValueMember = "BASECODE";
- YdmBaseClass.SetComboItemHeight(Operator);
- }
- //获取磷化工序
- DataTable dt2 = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryGX", new object[] { "700310" }, this.ob);
- if (dt2.Rows.Count > 0)
- {
- Process = dt2.Rows[0]["BASECODE"].ToString();
- ProName = dt2.Rows[0]["BASENAME"].ToString();
- }
- //获取喷标工序
- DataTable dt3 = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryGX", new object[] { "700311" }, this.ob);
- if (dt3.Rows.Count > 0)
- {
- PbGx = dt3.Rows[0]["BASECODE"].ToString();
- PbName = dt3.Rows[0]["BASENAME"].ToString();
- }
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "DoQuery":
- QuerySinglePlan();
- break;
- case "DoQueryInList":
- doQueryInList();
- break;
- case "DoSave":
- DoSave();
- break;
- case "DoDelete":
- DoDelete();
- break;
- case "DoUpdate":
- DoUpdate();
- break;
- case "DoInsDelete":
- DoInsDelete();//检验删除
- break;
- case "DoInsUpdate":
- DoInsUpdate();//检验修改
- break;
- case "DoComplete":
- DoComplete();//结炉
- break;
- case "UnDoComplete":
- UnDoComplete();//撤销结炉
- break;
- case "Offline"://离线
- Offline();
- break;
- //case "unOffline"://撤销离线
- // unOffline();
- // break;
- case "Confirm":
- confirm();//确认
- break;
- case "CancelConfirm":
- cancelConfirm();
- break;
- case "DoClose":
- this.Close();
- break;
- }
- }
- ///
- /// 取消确认
- ///
- private void cancelConfirm()
- {
- ultraGrid4.UpdateData();
- UltraGridRow uRow = this.ultraGrid4.ActiveRow;
- if (uRow == null) { MessageUtil.ShowTips("无磷化实绩!"); return; }
- UltraGridRow row = this.ultraGridWoId.ActiveRow;
- if (row == null)
- {
- MessageUtil.ShowTips("无工单信息,不允许此操作!");
- }
- ArrayList list1 = new ArrayList();
- int UpdaCount = 0;
- foreach (UltraGridRow ugr in ultraGrid4.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- if (ugr.Cells["CONFIRM"].Value.ToString().Equals("0"))
- {
- MessageUtil.ShowTips("选中有没确认实绩,不允许取消确认!");
- return;
- }
- UpdaCount += 1;
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["RESULT_NO"].Text.ToString());
- list.Add(UserInfo.GetUserName());
- list.Add(DateTime.Now.ToString());
- list1.Add(list);
- }
- }
- if (UpdaCount == 0) { MessageUtil.ShowTips("请选择磷化实绩数据!"); return; }
- if (MessageUtil.ShowYesNoAndQuestion("是否取消确认磷化实绩?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "getCancelConfirm";
- ccp.ServerParams = new object[] { list1 };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("取消确认成功!"))
- {
- QuerySinglePlan();
- }
- }
- }
- ///
- /// 确认
- ///
- private void confirm()
- {
- ultraGrid4.UpdateData();
- UltraGridRow uRow = this.ultraGrid4.ActiveRow;
- if (uRow == null) { MessageUtil.ShowTips("无磷化实绩!"); return; }
- UltraGridRow row = this.ultraGridWoId.ActiveRow;
- if (row == null)
- {
- MessageUtil.ShowTips("无工单信息,不允许此操作!");
- }
- ArrayList list1 = new ArrayList();
- int UpdaCount = 0;
- foreach (UltraGridRow ugr in ultraGrid4.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- if (ugr.Cells["CONFIRM"].Value.ToString().Equals("1"))
- {
- MessageUtil.ShowTips("选中有已确认实绩,不允许再次确认!");
- return;
- }
- UpdaCount += 1;
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["RESULT_NO"].Text.ToString());
- list.Add(UserInfo.GetUserName());
- list.Add(DateTime.Now.ToString());
- list1.Add(list);
- }
- }
- if (UpdaCount == 0) { MessageUtil.ShowTips("请选择磷化实绩数据!"); return; }
- if (MessageUtil.ShowYesNoAndQuestion("是否确认磷化实绩?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "getConfirm";
- ccp.ServerParams = new object[] { list1 };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("确认成功!"))
- {
- QuerySinglePlan();
- }
- }
- }
- //查询交库实绩
- private void doQueryInList()
- {
- string[] starts = { };
- string woId = "";
- string judgeStoveNo = "";
- string plnNo = "";
- #region 条件
- if (chkStarts.Checked)
- {
- if (string.IsNullOrEmpty(cmbStarts.Text.Trim()))
- {
- MessageUtil.ShowTips("请选择工单状态!");
- return;
- }
- else
- {
- starts = (cmbStarts.Value as List<object>).Select(p => p.ToString().Trim()).ToArray();
- }
- }
- if (chkwoId.Checked && string.IsNullOrEmpty(txtWoId.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入工单号!");
- return;
- }
- else
- {
- woId = txtWoId.Text.ToString().Trim();
- }
- if (chkPlnNo.Checked && string.IsNullOrEmpty(txtPlnNo.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入炉次计划号!");
- return;
- }
- else
- {
- plnNo = txtPlnNo.Text.ToString().Trim();
- }
- if (chkJuNo.Checked && string.IsNullOrEmpty(txtJudgeStoveNO.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入炉号!");
- return;
- }
- else
- {
- judgeStoveNo = txtJudgeStoveNO.Text.ToString().Trim();
- }
- #endregion
- ArrayList list = new ArrayList();
- list.Add(woId);
- list.Add(plnNo);
- list.Add(judgeStoveNo);
- List<PlnZyJgWorkMidbillEntity> listSource1 = EntityHelper.GetData<PlnZyJgWorkMidbillEntity>
- ("com.steering.mes.mcp.coup.PhosphateResultService.getphosInResult", new object[] { list, starts }, this.ob);
- PlnMiddbindingSource.DataSource = listSource1;
- //DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.coup.FrmInLibrary.doQueryMatNo", new object[] { list, plineCode[0].ToString() }, this.ob);
- //GridHelper.CopyDataToDatatable(ref dt1, ref dataTable2, true);
- }
- /// <summary>
- /// 离线
- /// </summary>
- private void Offline()
- {
- string _strat = "";
- //UltraGridRow row1 = ultraGrid4.ActiveRow;
- //if (row1 == null)
- //{
- // MessageUtil.ShowTips("没有磷化实绩不能离线!");
- // return;
- //}
- OffLineCut frm = new OffLineCut();
- frm.ShowDialog();
- LiXian = frm.StrNum;
- _strat = frm.Strat;
- StrMemo = frm.StrMemo;
- if (_strat.Equals("2")) return;
- if (LiXian.Equals("") || LiXian.Equals("0")) { MessageUtil.ShowTips("离线个数不能为空!"); return; }
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) return;
- if (row.Cells["ZyBillStatus"].Value.ToString() == "生产完成")
- {
- MessageUtil.ShowTips("此炉次计划整体已生产完成,不允许此操作!");
- return;
- }
- string woId = row.Cells["WoId"].Value.ToString();
- //查询切断实绩支数和
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResult", new object[] { row.Cells["WoId"].Value.ToString() }, this.ob);
- //VrpLoadingResultEntity result1 = new VrpLoadingResultEntity();
- //this.planExpanQuery1.Value = result;
- string pronum = "";//锯切支数
- string cutnum = "";//锯切个数
- if (dt.Rows.Count > 0)
- {
- pronum = dt.Rows[0]["PRO_NUM"].ToString();
- cutnum = dt.Rows[0]["CUT_NUM"].ToString();
- }
- else
- {
- pronum = "0";
- cutnum = "0";
- }
- if (!row.Cells["Ifsplit"].Value.Equals("1"))
- {
- if (Convert.ToInt32(LiXian) > Convert.ToInt32(cutnum) - Convert.ToInt32(phosphatePiece) - Convert.ToInt32(offlinePiece.Value))
- {
- MessageUtil.ShowTips("离线个数不能大于锯切个数减去已经磷化和离线个数的差!");
- return;
- }
- }
- offlinePiece.Value = Convert.ToInt32(LiXian) + Convert.ToInt32(offlinePiece.Value);
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("镀铜"))
- //{
- // if (dt.Rows[0]["PLT_CU_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单镀铜工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- // if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("磷化"))
- //{
- // if (dt.Rows[0]["PHOS_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单磷化工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- // else
- //{
- // MessageUtil.ShowTips("此工序没有磷化镀铜,不允许离线!");
- // return;
- //}
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryCouplingcominfo", new object[] { woId, Process }, this.ob);
- //if (dt.Rows[0]["STATION_STATUS"].ToString().Equals("2"))
- //{
- // MessageUtil.ShowTips("此工单工序点已结炉,不允许此操作!");
- // return;
- //}
- string offline = "";
- string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- ArrayList list = new ArrayList();
- list.Add(LiXian);
- list.Add(row.Cells["WoId"].Text.ToString());
- list.Add(row.Cells["HeatPlanNo"].Text.ToString());
- list.Add(row.Cells["JudgeStoveNo"].Text.ToString());
- list.Add(row.Cells["BatchNo"].Text.ToString());
- list.Add(row.Cells["PlineCode"].Text.ToString());
- list.Add(row.Cells["PlineName"].Text.ToString());
- list.Add(this.UserInfo.GetUserName());
- list.Add(this.UserInfo.GetUserOrder());
- list.Add(this.UserInfo.GetUserGroup());
- list.Add(time);
- list.Add("");
- list.Add(StrMemo);
- list.Add(row.Cells["BatchGroudNo"].Value.ToString());
- if (row.Cells["CoatType"].Text.ToString().Equals("磷化"))
- {
- offline = "1";
- }
- else if (row.Cells["CoatType"].Text.ToString().Equals("镀铜"))
- {
- offline = "0";
- }
- else
- {
- offline = "2";
- }
- list.Add(offline);
- list.Add(row.Cells["CoatType"].Text.ToString());
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.CoupCutService";
- ccp.MethodName = "lixianThreadingResult";
- ccp.ServerParams = new object[] { list, Process,ProName };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("离线成功!"))
- {
- QuerySinglePlan();
- //DoClean();
- }
- }
- }
- /// 撤销离线
- /// </summary>
- private void unOffline()
- {
- //phosphateContro1.UpdateData();
- ultraGrid2.UpdateData();
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) { MessageUtil.ShowTips("无接箍计划!"); return; }
- if (row.Cells["ZyBillStatus"].Value.ToString() == "生产完成")
- {
- MessageUtil.ShowTips("此炉次计划整体已生产完成,不允许此操作!");
- return;
- }
- //string zYgNo = row.Cells["ZY_PLAN_ID"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("镀铜"))
- //{
- // if (dt.Rows[0]["PLT_CU_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单镀铜工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //else if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("磷化"))
- //{
- // if (dt.Rows[0]["PHOS_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单磷化工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryCouplingcominfo", new object[] { woId, Process }, this.ob);
- //if (dt.Rows[0]["STATION_STATUS"].ToString().Equals("2"))
- //{
- // MessageUtil.ShowTips("此工单工序点已结炉,不允许此操作!");
- // return;
- //}
- int DeleteCount = 0;
- ArrayList list1 = new ArrayList();
- ArrayList pram = new ArrayList();
- if (row.Cells["CoatType"].Text.Trim().Equals("磷化"))
- {
- UltraGridRow rowMat = ultraGrid4.ActiveRow;
- if (rowMat == null) { MessageUtil.ShowTips("无磷化实绩记录!"); return; }
- pram.Add("0");
- //pram.Add(row.Cells["ZY_PLAN_ID"].Text.Trim());
- pram.Add(row.Cells["IfOutCopper"].Text.Trim());
- pram.Add(row.Cells["WoId"].Text.Trim());
- pram.Add(Process);
- foreach (UltraGridRow ugr in ultraGrid4.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
-
- DeleteCount += 1;
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["RESULT_NO"].Text.ToString());
- list.Add(ugr.Cells["OFF_NUM"].Text.ToString());
- list1.Add(list);
- }
- }
- }
- else if (row.Cells["COAT_TYPE"].Text.Trim().Equals("镀铜"))
- {
- UltraGridRow rowMat = ultraGrid5.ActiveRow;
- if (rowMat == null) { MessageUtil.ShowTips("无镀铜实绩记录!"); return; }
- pram.Add("1");
- //pram.Add(row.Cells["ZY_PLAN_ID"].Text.Trim());
- pram.Add(row.Cells["IfOutCopper"].Text.Trim());
- pram.Add(row.Cells["WoId"].Text.Trim());
- pram.Add(Process);
- foreach (UltraGridRow ugr in ultraGrid5.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- DeleteCount += 1;
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["RESULT_NO"].Text.ToString());
- list.Add(ugr.Cells["OFF_NUM"].Text.ToString());
- list1.Add(list);
- }
- }
- }
- else
- {
- MessageUtil.ShowTips("不需要镀铜磷化!");
- return;
- }
- if (DeleteCount == 0) { MessageUtil.ShowTips("请选择要删除的记录!"); return; }
- if (MessageUtil.ShowYesNoAndQuestion("是否撤销离线?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.CoupCutService";
- ccp.MethodName = "unlixianThreadingResult";
- ccp.ServerParams = new object[] { list1, woId, Process };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销离线成功!"))
- {
- QuerySinglePlan();
- }
- }
- /// <summary>
- /// 结炉
- /// </summary>
- private void DoComplete()
- {
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) { MessageUtil.ShowTips("无工单信息!"); return; }
- //string zYgNo = row.Cells["ZY_PLAN_ID"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- // DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId }, this.ob);
- //if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("镀铜"))
- //{
- // if (dt.Rows[0]["PLT_CU_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单镀铜工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //else if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("磷化"))
- //{
- // if (dt.Rows[0]["PHOS_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单磷化工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //else
- //{
- // MessageUtil.ShowTips("不需磷化镀铜,不允许次操作!");
- // return;
- //}
- //if (dt.Rows[0]["ZyBillStatus"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单状态已生产完成,不允许此操作!");
- // return;
- //}
- //ArrayList list = new ArrayList();
- //list.Add(row.Cells["COAT_TYPE"].Text.ToString());
- //list.Add(Process);
- //list.Add(woId);
- //list.Add(row.Cells["IF_OUT_COPPER"].Text.ToString());
- if (MessageUtil.ShowYesNoAndQuestion("是否确认结炉?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "updatePlanResult";
- ccp.ServerParams = new object[] { Process,PbGx, woId };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("结炉成功!"))
- {
- QuerySinglePlan();
- }
- }
- /// <summary>
- /// 撤销结炉
- /// </summary>
- private void UnDoComplete()
- {
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) { MessageUtil.ShowTips("无工单信息!"); return; }
- //string zYgNo = row.Cells["ZY_PLAN_ID"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("镀铜"))
- //{
- // if (!dt.Rows[0]["PLT_CU_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单镀铜工序点未结炉,不允许此操作!");
- // return;
- // }
- //}
- //else if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("磷化"))
- //{
- // if (!dt.Rows[0]["PHOS_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单磷化工序点未结炉,不允许此操作!");
- // return;
- // }
- //}
- //else
- //{
- // MessageUtil.ShowTips("不需磷化镀铜,不允许次操作!");
- // return;
- //}
- //if (dt.Rows[0]["ZyBillStatus"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单状态已生产完成,不允许此操作!");
- // return;
- //}
- //ArrayList list = new ArrayList();
- //list.Add(zYgNo);
- //list.Add(row.Cells["COAT_TYPE"].Text.ToString());
- //list.Add(Process);
- //list.Add(woId);
- //list.Add(row.Cells["IF_OUT_COPPER"].Text.ToString());
- if (MessageUtil.ShowYesNoAndQuestion("是否确认撤销结炉?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "unDoCompleteResult";
- ccp.ServerParams = new object[] { Process, PbGx,woId };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销结炉成功!"))
- {
- QuerySinglePlan();
- }
- }
- /// <summary>
- /// 简单查询
- /// </summary>
- private void QuerySinglePlan()
- {
- string woId = "";
- string[] starts = { };
- string judgeStoveNo = "";
- string plnNo = "";
- #region 条件
- if (chkStarts.Checked)
- {
- if (string.IsNullOrEmpty(cmbStarts.Text.Trim()))
- {
- MessageUtil.ShowTips("请选择工单状态!");
- return;
- }
- else
- {
- starts = (cmbStarts.Value as List<object>).Select(p => p.ToString().Trim()).ToArray();
- }
- }
- if (chkwoId.Checked)
- {
- if (chkwoId.Checked && string.IsNullOrEmpty(txtWoId.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入工单号!");
- return;
- }
- else
- {
- woId = txtWoId.Text.ToString().Trim();
- }
- }
- else
- {
- woId = "";
- }
- if (chkPlnNo.Checked)
- {
- if (chkPlnNo.Checked && string.IsNullOrEmpty(txtPlnNo.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入炉次计划号!");
- return;
- }
- else
- {
- plnNo = txtPlnNo.Text.ToString().Trim();
- }
- }
- else
- {
- plnNo = "";
- }
- if (chkJuNo.Checked)
- {
- if (chkJuNo.Checked && string.IsNullOrEmpty(txtJudgeStoveNO.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入炉号!");
- return;
- }
- else
- {
- judgeStoveNo = txtJudgeStoveNO.Text.ToString().Trim();
- }
- }
- else
- {
- judgeStoveNo = "";
- }
-
- #endregion
- List<PlnZyJgWorkbillEntity> listSource = EntityHelper.GetData<PlnZyJgWorkbillEntity>
- ("com.steering.mes.mcp.coup.CoupLoadingService.getQueryWoId", new object[] { woId, plnNo, judgeStoveNo, starts, plineCodes }, this.ob);
- plnZyJgWorkbillEntitySource.DataSource = listSource;
- DoClean();
- //GridHelper.RefreshAndAutoSize(ultraGridWoId);
- // List<PlnZyJgWorkbillEntity> listSource1 = EntityHelper.GetData<PlnZyJgWorkbillEntity>
- //("com.steering.mes.mcp.coup.CoupLoadingService.ulgetQueryWoId", new object[] { woId, plnNo, judgeStoveNo, starts, plineCode[0].ToString() }, this.ob);
- // bindingSource1.DataSource = listSource1;
- // GridHelper.RefreshAndAutoSize(ultraGrid1);
- }
- private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if (toolMenu == null) return;
- if (e.Tab.TabControl.SelectedTab.Key.Equals("0"))
- {
- if (toolMenu.Toolbars[0].Tools.Exists("DoQuery")) { toolMenu.Toolbars[0].Tools["DoQuery"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoQueryInList")) { toolMenu.Toolbars[0].Tools["DoQueryInList"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoSave")) { toolMenu.Toolbars[0].Tools["DoSave"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoDelete")) { toolMenu.Toolbars[0].Tools["DoDelete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoUpdate")) { toolMenu.Toolbars[0].Tools["DoUpdate"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoInsDelete")) { toolMenu.Toolbars[0].Tools["DoInsDelete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoInsUpdate")) { toolMenu.Toolbars[0].Tools["DoInsUpdate"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoComplete")) { toolMenu.Toolbars[0].Tools["DoComplete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("UnDoComplete")) { toolMenu.Toolbars[0].Tools["UnDoComplete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("Offline")) { toolMenu.Toolbars[0].Tools["Offline"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoClose")) { toolMenu.Toolbars[0].Tools["DoClose"].InstanceProps.Visible = DefaultableBoolean.True; }
- }
- else
- {
- if (toolMenu.Toolbars[0].Tools.Exists("DoQuery")) { toolMenu.Toolbars[0].Tools["DoQuery"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoQueryInList")) { toolMenu.Toolbars[0].Tools["DoQueryInList"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoSave")) { toolMenu.Toolbars[0].Tools["DoSave"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoDelete")) { toolMenu.Toolbars[0].Tools["DoDelete"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoUpdate")) { toolMenu.Toolbars[0].Tools["DoUpdate"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoInsDelete")) { toolMenu.Toolbars[0].Tools["DoInsDelete"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoInsUpdate")) { toolMenu.Toolbars[0].Tools["DoInsUpdate"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoComplete")) { toolMenu.Toolbars[0].Tools["DoComplete"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("UnDoComplete")) { toolMenu.Toolbars[0].Tools["UnDoComplete"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("Offline")) { toolMenu.Toolbars[0].Tools["Offline"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoClose")) { toolMenu.Toolbars[0].Tools["DoClose"].InstanceProps.Visible = DefaultableBoolean.False; }
- }
- }
- private void FrmPhosphateResult_Shown(object sender, EventArgs e)
- {
- if (toolMenu.Toolbars[0].Tools.Exists("DoQuery")) { toolMenu.Toolbars[0].Tools["DoQuery"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoQueryInList")) { toolMenu.Toolbars[0].Tools["DoQueryInList"].InstanceProps.Visible = DefaultableBoolean.False; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoSave")) { toolMenu.Toolbars[0].Tools["DoSave"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoDelete")) { toolMenu.Toolbars[0].Tools["DoDelete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoUpdate")) { toolMenu.Toolbars[0].Tools["DoUpdate"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoInsDelete")) { toolMenu.Toolbars[0].Tools["DoInsDelete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoInsUpdate")) { toolMenu.Toolbars[0].Tools["DoInsUpdate"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoComplete")) { toolMenu.Toolbars[0].Tools["DoComplete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("UnDoComplete")) { toolMenu.Toolbars[0].Tools["UnDoComplete"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("Offline")) { toolMenu.Toolbars[0].Tools["Offline"].InstanceProps.Visible = DefaultableBoolean.True; }
- if (toolMenu.Toolbars[0].Tools.Exists("DoClose")) { toolMenu.Toolbars[0].Tools["DoClose"].InstanceProps.Visible = DefaultableBoolean.True; }
- }
- /// <summary>
- /// 接箍磷化检测实绩
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGridWoId_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) return;
-
- //string planNO = row.Cells["ZY_PLAN_ID"].Value.ToString();
- string plinCode = row.Cells["PlineCode"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- //this.getCoupProcessPlan(woId,planNO);
- //if (row.Cells["CoatType"].Text.Trim().Equals("磷化"))
- //{
-
- // //ultraTabControl2.Tabs[1].Visible = false;
- // ultraTabControl2.Tabs[2].Visible = true;
- // ultraTabControl2.Tabs[0].Visible = true;
- //}
- //else
- //{
- //this.getCopperPlantResult(woId);
- //ultraTabControl2.Tabs[0].Visible = false;
- //ultraTabControl2.Tabs[2].Visible = true;
- //ultraTabControl2.Tabs[1].Visible = true;
- //}
- if (row.Cells["DemandCopper"].Text.ToString().Contains("喷标"))
- {
- spray.Value = "1";
- }
- else
- {
- spray.Value = "0";
- }
- this.getCoupPhosphateResult(woId);
- //获取检测项目
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPhosphateItem", new object[] { plinCode }, this.ob);
- JcProject.DataSource = dt;
- JcProject.DisplayMember = "TEST_ITEMS";
- JcProject.ValueMember = "ITEM_NO";
- PipeManageClass.SetComboItemHeight(JcProject);
- initControl();
- DoClean();
- }
- /// <summary>
- /// 查询磷化检验记录
- /// </summary>
- /// <param name="planNo"></param>
- private void getCoupPhosphateResultD(string resultNo,string woId)
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.getPhosphateRD", new object[] { resultNo,woId }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dtInspect, true);
- }
- /// <summary>
- /// 查询磷化检测实绩
- /// </summary>
- /// <param name="planNo"></param>
- private void getCoupPhosphateResult(string woId)
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.getPhosphateResult", new object[] { woId }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dtSelfChecked, true);
- foreach (UltraGridRow urg in ultraGrid4.Rows)
- {
- if (urg.Cells["CONFIRM"].Value.Equals("1"))
- {
- urg.Appearance.BackColor = Color.LightGreen;
- }
- }
- this.initControl();
- }
- /// <summary>
- /// 查询镀铜实绩
- /// </summary>
- /// <param name="planNo"></param>
- private void getCopperPlantResult(string woId)
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.getPhosphateResult", new object[] {woId }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
- this.initControl();
- }
- /// <summary>
- /// 接箍加工计划详情
- /// </summary>
- /// <param name="planNo"></param>
- //private void getCoupProcessPlan(string woId,string planNo)
- //{
- // DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, planNo }, this.ob);
- // if (dt != null && dt.Rows.Count > 0)
- // {
- // this.coupWoIdPlanControl1.Value.PlineName = dt.Rows[0]["PLINE_NAME"].ToString();
- // this.coupWoIdPlanControl1.Value.CutMachGrpNm = dt.Rows[0]["CUT_MACH_GRP_NM"].ToString();
- // this.coupWoIdPlanControl1.Value.Memo = dt.Rows[0]["MEMO"].ToString();
- // this.coupWoIdPlanControl1.Value.ZyPlanId = dt.Rows[0]["ZY_PLAN_ID"].ToString();
- // this.coupWoIdPlanControl1.Value.IfMonitorJg = dt.Rows[0]["IF_MONITOR_JG"].ToString();
- // this.coupWoIdPlanControl1.Value.LoadPieces = dt.Rows[0]["LOAD_PIECES"].ToString();
- // this.coupWoIdPlanControl1.Value.LoadWeight = dt.Rows[0]["LOAD_WEIGHT"].ToString();
- // this.coupWoIdPlanControl1.Value.ProPlanId = dt.Rows[0]["PRO_PLAN_ID"].ToString();
- // this.coupWoIdPlanControl1.Value.Steelname = dt.Rows[0]["STEELNAME"].ToString();
- // this.coupWoIdPlanControl1.Value.Gradename = dt.Rows[0]["GRADENAME"].ToString();
- // this.coupWoIdPlanControl1.Value.JglDesc = dt.Rows[0]["JGL_DESC"].ToString();
- // this.coupWoIdPlanControl1.Value.CodeJg = dt.Rows[0]["CODE_JG"].ToString();
- // this.coupWoIdPlanControl1.Value.ModelDesc = dt.Rows[0]["MODEL_DESC"].ToString();
- // this.coupWoIdPlanControl1.Value.SpecJgDesc = dt.Rows[0]["SPEC_JG_DESC"].ToString();
- // this.coupWoIdPlanControl1.Value.StyleJg = dt.Rows[0]["STYLE_JG"].ToString();
- // this.coupWoIdPlanControl1.Value.PlanJgNum = dt.Rows[0]["PLAN_JG_NUM"].ToString();
- // this.coupWoIdPlanControl1.Value.CsJgNum = dt.Rows[0]["CS_JG_NUM"].ToString();
- // this.coupWoIdPlanControl1.Value.XqJgNum = dt.Rows[0]["XQ_JG_NUM"].ToString();
- // this.coupWoIdPlanControl1.Value.InstoreNum = dt.Rows[0]["INSTORE_NUM"].ToString();
- // this.coupWoIdPlanControl1.Value.BlWlDesc = dt.Rows[0]["BL_WL_DESC"].ToString();
- // //this.coupWoIdPlanControl1.Value.LoadWeight = "";
- // this.coupWoIdPlanControl1.UpdateData();
- // }
- //}
- /// <summary>
- /// 初始化控件
- /// </summary>
- private void initControl()
- {
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) return;
- //查询切断实绩支数和
- DataTable dtCut = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultPiece", new object[] { row.Cells["WoId"].Value.ToString() }, this.ob);
- string pronum = "";
- if (dtCut.Rows.Count > 0)
- {
- pronum = dtCut.Rows[0]["PRO_NUM"].ToString();
- }
- else
- {
- pronum = "0";
- }
- CutPiece = Convert.ToInt32(pronum);
- //查询磷化实绩支数和
- DataTable dtThread = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.getphosphResult", new object[] { row.Cells["WoId"].Value.ToString() }, this.ob);
-
- if (dtThread.Rows.Count > 0)
- {
- phosphatePiece = Convert.ToInt32(dtThread.Rows[0]["PRO_NUM"].ToString());
- }
- else
- {
- phosphatePiece = 0;
- }
-
- //PhosphateResult result = new PhosphateResult();
- ////if (CutPiece - threadNum <= 0)
- ////{
- //// result.ColCount = Convert.ToString(0);
- //// phosphatePiece = 0;
- ////}
- ////else
- ////{
- //// result.ColCount = Convert.ToString(CutPiece - threadNum);
- //// phosphatePiece = CutPiece - threadNum;
- ////}
- //result.ColShft = UserInfo.GetUserOrder();
- //result.ColGroup = UserInfo.GetUserGroup();
- //result.ColUser = UserInfo.GetUserName();
- //result.ColTime = DateTime.Now.ToString("yyyy-MM-dd");
- //if (row != null)
- //{
- // result.IsSpray = row.Cells["IfOutCopper"].Value.ToString();
- //}
- //this.phosphateContro1.Value = result;
- }
- private void DoClean()
- {
- numPieces.Value = "0";
- txtEmbossed.Text = "";
- adhesion.Text = "";
- anti.Text = "";
- reaction.Text = "";
- surface.Text = "";
- producer.Text = "";
- Operator.Text = "";
- group.Text = "";
- user.Text = "";
- txtSpray.Text = "";
- sprayCount.Value = "0";
- Memo.Text = "";
- }
- /// <summary>
- /// 保存实绩
- /// </summary>
- private void DoSave()
- {
- ultraGrid2.UpdateData();
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) { MessageUtil.ShowTips("无工单信息!"); return; }
- string zYgNo = row.Cells["HeatPlanNo"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- if (!row.Cells["ZyBillStatus"].Value.ToString().Equals("生产中"))
- {
- MessageUtil.ShowTips("此工单不是生产中,不允许此操作!");
- return;
- }
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("镀铜"))
- //{
- // if (dt.Rows[0]["PLT_CU_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单镀铜工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //else if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("磷化"))
- //{
- // if (dt.Rows[0]["PHOS_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单磷化工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //QueryStatusGd(row.Cells["WoId"].Value.ToString(), row.Cells["ZY_PLAN_ID"].Value.ToString());
- //if (row.Cells["CoatType"].Text.Trim().Equals("磷化"))
- //{
- // DoPhosphatAdd(row);
- //}
- //else if (row.Cells["CoatType"].Text.Trim().Equals("镀铜"))
- //{
- //DoCopperPlanAdd(row);
- //}
- //if (row.Cells["CoatType"].Text.Trim().Equals("/"))
- //{
- // MessageUtil.ShowTips("不需要磷化镀铜!");
- // return;
- //}
- DoPhosphatAdd(row);
- }
- /// <summary>
- /// 保存磷化
- /// </summary>
- private void DoPhosphatAdd(UltraGridRow row)
- {
- string SelectCount = "0";
- string datetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- // this.phosphateContro1.UpdateData();
- if (ValidInput1())
- {
- string Adhesion = "";
- string SurfaceCondition = "";
- string IsSpray = "";
- PhosphateResult result = new PhosphateResult();
- Adhesion = adhesion.Value == "1" ? "1" : "0";
- SurfaceCondition = surface.Value == "1" ? "1" : "0";
- result.WoId = row.Cells["WoId"].Text.ToString();
- result.PlanNo = row.Cells["HeatPlanNo"].Text.ToString();
- result.PlineCode = row.Cells["PlineCode"].Text.ToString();
- result.JudgeStoveNo = row.Cells["JudgeStoveNo"].Text.ToString();
- result.BatchNo = row.Cells["BatchNo"].Text.ToString();
- IsSpray = spray.Value == "1" ? "1" : "0";
- result.ColCount = numPieces.Value.ToString();
- result.Remark = Memo.Text;
- result.ColOperator = Operator.Text.ToString();
- result.ColGroup = group.Value.ToString();
- result.ColShft = shift.Value.ToString();
- result.MembranceThick = txtEmbossed.Text == "" ? "合格" : txtEmbossed.Text;
- result.Adhesion = ultraTabPageControl9.Text;
- result.AntiCorrosion = anti.Text == "" ? "合格" : anti.Text;
- result.ReactionTime = reaction.Text == "" ? "合格" : reaction.Text;
- result.Producer = producer.Text;
- result.ProducerTime = ProTime.Value.ToString();
- result.ColUser = user.Text.ToString();
- result.SprayCount = sprayCount.Value.ToString();
- result.ColTime = dateTime.Value.ToString();
- result.SprayContent = txtSpray.Text.ToString();
- result.CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- result.Remark = Memo.Text.ToString();
- //result.IfAllOutWork = row.Cells["IF_ALL_OUT_WORK"].Text.ToString();
- //result.WoId = row.Cells["WoId"].Text.ToString();
- ArrayList list2 = new ArrayList();
- list2.Add(Adhesion);
- list2.Add(SurfaceCondition);
- list2.Add(IsSpray);
- ArrayList list1 = new ArrayList();
- foreach (UltraGridRow ugr in ultraGrid2.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHECK"].Text) == true)
- {
- UltraGridRow urglh = ultraGrid4.ActiveRow;
- //if (urglh == null) { MessageUtil.ShowTips("无镀铜/磷化实绩!"); return; }
- if (ugr.Cells["ITEM_NO"].Text.Equals(""))
- {
- MessageUtil.ShowTips("请选择检测项目!");
- return;
- }
- if (ugr.Cells["DOSAGE"].Text.Equals(""))
- {
- MessageUtil.ShowTips("请输入加药量!");
- return;
- }
- if (ugr.Cells["TEMPERATURE"].Text.Equals(""))
- {
- MessageUtil.ShowTips("请输入检测温度!");
- return;
- }
- SelectCount = "1";
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["SEQ_NO"].Text.ToString());
- list.Add(ugr.Cells["ITEM_NO"].Value.ToString());
- list.Add(ugr.Cells["TEST_RESULT_F"].Text.ToString());
- list.Add(ugr.Cells["TEST_RESULT_T"].Text.ToString());
- list.Add(ugr.Cells["DOSAGE"].Value.ToString());
- list.Add(ugr.Cells["TEMPERATURE"].Value.ToString());
- list.Add(ugr.Cells["DETAIL_NO"].Text.ToString());
- list1.Add(list);
- }
- }
- // if (SelectCount == 0) { MessageUtil.ShowTips("请选择检测项目!"); return; }
- //double PlnCount = 0;//计划个数
- //double CutCount = 0;//实际个数
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPlanJg", new Object[] { row.Cells["WoId"].Text.ToString() }, ob);
- //if (dt.Rows.Count > 0)
- //{
- // PlnCount = Double.Parse(dt.Rows[0]["PHOS_PLN_NUM"].ToString());
- // CutCount = Double.Parse(dt.Rows[0]["PHOS_OK_NUM"].ToString());
- //}
- //// + Double.Parse(numQualified.Value.ToString())
- //if (CutCount > PlnCount)
- //{
- // if (MessageUtil.ShowYesNoAndQuestion("实际磷化个数超过计划磷化个数是否新增!") == DialogResult.No) { return; }
- //}
- if (!row.Cells["Ifsplit"].Value.Equals("1"))
- {
- if (Convert.ToInt32(result.ColCount) > CutPiece)
- {
- MessageUtil.ShowTips("磷化个数大于加工最大可切个数!");
- return;
- }
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否保存?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "addPhosphateResult";
- ccp.ServerParams = new object[] { result, list1, Process, PbGx, list2, SelectCount, row.Cells["WoId"].Text.ToString() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("新增成功!"))
- {
- QuerySinglePlan();
- }
- }
-
- }
- /// <summary>
- /// 验证格试
- /// </summary>
- public bool ValidInput1()
- {
- //bool p = true;
- if (Convert.ToInt32(numPieces.Value)<=0)
- {
- MessageBox.Show("个数 请输入整数", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- //if (txtEmbossed.Value==null||!StringUtil.IsInt(txtEmbossed.Value.ToString()))
- //{
- // MessageBox.Show("膜厚 请输入整数", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- // return false;
- //}
- //if (anti.Value==null||!StringUtil.IsInt(anti.Value.ToString()))
- //{
- // MessageBox.Show("耐蚀性 请输入整数", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- // return false;
- //}
- //if (reaction.Value==null||!StringUtil.IsInt(reaction.Value.ToString()))
- //{
- // MessageBox.Show("反应时间 请输入整数", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- // return false;
- //}
- //if (spray.Value.Equals("1"))
- //{
- // if (!StringUtil.IsInt(sprayCount.Value.ToString()))
- // {
- // MessageBox.Show("喷标个数 请输入整数", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- // return false;
- // }
- //}
- if (Operator.Value == null || Operator.Value.Equals(""))
- {
- MessageBox.Show("请选择操作工", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- if (shift.Value == null || shift.Value.Equals(""))
- {
- MessageBox.Show("请选择班次", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return false;
- }
- return true;
- }
- /// <summary>
- /// 保存镀铜
- /// </summary>
- private void DoCopperPlanAdd(UltraGridRow row)
- {
-
- string SelectCount ="0";
- string datetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- //this.phosphateContro1.UpdateData();
- if (ValidInput1())
- {
- string Adhesion = "";
- string SurfaceCondition = "";
- string IsSpray = "";
- PhosphateResult result = new PhosphateResult();
- Adhesion = adhesion.Value == "0" ? "0" : "1";
- SurfaceCondition = surface.Value == "0" ? "0" : "1";
- result.WoId = row.Cells["WoId"].Text.ToString();
- result.PlanNo = row.Cells["HeatPlanNo"].Text.ToString();
- result.PlineCode = row.Cells["PlineCode"].Text.ToString();
- result.JudgeStoveNo = row.Cells["JudgeStoveNo"].Text.ToString();
- result.BatchNo = row.Cells["BatchNo"].Text.ToString();
- IsSpray = spray.Value == "1" ? "1" : "0";
- result.ColCount = numPieces.Value.ToString();
- result.Remark = Memo.Text;
- result.ColGroup = group.Value.ToString();
- result.ColShft = shift.Value.ToString();
- result.MembranceThick = txtEmbossed.Text;
- result.Adhesion = ultraTabPageControl9.Text;
- result.AntiCorrosion = anti.Text;
- result.ReactionTime = reaction.Text;
- result.SurfaceCondition = surface.Value.ToString();
- result.Producer = producer.Text;
- result.ProducerTime = ProTime.Value.ToString();
- result.ColUser = user.Text.ToString();
- result.SprayCount = sprayCount.Value.ToString();
- result.ColTime = dateTime.Value.ToString();
- result.SprayContent = txtSpray.Text.ToString();
- result.Remark = Memo.Text.ToString();
- ArrayList list2 = new ArrayList();
- list2.Add(Adhesion);
- list2.Add(SurfaceCondition);
- list2.Add(IsSpray);
- ArrayList list1 = new ArrayList();
- foreach (UltraGridRow ugr in ultraGrid2.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHECK"].Text) == true)
- {
- UltraGridRow urgdt = ultraGrid5.ActiveRow;
- if (urgdt == null) { MessageUtil.ShowTips("无镀铜实绩!"); return; }
- if (ugr.Cells["ITEM_NO"].Text.Equals(""))
- {
- MessageUtil.ShowTips("请选择检测项目!");
- return;
- }
- if (ugr.Cells["DOSAGE"].Text.Equals(""))
- {
- MessageUtil.ShowTips("请输入加药量!");
- return;
- }
- if (ugr.Cells["TEMPERATURE"].Text.Equals(""))
- {
- MessageUtil.ShowTips("请输入检测温度!");
- return;
- }
- SelectCount = "1";
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["SEQ_NO"].Text.ToString());
- list.Add(ugr.Cells["ITEM_NO"].Value.ToString());
- list.Add(ugr.Cells["TEST_RESULT_F"].Text.ToString());
- list.Add(ugr.Cells["TEST_RESULT_T"].Text.ToString());
- list.Add(ugr.Cells["DOSAGE"].Text.ToString());
- list.Add(ugr.Cells["TEMPERATURE"].Text.ToString());
- list.Add(ugr.Cells["DETAIL_NO"].Text.ToString());
- list.Add(urgdt.Cells["RESULT_NO"].Text.ToString());
- list.Add(row.Cells["WoId"].Text.ToString());
- list.Add(row.Cells["ZY_PLAN_ID"].Text.ToString());
- list1.Add(list);
- }
- }
- //if (SelectCount == 0) { MessageUtil.ShowTips("请选择检测项目!"); return; }
- double PlnCount = 0;//计划个数
- double CutCount = 0;//实际个数
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPlanJg", new Object[] { row.Cells["ZY_PLAN_ID"].Text.ToString() }, ob);
- if (dt.Rows.Count > 0)
- {
- PlnCount = Double.Parse(dt.Rows[0]["PLT_PLN_NUM"].ToString());
- CutCount = Double.Parse(dt.Rows[0]["PLT_CU_OK_NUM"].ToString());
- }
- // + Double.Parse(numQualified.Value.ToString())
- if (CutCount > PlnCount)
- {
- if (MessageUtil.ShowYesNoAndQuestion("实际镀铜个数超过计划镀铜个数是否新增!") == DialogResult.No) { return; }
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否保存?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "addCopperPlantResult";
- ccp.ServerParams = new object[] { result, list1, Process, PbGx, list2, SelectCount };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("镀铜成功!"))
- {
- QuerySinglePlan();
- }
- }
- }
- /// <summary>
- /// 修改
- /// </summary>
- private void DoUpdate()
- {
- ultraGrid2.UpdateData();
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) { MessageUtil.ShowTips("无工单信息!"); return; }
- string zYgNo = row.Cells["HeatPlanNo"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- if (!row.Cells["ZyBillStatus"].Value.ToString().Equals("生产中"))
- {
- MessageUtil.ShowTips("此工单不是生产中,不允许此操作!");
- return;
- }
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("镀铜"))
- //{
- // if (dt.Rows[0]["PLT_CU_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单镀铜工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //else if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("磷化"))
- //{
- // if (dt.Rows[0]["PHOS_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单磷化工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //QueryStatusGd(row.Cells["WoId"].Value.ToString(), row.Cells["ZY_PLAN_ID"].Value.ToString());
- if (row.Cells["CoatType"].Text.Trim().Equals("/"))
- {
- MessageUtil.ShowTips("不需要磷化镀铜!");
- return;
- }
- DoPhosphatUpdate(row);
- }
- /// <summary>
- /// 磷化修改
- /// </summary>
- /// <param name="row"></param>
- private void DoPhosphatUpdate(UltraGridRow row)
- {
- //phosphateContro1.UpdateData();
- UltraGridRow rgu = ultraGrid4.ActiveRow;
- if (rgu == null) { MessageUtil.ShowTips("无磷化实绩!"); return; }
- //if(rgu.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("是"))
- //{
- // MessageUtil.ShowTips("此工序已经离线,不允许此操作!");
- // return;
- //}
- string date=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- //if (this.phosphateContro1.ValidInput1())
- //{
-
- PhosphateResult result = new PhosphateResult();
- result.Adhesion = adhesion.Value == "0" ? "0" : "1";
- result.SurfaceCondition = surface.Value == "0" ? "0" : "1";
- result.WoId = row.Cells["WoId"].Text.ToString();
- result.PlanNo = row.Cells["HeatPlanNo"].Text.ToString();
- result.PlineCode = row.Cells["PlineCode"].Text.ToString();
- result.JudgeStoveNo = row.Cells["JudgeStoveNo"].Text.ToString();
- result.BatchNo = row.Cells["BatchNo"].Text.ToString();
- result.IsSpray = spray.Value == "1" ? "1" : "0";
- result.ColCount = numPieces.Value.ToString();
- result.ColOperator =
- result.Remark = Memo.Text;
- result.ColGroup = group.Value.ToString();
- result.ColShft = shift.Value.ToString();
- result.MembranceThick = txtEmbossed.Text;
- result.Adhesion = ultraTabPageControl9.Text;
- result.AntiCorrosion = anti.Text;
- result.ReactionTime = reaction.Text;
- result.SurfaceCondition = surface.Value.ToString();
- result.Producer = producer.Text;
- result.ProducerTime = ProTime.Value.ToString();
- result.ColUser = user.Text.ToString();
- result.SprayCount = sprayCount.Value.ToString();
- result.ColTime = dateTime.Value.ToString();
- result.SprayContent = txtSpray.Text.ToString();
- result.Remark = Memo.Text.ToString();
- //double PlnCount = 0;//计划个数
- //double CutCount = 0;//实际个数
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPlanJg", new Object[] { row.Cells["ZY_PLAN_ID"].Text.ToString() }, ob);
- //if (dt.Rows.Count > 0)
- //{
- // PlnCount = Double.Parse(dt.Rows[0]["PHOS_PLN_NUM"].ToString());
- // CutCount = Double.Parse(dt.Rows[0]["PHOS_OK_NUM"].ToString());
- //}
- //// + Double.Parse(numQualified.Value.ToString())
- //if (CutCount > PlnCount)
- //{
- // if (MessageUtil.ShowYesNoAndQuestion("实际磷化个数超过计划磷化个数是否修改!") == DialogResult.No) { return; }
- //}
- if (MessageUtil.ShowYesNoAndQuestion("是否修改磷化/镀铜实绩?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "updatePhosphateResult";
- ccp.ServerParams = new object[] { result, Process, PbGx, row.Cells["WoId"].Text.Trim() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("修改成功!"))
- {
- QuerySinglePlan();
- }
- //}
- }
- /// <summary>
- /// 镀铜修改
- /// </summary>
- /// <param name="row"></param>
- private void DoCopperPlanUpdate(UltraGridRow row)
- {
- //phosphateContro1.UpdateData();
- UltraGridRow rgu = ultraGrid5.ActiveRow;
- if (rgu == null) { MessageUtil.ShowTips("无镀铜实绩!"); return; }
- if (rgu.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("是"))
- {
- MessageUtil.ShowTips("此工序已经离线,不允许此操作!");
- return;
- }
- if (row.Cells["ZyBillStatus"].Value.ToString() == "生产完成")
- {
- MessageUtil.ShowTips("此炉次计划整体已生产完成,不允许此操作!");
- return;
- }
- string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- //if (this.phosphateContro1.ValidInput1())
- //{
- PhosphateResult result = new PhosphateResult();
- result.Adhesion = adhesion.Value == "0" ? "0" : "1";
- result.SurfaceCondition = surface.Value == "0" ? "0" : "1";
- result.WoId = row.Cells["WoId"].Text.ToString();
- result.PlanNo = row.Cells["HeatPlanNo"].Text.ToString();
- result.PlineCode = row.Cells["PlineCode"].Text.ToString();
- result.JudgeStoveNo = row.Cells["JudgeStoveNo"].Text.ToString();
- result.BatchNo = row.Cells["BatchNo"].Text.ToString();
- result.IsSpray = spray.Value == "1" ? "1" : "0";
- result.ColCount = numPieces.Value.ToString();
- result.Remark = Memo.Text;
- result.ColGroup = group.Value.ToString();
- result.ColShft = shift.Value.ToString();
- result.MembranceThick = txtEmbossed.Text;
- result.Adhesion = ultraTabPageControl9.Text;
- result.AntiCorrosion = anti.Text;
- result.ReactionTime = reaction.Text;
- result.SurfaceCondition = surface.Value.ToString();
- result.Producer = producer.Text;
- result.ProducerTime = ProTime.Value.ToString();
- result.ColUser = user.Text.ToString();
- result.SprayCount = sprayCount.Value.ToString();
- result.ColTime = dateTime.Value.ToString();
- result.SprayContent = txtSpray.Text.ToString();
- result.Remark = Memo.Text.ToString();
- double PlnCount = 0;//计划个数
- double CutCount = 0;//实际个数
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPlanJg", new Object[] { row.Cells["ZY_PLAN_ID"].Text.ToString() }, ob);
- if (dt.Rows.Count > 0)
- {
- PlnCount = Double.Parse(dt.Rows[0]["PLT_PLN_NUM"].ToString());
- CutCount = Double.Parse(dt.Rows[0]["PLT_CU_OK_NUM"].ToString());
- }
- // + Double.Parse(numQualified.Value.ToString())
- if (CutCount > PlnCount)
- {
- if (MessageUtil.ShowYesNoAndQuestion("实际镀铜个数超过计划镀铜个数是否修改!") == DialogResult.No) { return; }
- }
- if (MessageUtil.ShowYesNoAndQuestion("是否修改镀铜实绩?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "updateCopperPlanResult";
- ccp.ServerParams = new object[] { result, Process, PbGx };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("修改镀铜成功!"))
- {
- QuerySinglePlan();
- }
- //}
- }
- /// <summary>
- /// 删除记录
- /// </summary>
- private void DoDelete()
- {
- //phosphateContro1.UpdateData();
- ultraGrid2.UpdateData();
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) { MessageUtil.ShowTips("无工单信息!"); return; }
- if (!row.Cells["ZyBillStatus"].Value.ToString().Equals("生产中"))
- {
- MessageUtil.ShowTips("此工单不是生产中,不允许此操作!");
- return;
- }
- string zYgNo = row.Cells["HeatPlanNo"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("镀铜"))
- //{
- // if (dt.Rows[0]["PLT_CU_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单镀铜工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- //else if (dt.Rows[0]["COAT_TYPE"].ToString().Equals("磷化"))
- //{
- // if (dt.Rows[0]["PHOS_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单磷化工序点已结炉,不允许此操作!");
- // return;
- // }
- //}
- int DeleteCount = 0;
- ArrayList list1 = new ArrayList();
- UltraGridRow rowMat = ultraGrid4.ActiveRow;
- if (rowMat == null) { MessageUtil.ShowTips("无磷化/镀铜实绩记录!"); return; }
- if (rowMat.Cells["CONFIRM"].Value.ToString().Equals("1"))
- {
- MessageUtil.ShowTips("选中的磷化实绩已经确认,不允许删除!");
- return;
- }
- foreach (UltraGridRow ugr in ultraGrid4.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHC"].Text) == true)
- {
- if (ugr.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("是"))
- {
- MessageUtil.ShowTips("此工序已经离线,不允许此操作!");
- return;
- }
- if (ugr.Cells["OFF_NUM"].Text != "0" && ugr.Cells["OFF_NUM"].Text != "")
- {
- MessageUtil.ShowTips("存在离线支数,不允许此操作!");
- return;
- }
- DeleteCount += 1;
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["RESULT_NO"].Text.ToString());
- list.Add(ugr.Cells["COL_COUNT"].Text.ToString());
- list1.Add(list);
- }
- }
- if (DeleteCount == 0) { MessageUtil.ShowTips("请选择要删除的记录!"); return; }
- if (MessageUtil.ShowYesNoAndQuestion("是否删除?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "deletePhosphateResult";
- ccp.ServerParams = new object[] { list1, woId };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("删除成功!"))
- {
- QuerySinglePlan();
- }
- }
- /// <summary>
- /// 修改检测记录
- /// </summary>
- /// <param name="row"></param>
- private void DoInsUpdate()
- {
- ultraGrid2.UpdateData();
- UltraGridRow rgu = ultraGrid2.ActiveRow;
- if (rgu == null) { MessageUtil.ShowTips("无检验记录!"); return; }
- int update = 0;
- ArrayList list1 = new ArrayList();
- for (int i = 0; i < ultraGrid2.Rows.Count; i++)
- {
- UltraGridRow checkrow = ultraGrid2.Rows[i];
- if (Convert.ToBoolean(checkrow.Cells["CHECK"].Text) == true)
- {
- update += 1;
- ArrayList list = new ArrayList();
- list.Add(checkrow.Cells["ITEM_NO"].Value.ToString());
- list.Add(checkrow.Cells["TEST_RESULT_F"].Text.Trim());
- list.Add(checkrow.Cells["TEST_RESULT_T"].Text.Trim());
- list.Add(checkrow.Cells["DOSAGE"].Text.Trim());
- list.Add(checkrow.Cells["TEMPERATURE"].Text.Trim());
- list.Add(checkrow.Cells["SEQ_NO"].Text.Trim());
- list.Add(checkrow.Cells["ZY_PLAN_ID"].Text.Trim());
- list.Add(checkrow.Cells["DETAIL_NO"].Text.Trim());
- list.Add(checkrow.Cells["RESULT_NO"].Text.Trim());
- list1.Add(list);
- }
- }
- if (update == 0) { MessageUtil.ShowTips("请选择抽检记录!"); return; }
- if (MessageUtil.ShowYesNoAndQuestion("是否修改检测记录?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "updatePhosphateResultD";
- ccp.ServerParams = new object[] { list1 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("修改检验记录成功!"))
- {
- QuerySinglePlan();
- }
- } /// <summary>
- /// 删除检测记录
- /// </summary>
- /// <param name="row"></param>
- private void DoInsDelete()
- {
- UltraGridRow rgu = ultraGrid2.ActiveRow;
- if (rgu == null) { MessageUtil.ShowTips("无检验记录!"); return; };
- int update = 0;
- ArrayList list1 = new ArrayList();
- for (int i = 0; i < ultraGrid2.Rows.Count; i++)
- {
- UltraGridRow checkrow = ultraGrid2.Rows[i];
- if (Convert.ToBoolean(checkrow.Cells["CHECK"].Text) == true)
- {
- update += 1;
- ArrayList list = new ArrayList();
- list.Add(checkrow.Cells["DETAIL_NO"].Text.Trim());
- list.Add(checkrow.Cells["RESULT_NO"].Text.Trim());
- list1.Add(list);
- }
- }
- if (update == 0) { MessageUtil.ShowTips("请选择抽检记录!"); return; }
- if (MessageUtil.ShowYesNoAndQuestion("是否删除检测记录?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- try
- {
- this.Cursor = Cursors.WaitCursor; //控制鼠标的样式为等待
- if (Constant.WaitingForm == null)
- {
- Constant.WaitingForm = new WaitingForm();
- }
- Constant.WaitingForm.ShowToUser = true;
- Constant.WaitingForm.Show();
- Constant.WaitingForm.Update();
- ccp.ServerName = "com.steering.mes.mcp.coup.PhosphateResultService";
- ccp.MethodName = "deletePhosphateResultD";
- ccp.ServerParams = new object[] { list1 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- catch (Exception ex)
- {
- this.Cursor = Cursors.Default;
- Constant.WaitingForm.ShowToUser = false;
- Constant.WaitingForm.Close();
- Constant.WaitingForm = null;
- }
- if (ccp.ReturnCode == -1) return;
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("删除检验记录成功!"))
- {
- QuerySinglePlan();
- }
- }
- private void ultraGrid2_AfterRowInsert(object sender, RowEventArgs e)
- {
- e.Row.Cells["SEQ_NO"].Value = (e.Row.Index == 0 ? 1 : Convert.ToInt32(((Infragistics.Win.UltraWinGrid.UltraGrid)sender).Rows[e.Row.Index - 1].Cells["SEQ_NO"].Value) + 1);
- }
- private void ultraGrid2_CellChange(object sender, CellEventArgs e)
- {
- ultraGrid2.UpdateData();
- UltraGridRow rgu = ultraGrid2.ActiveRow;
- if (rgu == null) return;
- if (e.Cell.Column.Key.Equals("ITEM_NO"))
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPhosphateItem1", new object[] { rgu.Cells["ITEM_NO"].Value }, this.ob);
- e.Cell.Row.Cells["SETTING_TEMPERATURE"].Value = dt.Rows[0]["SETTING_TEMPERATURE"].ToString();//设置温度
- e.Cell.Row.Cells["SPAN"].Value = dt.Rows[0]["SPAN"].ToString();//范围
- }
- }
- /// <summary>
- /// 按回车键触发查询按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ContPublic_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- {
- QuerySinglePlan();
- }
- }
- private void ultraGrid4_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow row = ultraGrid4.ActiveRow;
- if (row != null)
- {
- string zYgNo = row.Cells["RESULT_NO"].Value.ToString();
- string woId = row.Cells["WO_ID"].Value.ToString();
- //if (row.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("/"))
- //{
- // this.phosphateContro1.Value.Adhesion = row.Cells["ADHESION"].Text.Trim() == "合格" ? "0" : "1";
- // this.phosphateContro1.Value.AntiCorrosion = row.Cells["ANTI_CORROSION"].Text.Trim();
- // this.phosphateContro1.Value.ColCount = row.Cells["COL_COUNT"].Text.Trim();
- // //this.phosphateContro1.Value.ColGroup = row.Cells["COL_GROUP"].Value.ToString();
- // this.phosphateContro1.Value.ColOperator = row.Cells["COL_OPERATOR"].Text.Trim();
- // //this.phosphateContro1.Value.ColShft = row.Cells["COL_SHIFT"].Value.ToString();
- // this.phosphateContro1.Value.ColUser = row.Cells["COL_USER"].Text.Trim();
- // this.phosphateContro1.Value.IsSpray = row.Cells["IS_SPRAY"].Text.Trim();
- // this.phosphateContro1.Value.SprayContent = row.Cells["SPRAY_CONTENT"].Text.Trim();
- // this.phosphateContro1.Value.SprayCount = row.Cells["SPRAY_COUNT"].Text.Trim();
- // this.phosphateContro1.Value.SurfaceCondition = row.Cells["SURFACE_CONDITION"].Text.Trim() == "合格" ? "0" : "1";
- // this.phosphateContro1.Value.Producer = row.Cells["PRODUCER"].Text.Trim();
- // this.phosphateContro1.Value.ProducerTime = row.Cells["PRODUCER_TIME"].Text.Trim();
- // this.phosphateContro1.Value.Remark = row.Cells["REMARK"].Text.Trim();
- // this.phosphateContro1.Value.MembranceThick = row.Cells["MEMBRANCE_THICK"].Text.Trim();
- // this.phosphateContro1.Value.ReactionTime = row.Cells["REACTION_TIME"].Text.Trim();
- // this.phosphateContro1.Value.ResultNo = row.Cells["RESULT_NO"].Text.Trim();
- // this.phosphateContro1.UpdateData();
- //}
- getCoupPhosphateResultD(zYgNo, woId);
- }
- else
- {
- this.initControl();
- }
- }
- //private void ultraGrid5_AfterRowActivate(object sender, EventArgs e)
- //{
- // UltraGridRow row = ultraGrid5.ActiveRow;
- // if (row != null)
- // {
- // string zYgNo = row.Cells["RESULT_NO"].Value.ToString();
- // string woId = row.Cells["WO_ID"].Value.ToString();
- // if (row.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("否"))
- // {
- // this.phosphateContro1.Value.Adhesion = row.Cells["ADHESION"].Text.Trim() == "合格" ? "0" : "1";
- // this.phosphateContro1.Value.AntiCorrosion = row.Cells["ANTI_CORROSION"].Text.Trim();
- // this.phosphateContro1.Value.ColCount = row.Cells["COL_COUNT"].Text.Trim();
- // this.phosphateContro1.Value.ColGroup = row.Cells["COL_GROUP"].Value.ToString();
- // this.phosphateContro1.Value.ColOperator = row.Cells["COL_OPERATOR"].Text.Trim();
- // this.phosphateContro1.Value.ColShft = row.Cells["COL_SHIFT"].Value.ToString();
- // this.phosphateContro1.Value.ColUser = row.Cells["COL_USER"].Text.Trim();
- // this.phosphateContro1.Value.IsSpray = row.Cells["IS_SPRAY"].Text.Trim();
- // this.phosphateContro1.Value.SprayContent = row.Cells["SPRAY_CONTENT"].Text.Trim();
- // this.phosphateContro1.Value.SprayCount = row.Cells["SPRAY_COUNT"].Text.Trim();
- // this.phosphateContro1.Value.SurfaceCondition = row.Cells["SURFACE_CONDITION"].Text.Trim() == "合格" ? "0" : "1";
- // this.phosphateContro1.Value.Producer = row.Cells["PRODUCER"].Text.Trim();
- // this.phosphateContro1.Value.ProducerTime = row.Cells["PRODUCER_TIME"].Text.Trim();
- // this.phosphateContro1.Value.Remark = row.Cells["REMARK"].Text.Trim();
- // this.phosphateContro1.Value.MembranceThick = row.Cells["MEMBRANCE_THICK"].Text.Trim();
- // this.phosphateContro1.Value.ReactionTime = row.Cells["REACTION_TIME"].Text.Trim();
- // this.phosphateContro1.Value.ResultNo = row.Cells["RESULT_NO"].Text.Trim();
- // this.phosphateContro1.UpdateData();
- // }
- // getCoupPhosphateResultD(zYgNo, woId);
- // }
- // else
- // {
- // this.initControl();
- // }
- //}
- private void chkStarts_CheckedChanged(object sender, EventArgs e)
- {
- if (chkStarts.Checked) { cmbStarts.Enabled = true; } else { cmbStarts.Enabled = false; }
- if (chkJuNo.Checked) { txtJudgeStoveNO.Enabled = true; } else { txtJudgeStoveNO.Enabled = false; }
- if (chkPlnNo.Checked) { txtPlnNo.Enabled = true; } else { txtPlnNo.Enabled = false; }
- if (chkwoId.Checked) { txtWoId.Enabled = true; } else { txtWoId.Enabled = false; }
- }
- private void craftImg_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) return;
- string orderNo = row.Cells["OrderNoSeq"].Text.ToString();
- string strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilCouplingProcess2.cpt"
- + "&ORDER_NO=" + orderNo;
- FrmRepExcel down = new FrmRepExcel(ob, strurl);
- down.Text = "接箍二级工艺";
- down.Visible = false;
- down.Size = new Size(740, this.Height);
- down.WindowState = FormWindowState.Maximized;
- down.ShowDialog();
- }
- private void Operator_ValueChanged(object sender, EventArgs e)
- {
- if (Operator.Value!=null&&Operator.Value != "")
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryMemo", new object[] { Operator.Value }, this.ob);
- if (dt.Rows.Count > 0)
- {
- if (dt.Rows[0]["MEMO"].ToString()=="甲")
- {
- group.Value = "1";
- }else if(dt.Rows[0]["MEMO"].ToString() == "乙")
- {
- group.Value ="2";
- }
- else if (dt.Rows[0]["MEMO"].ToString() == "丙")
- {
- group.Value = "3";
- }
- else if (dt.Rows[0]["MEMO"].ToString() == "丁")
- {
- group.Value = "4";
- }
- }
- }
- }
- private void spray_ValueChanged(object sender, EventArgs e)
- {
- if (spray.Text.Equals("是"))
- {
- sprayCount.Enabled = true;
- txtSpray.Enabled = true;
- }
- else
- {
- sprayCount.Enabled = false;
- txtSpray.Enabled = false;
- }
- }
- private void numPieces_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numPieces.SelectAll));
- }
- private void sprayCount_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.sprayCount.SelectAll));
- }
- private void numPieces_ValueChanged(object sender, EventArgs e)
- {
- if (spray.Text.Equals("是"))
- {
- if (numPieces.Text == null || numPieces.Text.Equals(""))
- {
- sprayCount.Value = "0";
- }
- else
- {
- sprayCount.Value = numPieces.Value.ToString();
- }
- }
- else
- {
- sprayCount.Value = "0";
- }
- }
- //private void ultraGrid4_CellChange(object sender, CellEventArgs e)
- //{
- // UltraGridRow row = ultraGrid4.ActiveRow;
- // if (row == null) return;
-
- // string zYgNo = row.Cells["RESULT_NO"].Value.ToString();
- // string woId = row.Cells["WO_ID"].Value.ToString();
- // this.phosphateContro1.Value.Adhesion = row.Cells["ADHESION"].Text.Trim() == "合格" ? "0" : "1";
- // this.phosphateContro1.Value.AntiCorrosion = row.Cells["ANTI_CORROSION"].Text.Trim();
- // this.phosphateContro1.Value.ColCount = row.Cells["COL_COUNT"].Text.Trim();
- // //this.phosphateContro1.Value.ColGroup = row.Cells["COL_GROUP"].Value.ToString();
- // this.phosphateContro1.Value.ColOperator = row.Cells["COL_OPERATOR"].Text.Trim();
- // //this.phosphateContro1.Value.ColShft = row.Cells["COL_SHIFT"].Value.ToString();
- // this.phosphateContro1.Value.ColUser = row.Cells["COL_USER"].Text.Trim();
- // this.phosphateContro1.Value.IsSpray = row.Cells["IS_SPRAY"].Text.Trim();
- // this.phosphateContro1.Value.SprayContent = row.Cells["SPRAY_CONTENT"].Text.Trim();
- // this.phosphateContro1.Value.SprayCount = row.Cells["SPRAY_COUNT"].Text.Trim();
- // this.phosphateContro1.Value.SurfaceCondition = row.Cells["SURFACE_CONDITION"].Text.Trim() == "合格" ? "0" : "1";
- // this.phosphateContro1.Value.Producer = row.Cells["PRODUCER"].Text.Trim();
- // this.phosphateContro1.Value.ProducerTime = row.Cells["PRODUCER_TIME"].Text.Trim();
- // this.phosphateContro1.Value.Remark = row.Cells["REMARK"].Text.Trim();
- // this.phosphateContro1.Value.MembranceThick = row.Cells["MEMBRANCE_THICK"].Text.Trim();
- // this.phosphateContro1.Value.ReactionTime = row.Cells["REACTION_TIME"].Text.Trim();
- // this.phosphateContro1.Value.ResultNo = row.Cells["RESULT_NO"].Text.Trim();
- // this.phosphateContro1.UpdateData();
-
- //}
- }
- }
|