| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685 |
- 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 Core.StlMes.Client.Mcp.Common;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Control;
- using Infragistics.Win.UltraWinGrid;
- 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.Mes.Client.Comm.Format;
- using Core.StlMes.Client.Mcp.Report;
- using System.Net;
- namespace Core.StlMes.Client.Mcp
- {
- public partial class FrmInspection : FrmBase
- {
- private string departm = "";//获取部门ID
- private string[] plineCode = null;//获取产线代码
- private string TsGx = "";//探伤工序
- private string TsName = "";//探伤名称
- public string LiXian = "";
- private string StrMemo = "";//备注
- private string[] plineCodes;
- private int CutPiece = 0;
- private int threadNum = 0;
- ArrayList listF = new ArrayList();//废品
- ArrayList listB = new ArrayList();//不合格
- public FrmInspection()
- {
- InitializeComponent();
- this.IsLoadUserView = true;
- }
- //protected override void OnLoad(EventArgs e)
- //{
- //base.OnLoad(e);
- ////禁控件过滤
- //this.coupWoIdPlanControl1.Grid.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- ////设置计划区控件只读
- ////this.coupWoIdPlanControl1.SetAllColumnsActiveOnly();
- //coupWoIdPlanControl1.Ob = this.ob;
- //}
- private void FrmInspection_Load(object sender, EventArgs e)
- {
- EntityHelper.ShowGridCaption<PlnZyJgWorkbillEntity>(ultraGridWoId.DisplayLayout.Bands[0]);
- EntityHelper.ShowGridCaption<PlnZyJgWorkbillEntity>(ultraGrid2.DisplayLayout.Bands[0]);
- departm = UserInfo.GetDeptid();
- //plineCode = McpBaseHelper.GetPCodePline(departm, this.ob);
- plineCodes = comm.GetPlineCode(this.ValidDataPurviewIds, "H", ob);
- ProTime.Value = DateTime.Today;
- //获取工序
- DataTable dt2 = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryGX", new object[] { "700307" }, this.ob);
- if (dt2.Rows.Count > 0)
- {
- TsGx = dt2.Rows[0]["BASECODE"].ToString();
- TsName = dt2.Rows[0]["BASENAME"].ToString();
- }
- txtBC.Value = this.UserInfo.GetUserOrder();
- txtBz.Value = this.UserInfo.GetUserGroup();
- //txtUser.Text = this.UserInfo.GetUserName();
- ////获取废品原因
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultFp", new object[] { "7010" }, this.ob);
- //cmbReason.DataSource = dt;
- //cmbReason.ValueMember = "BASENAME";
- //YdmBaseClass.SetComboItemHeight(cmbReason);
- ////获取不合格原因
- //DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultFp", new object[] { "7011" }, this.ob);
- //UncmbReason.DataSource = dt1;
- //UncmbReason.ValueMember = "BASENAME";
- //YdmBaseClass.SetComboItemHeight(UncmbReason);
- //获取探伤标准
- DataTable dt3 = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultFp", new object[] { "7001" }, this.ob);
- cmbStandard.DataSource = dt3;
- cmbStandard.ValueMember = "BASENAME";
- YdmBaseClass.SetComboItemHeight(cmbStandard);
- cmbStandard.SelectedIndex = 0;
- //获取试片类型
- DataTable dt4 = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultFp", new object[] { "7008" }, this.ob);
- CmbType.DataSource = dt4;
- CmbType.ValueMember = "BASENAME";
- YdmBaseClass.SetComboItemHeight(CmbType);
- CmbType.SelectedIndex = 0;
- //获取磁粉种类
- DataTable dt5 = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultFp", new object[] { "7009" }, this.ob);
- cmbPowder.DataSource = dt5;
- cmbPowder.ValueMember = "BASENAME";
- YdmBaseClass.SetComboItemHeight(cmbPowder);
- cmbPowder.SelectedIndex = 0;
-
- //获取试片磁痕显示
- DataTable dt6 = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultFp", new object[] { "7028" }, this.ob);
- tXtMagnetic.DataSource = dt6;
- tXtMagnetic.ValueMember = "BASENAME";
- YdmBaseClass.SetComboItemHeight(tXtMagnetic);
- tXtMagnetic.SelectedIndex = 0;
- //获取检测位置及方向
- DataTable dt7 = ServerHelper.GetData("com.steering.mes.mcp.coup.CoupCutService.getCutResultFp", new object[] { "7027" }, this.ob);
- txtPosi.DataSource = dt7;
- txtPosi.ValueMember = "BASENAME";
- YdmBaseClass.SetComboItemHeight(txtPosi);
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "DoQuery":
- QuerySinglePlan();//查询
- break;
- case "DoSave":
- DoSave();//新增
- break;
- case "DoDelete":
- DoDelete();//删除
- break;
- case "DoUpdate":
- DoUpdate();//更新
- 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()
- {
- ultraGrid1.UpdateData();
- UltraGridRow uRow = this.ultraGrid1.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 ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].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.FrmInspection";
- 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()
- {
- ultraGrid1.UpdateData();
- UltraGridRow uRow = this.ultraGrid1.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 ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].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.FrmInspection";
- 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();
- }
- }
- }
- /// <summary>
- /// 离线
- /// </summary>
- private void Offline()
- {
- string _strat = "";
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) return;
- if (row.Cells["ZyBillStatus"].Value.ToString() == "生产完成")
- {
- MessageUtil.ShowTips("此炉次计划整体已生产完成,不允许此操作!");
- return;
- }
- //UltraGridRow row1 = ultraGrid1.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; }
- 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(threadNum) - 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 }, this.ob);
- //if (dt.Rows[0]["DETECT_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return;
- //}
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryCouplingcominfo", new object[] { woId, TsGx }, this.ob);
- //if(dt.Rows[0]["STATION_STATUS"].ToString().Equals("2"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return;
- //}
- //if (row1.Cells["OFF_NUM"].Value.ToString()=="")
- //{
- // row1.Cells["OFF_NUM"].Value = "0";
- //}
- //if (int.Parse(row1.Cells["FINAL_QUALIFIED"].Value.ToString()) < int.Parse(LiXian) + int.Parse(row1.Cells["OFF_NUM"].Value.ToString()))
- //{
- // MessageUtil.ShowTips("离线个数不能大于合格个数!");
- // return;
- //}
- 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());
- 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, TsGx ,TsName};
- 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();
- }
- }
- }
- //撤销离线
- private void unOffline()
- {
- ultraGrid1.UpdateData();
- UltraGridRow uRow = this.ultraGrid1.ActiveRow;
- if (uRow == null) { MessageUtil.ShowTips("探伤实绩无数据!"); return; }
- UltraGridRow row = this.ultraGridWoId.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("无工单信息,不允许此操作!");
- }
- if (row.Cells["ZyBillStatus"].Value.ToString() == "生产完成")
- {
- MessageUtil.ShowTips("此炉次计划整体已生产完成,不允许此操作!");
- return;
- }
- 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]["DETECT_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单工序点已结炉,不允许此操作!");
- // return;
- //}
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryCouplingcominfo", new object[] { woId, TsGx }, this.ob);
- //if (dt.Rows[0]["STATION_STATUS"].ToString().Equals("2"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return;
- //}
- //if(!QueryStatusGd(row.Cells["WO_ID"].Value.ToString(), row.Cells["ZY_PLAN_ID"].Value.ToString())) return;
- ArrayList list1 = new ArrayList();
- int UpdaCount = 0;
- foreach (UltraGridRow ugr in ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Text) == true)
- {
- UpdaCount += 1;
- ArrayList list = new ArrayList();
- list.Add(ugr.Cells["RESULT_NO"].Text.ToString());
- list.Add(ugr.Cells["OFF_NUM"].Value.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.CoupCutService";
- ccp.MethodName = "unlixianThreadingResult";
- ccp.ServerParams = new object[] { list1, row.Cells["WoId"].Text.ToString(), TsGx };
- 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 uRow = this.ultraGridWoId.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要结炉的作业工单号!");
- return;
- }
- //string zYgNo = uRow.Cells["ZY_PLAN_ID"].Value.ToString();
- string woId = uRow.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]["DETECT_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点未结炉,不允许此操作!");
- // return;
- //} if (dt.Rows[0]["ZY_BILL_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单状态已生产完成,不允许此操作!");
- // return;
- //}
- //ArrayList list = new ArrayList();
- //list.Add(zYgNo);
- //list.Add(TsGx);
- //list.Add(woId);
- if (MessageUtil.ShowYesNoAndQuestion("是否撤销结炉?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.coup.FrmInspection";
- ccp.MethodName = "undoBeside";
- ccp.ServerParams = new object[] { TsGx,woId };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("撤销结炉成功!"))
- {
- QuerySinglePlan();
- }
- }
- }
- /// <summary>
- /// 结炉
- /// </summary>
- private void DoComplete()
- {
- UltraGridRow uRow = this.ultraGridWoId.ActiveRow;
- if (uRow == null)
- {
- MessageUtil.ShowTips("请选择需要结炉的工单号!");
- return;
- }
- // string zYgNo = uRow.Cells["ZY_PLAN_ID"].Value.ToString();
- string woId = uRow.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]["DETECT_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return;
- //}
- //if (dt.Rows[0]["ZY_BILL_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单状态已生产完成,不允许此操作!");
- // return;
- //}
- //ArrayList list = new ArrayList();
- //list.Add(zYgNo);
- //list.Add(TsGx);
- //list.Add(woId);
- if (MessageUtil.ShowYesNoAndQuestion("是否结炉?") == DialogResult.No)
- {
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "com.steering.mes.mcp.coup.FrmInspection";
- ccp.MethodName = "doBeside";
- ccp.ServerParams = new object[] { TsGx,woId };
- ccp = ob.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode != -1)
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.Equals("结炉成功!"))
- {
- QuerySinglePlan();
- }
- }
- }
- /// <summary>
- /// 修改探伤实绩
- /// </summary>
- private void DoUpdate()
- {
- UltraGridRow urg = this.ultraGrid1.ActiveRow;
- if (urg == null)
- {
- MessageUtil.ShowTips("无探伤实绩,不允许此操作!");
- return;
- }
- if (urg.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("是"))
- {
- MessageUtil.ShowTips("此工序已经离线,不允许此操作!");
- return;
- }
- UltraGridRow row = this.ultraGridWoId.ActiveRow;
- if (row == null)
- {
- MessageUtil.ShowTips("无工单信息,不允许此操作!");
- return;
- }
- //string zYgNo = urg.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]["DETECT_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return;
- //}
- if (!row.Cells["ZyBillStatus"].Value.ToString().Equals("生产中"))
- {
- MessageUtil.ShowTips("此工单状态不是生产中,不允许此操作!");
- return;
- }
- //if(!QueryStatusGd(row.Cells["WO_ID"].Value.ToString(), row.Cells["ZY_PLAN_ID"].Value.ToString())) return;
- string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
- if (Convert.ToInt32(numPieces.Value.ToString()) != Convert.ToInt32(numQualified.Value.ToString()) + Convert.ToInt32(nuQualified.Value.ToString()))
- {
- MessageBox.Show("检验量=一次合格量+不合格量,请查验 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (Convert.ToInt32(nuQualified.Value.ToString()) != Convert.ToInt32(numAmount.Value.ToString()) + Convert.ToInt32(numRejected.Value.ToString()))
- {
- MessageBox.Show("不合格量=修后复探量+废品量,请查验 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- ArrayList list = new ArrayList();
- CouplingInspectionResultEntity sand = new CouplingInspectionResultEntity();
- sand.InspectPieces = Convert.ToDecimal(numPieces.Value.ToString());
- sand.QualiriedPcs = Convert.ToDecimal( numQualified.Value.ToString());
- sand.RejectedPcs = Convert.ToDecimal(numRejected.Value.ToString());
- sand.RejectedReason = cmbReason.Text.Trim();
- sand.UnqualiriedPcs = Convert.ToDecimal(nuQualified.Value.ToString());
- sand.ColOperator = cmbOperator.Text.Trim();
- sand.ColShift = txtBC.Value.ToString();
- sand.ColGroup = txtBz.Value.ToString();
- sand.UpdateName = this.UserInfo.GetUserName();
- sand.UnqualiriedReason = UncmbReason.Text.ToString();
- sand.AmountPcs = Convert.ToDecimal(numAmount.Value.ToString());
- sand.InspStandard = cmbStandard.Text.ToString();
- sand.Memo = txtMemo.Text.ToString();
- sand.MagneticPowder = cmbPowder.Text.ToString();
- sand.SpecimenMagnetic = tXtMagnetic.Text.ToString();
- sand.SpecimenType = CmbType.Text.ToString();
- sand.Concentration = Convert.ToDecimal(numConcentra.Value.ToString());
- sand.CoilIntensity = Convert.ToDecimal(numCoil.Value.ToString());
- sand.CenterIntensity = Convert.ToDecimal(numCenter.Value.ToString());
- sand.Issued = this.UserInfo.GetUserName() + "/MT-Ⅱ";
- sand.Magtimes = MagTimes.Value.ToString();
- //sand.ZyPlanId = urg.Cells["ZY_PLAN_ID"].Text.ToString();
- //sand.PlineCode = urg.Cells["PLINE_CODE"].Text.ToString();
- sand.FinalQualified = Convert.ToInt32(numQualified.Value.ToString()) + Convert.ToInt32(numAmount.Value.ToString());
- sand.UpdateDate = time;
- sand.ResultNo = urg.Cells["RESULT_NO"].Text.ToString();
- list.Add(JSONFormat.Format(sand));
- //sand.WoId = urg.Cells["WO_ID"].Text.ToString();
- //double PlnCount = 0;//计划个数
- //double CutCount = 0;//实际个数
- //DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPlanJg", new Object[] { row.Cells["ZY_PLAN_ID"].Text.ToString() }, ob);
- //if (dt1.Rows.Count > 0)
- //{
- // PlnCount = Double.Parse(dt1.Rows[0]["DETECT_PLN_NUM"].ToString());
- // CutCount = Double.Parse(dt1.Rows[0]["DETECT_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.FrmInspection";
- ccp.MethodName = "updateSandResult";
- ccp.ServerParams = new object[] { list, TsGx, woId };
- 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>
- /// 删除探伤实绩
- /// </summary>
- private void DoDelete()
- {
- ultraGrid1.UpdateData();
- UltraGridRow uRow = this.ultraGrid1.ActiveRow;
- if (uRow == null) { MessageUtil.ShowTips("无探伤实绩!"); return; }
- if (uRow.Cells["CONFIRM"].Value.ToString().Equals("1"))
- {
- MessageUtil.ShowTips("选中的探伤实绩已经确认,不允许删除!");
- return;
- }
- UltraGridRow row = this.ultraGridWoId.ActiveRow;
- if (row == null)
- {
- MessageUtil.ShowTips("无工单信息,不允许此操作!");
- }
- //string zYgNo = row.Cells["ZY_PLAN_ID"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- string plinCode = row.Cells["PlineCode"].Value.ToString();
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["DETECT_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return;
- //}
- if (!row.Cells["ZyBillStatus"].Value.ToString().Equals("生产中"))
- {
- MessageUtil.ShowTips("此工单状态不是生产中,不允许此操作!");
- return;
- }
- if (uRow.Cells["OFF_NUM"].Text != "0"&&uRow.Cells["OFF_NUM"].Text != "")
- {
- MessageUtil.ShowTips("存在离线支数无法删除!");
- return;
- }
- //if(!QueryStatusGd(uRow.Cells["WO_ID"].Value.ToString(), uRow.Cells["ZY_PLAN_ID"].Value.ToString())) return;
- ArrayList list1 = new ArrayList();
- int UpdaCount = 0;
- foreach (UltraGridRow ugr in ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Text) == true)
- {
- if (uRow.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("是"))
- {
- MessageUtil.ShowTips("此工序已经离线,不允许此操作!");
- return;
- }
- UpdaCount += 1;
- ArrayList list = new ArrayList();
- list.Add(uRow.Cells["RESULT_NO"].Text.ToString());
- list.Add(uRow.Cells["REJECTED_PCS"].Text.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.FrmInspection";
- ccp.MethodName = "deleteSandResult";
- ccp.ServerParams = new object[] { list1, TsGx, woId ,plinCode};
- 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>
- /// 保存
- /// </summary>
- private void DoSave()
- {
- UltraGridRow row = this.ultraGridWoId.ActiveRow;
- if (row == null)
- {
- MessageUtil.ShowTips("无工单信息,不允许此操作!");
- return;
- }
- //if(!QueryStatusGd(row.Cells["WoId"].Value.ToString(), row.Cells["ZY_PLAN_ID"].Value.ToString())) return;
- if (row.Cells["DemandDetection"].Text.ToString().Equals("无探伤"))
- {
- MessageUtil.ShowTips("不需要进行此工序!");
- return;
- }
- //string zYgNo = row.Cells["ZY_PLAN_ID"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- if (numCenter.Value != null && !numCenter.Value.Equals(""))
- {
- if (Convert.ToInt32(numCenter.Value) < 500 || Convert.ToInt32(numCenter.Value) > 6000)
- {
- MessageUtil.ShowTips("中心棒电流强度不在500-6000之间!");
- return;
- }
- }
- if (numConcentra.Value != null && !numConcentra.Value.Equals(""))
- {
- if (Convert.ToDouble(numConcentra.Value) < 0.15 || Convert.ToDouble(numConcentra.Value) > 0.4)
- {
- MessageUtil.ShowTips("磁悬液浓度不在0.15-0.4之间!");
- return;
- }
- }
- //DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, zYgNo }, this.ob);
- //if (dt.Rows[0]["DETECT_STATUS"].ToString().Equals("生产完成"))
- //{
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return;
- //}
- //if (!row.Cells["ZyBillStatus"].Value.ToString().Equals("生产中"))
- // {
- // MessageUtil.ShowTips("此工单状态不是生产中,不允许此操作!");
- // return;
- // }
- if (Convert.ToInt32(numPieces.Value.ToString()) != Convert.ToInt32(numQualified.Value.ToString()) + Convert.ToInt32(nuQualified.Value.ToString()))
- {
- MessageBox.Show("检验量=一次合格量+不合格量,请查验 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (Convert.ToInt32(nuQualified.Value.ToString()) != Convert.ToInt32(numAmount.Value.ToString()) + Convert.ToInt32(numRejected.Value.ToString()))
- {
- MessageBox.Show("不合格量=修后复探量+废品量,请查验 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (txtBC.Value == "")
- {
- MessageUtil.ShowTips("班次不能为空!");
- return;
- }
- if (txtBz.Value == "")
- {
- MessageUtil.ShowTips("班组不能为空!");
- return;
- }
- if (!row.Cells["Ifsplit"].Value.Equals("1"))
- {
- if (Convert.ToInt32(numPieces.Value) > CutPiece)
- {
- MessageUtil.ShowTips("探伤支数大于加工最大可切支数");
- return;
- }
- }
- ArrayList list = new ArrayList();
- CouplingInspectionResultEntity sand = new CouplingInspectionResultEntity();
- sand.InspectPieces = Convert.ToDecimal(numPieces.Value.ToString());
- sand.QualiriedPcs = Convert.ToDecimal(numQualified.Value.ToString());
- sand.RejectedPcs =Convert.ToDecimal( numRejected.Value.ToString());
- sand.RejectedReason = cmbReason.Text.Trim();
- sand.UnqualiriedPcs = Convert.ToDecimal(nuQualified.Value.ToString());
- sand.ColOperator = cmbOperator.Text.Trim();
- sand.ColShift = txtBC.Value.ToString();
- sand.ColGroup = txtBz.Value.ToString();
- sand.ColUser = this.UserInfo.GetUserName();
- sand.UnqualiriedReason = UncmbReason.Text.ToString();
- sand.AmountPcs = Convert.ToDecimal(numAmount.Value.ToString());
- sand.InspStandard = cmbStandard.Text.ToString();
- sand.Memo = txtMemo.Text.ToString();
- sand.MagneticPowder = cmbPowder.Text.ToString();
- sand.SpecimenMagnetic = tXtMagnetic.Text.ToString();
- sand.SpecimenType = CmbType.Text.ToString();
- sand.Concentration = Convert.ToDecimal(numConcentra.Value.ToString());
- sand.CoilIntensity = Convert.ToDecimal(numCoil.Value.ToString());
- sand.CenterIntensity = Convert.ToDecimal(numCenter.Value.ToString());
- sand.IfAllOutWork = row.Cells["IfAllOutWork"].Text.ToString();
- //sand.ZyPlanId = row.Cells["ZY_PLAN_ID"].Text.ToString();
- sand.PlineCode = row.Cells["PlineCode"].Text.ToString();
- sand.PlineName = row.Cells["PlineName"].Text.ToString();
- sand.ColTime = ProTime.Value.ToString();
- sand.Magtimes = MagTimes.Text.ToString() == null ? "" : MagTimes.Text.ToString();
- sand.Issued = this.UserInfo.GetUserName()+ "/MT-Ⅱ";
- //sand.WoId = row.Cells["WO_ID"].Text.ToString();
- sand.FinalQualified = Convert.ToInt32(numQualified.Value.ToString()) + Convert.ToInt32(numAmount.Value.ToString());
- sand.Position = txtPosi.Text.ToString();
- list.Add(JSONFormat.Format(sand));
- //double PlnCount = 0;//计划个数
- //double CutCount = 0;//实际个数
- //DataTable dt1 = ServerHelper.GetData("com.steering.mes.mcp.coup.PhosphateResultService.queryPlanJg", new Object[] { row.Cells["ZY_PLAN_ID"].Text.ToString() }, ob);
- //if (dt1.Rows.Count > 0)
- //{
- // PlnCount = Double.Parse(dt1.Rows[0]["DETECT_PLN_NUM"].ToString());
- // CutCount = Double.Parse(dt1.Rows[0]["DETECT_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.FrmInspection";
- ccp.MethodName = "addSandResult";
- ccp.ServerParams = new object[] { list, TsGx, woId, listF,listB };
- 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)
- {
- if (ccp.ReturnInfo.Equals("保存成功!"))
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- QuerySinglePlan();
- DoClean();
- }
- else
- {
- MessageUtil.ShowTips(ccp.ReturnInfo);
- }
- }
- }
- 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;
- judgeStoveNo = "";
- }
- else
- {
- judgeStoveNo = txtJudgeStoveNO.Text.ToString().Trim();
- }
- }
- else
- {
- judgeStoveNo = "";
- }
-
- #endregion
- List<PlnZyJgWorkbillEntity> listSource = EntityHelper.GetData<PlnZyJgWorkbillEntity>
- ("com.steering.mes.mcp.coup.CoupLoadingService.getQueryWoId1", new object[] { woId, plnNo, judgeStoveNo, starts, plineCodes }, this.ob);
- plnZyJgWorkbillEntitySource.DataSource = listSource;
- //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(ultraGrid2);
- }
-
- /// <summary>
- /// 判断状态
- /// </summary>
- /// <param name="woId"></param>
- /// <param name="planNO"></param>
- //private bool QueryStatusGd(string woId, string planNO)
- //{
- // DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.common.PlanService.getQueryWoIdDetails", new object[] { woId, planNO }, this.ob);
- // if (dt.Rows[0]["ZY_BILL_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单已生产完成,不允许此操作!");
- // return false;
- // }
- // if (dt.Rows[0]["DETECT_STATUS"].ToString().Equals("生产完成"))
- // {
- // MessageUtil.ShowTips("此工单探伤工序点已结炉,不允许此操作!");
- // return false;
- // }
- // return true;
- //}
- /// <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 ultraGridWoId_AfterRowActivate(object sender, EventArgs e)
- { UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null)return;
- string planNO = row.Cells["HeatPlanNo"].Value.ToString();
- string plinCode = row.Cells["PlineCode"].Value.ToString();
- string woId = row.Cells["WoId"].Value.ToString();
- //查询切断实绩支数和
- 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.FrmInspection.getInspectResult", new object[] { row.Cells["WoId"].Value.ToString() }, this.ob);
- if (dtThread.Rows.Count > 0)
- {
- threadNum = Convert.ToInt32(dtThread.Rows[0]["PRO_NUM"].ToString());
- }
- else
- {
- threadNum = 0;
- }
- getCoupSandBlast(woId);
- }
- /// <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>
- /// <param name="planNo"></param>
- private void getCoupSandBlast(string woId)
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.FrmInspection.getCoupSandBlast", new object[] { woId }, this.ob);
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
- foreach (UltraGridRow urg in ultraGrid1.Rows)
- {
- if (urg.Cells["CONFIRM"].Value.Equals("1"))
- {
- urg.Appearance.BackColor = Color.LightGreen;
- }
- }
- txtUser.Text = this.UserInfo.GetUserName() + "/MT-Ⅱ";
- }
- /// <summary>
- /// 清空
- /// </summary>
- private void DoClean()
- {
- nuQualified.Value = "0";
- numQualified.Value = "0";
- numPieces.Value = "0";
- UncmbReason.Text = "";
- numRejected.Value = "0";
- numAmount.Value = "0";
- cmbReason.Text = "";
- cmbOperator.Text = "";
- txtBC.Value = this.UserInfo.GetUserOrder();
- txtBz.Value = this.UserInfo.GetUserGroup();
- txtUser.Text = this.UserInfo.GetUserName() + "/MT-Ⅱ";
- cmbStandard.Text = "";
- CmbType.Text = "";
- tXtMagnetic.Text = "";
- cmbPowder.Text = "";
- numConcentra.Text = "0.15";
- numCoil.Value = "0";
- numCenter.Value = "500";
- txtMemo.Text = "";
- }
- /// <summary>
- /// 不合格原因
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void nuQualified_ValueChanged(object sender, EventArgs e)
- {
- if (nuQualified.Value.ToString().Equals("0"))
- {
- UncmbReason.Enabled = false;
- }
- else
- {
- UncmbReason.Enabled = true;
- }
- if (nuQualified.Value.ToString().Equals("") || nuQualified.Value.ToString() == null)
- {
- nuQualified.Value = "0";
- }
- if (numQualified.Value.ToString().Equals("") || numQualified.Value.ToString() == null)
- {
- numQualified.Value = "0";
- }
- string zPieces = "";
- string fPieces = "";
- string gPieces = "";
- if (numPieces.Text == null || numPieces.Text.Equals(""))
- {
- zPieces = "0";
- }
- else
- {
- zPieces = numPieces.Text.ToString();
- }
- if (numQualified.Text == null || numQualified.Text.Equals(""))
- {
- gPieces = "0";
- }
- else
- {
- gPieces = numQualified.Text.ToString();
- }
- if (nuQualified.Text == null || nuQualified.Text.Equals(""))
- {
- fPieces = "0";
- }
- else
- {
- fPieces = nuQualified.Text.ToString();
- }
- if (int.Parse(fPieces) > int.Parse(zPieces))
- {
- MessageUtil.ShowTips("一次不合格量不能大于检验量!");
- return;
- }
- else
- {
- numQualified.Value = int.Parse(zPieces) - int.Parse(fPieces);
- }
- }
- /// <summary>
- /// 废品原因
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void numRejected_ValueChanged(object sender, EventArgs e)
- {
- if (numRejected.Value.ToString().Equals("0"))
- {
- cmbReason.Enabled = false;
- }
- else
- {
- cmbReason.Enabled = true;
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- UltraGridRow ugr = ultraGrid1.ActiveRow;
- if (ugr == null) return;
- //if (ugr.Cells["IF_ALL_OUT_WORK"].Value.ToString().Equals("否"))
- //{
- //numPieces.Value = ugr.Cells["INSPECT_PIECES"].Text.ToString();
- //numQualified.Value = ugr.Cells["QUALIRIED_PCS"].Text.ToString();
- //nuQualified.Value = ugr.Cells["UNQUALIRIED_PCS"].Text.ToString();
- //UncmbReason.Text = ugr.Cells["UNQUALIRIED_REASON"].Text.ToString();
- //numRejected.Value = ugr.Cells["REJECTED_PCS"].Text.ToString();
- //numAmount.Value = ugr.Cells["AMOUNT_PCS"].Text.ToString();
- //cmbReason.Text = ugr.Cells["REJECTED_REASON"].Text.ToString();
- //cmbOperator.Text = ugr.Cells["COL_OPERATOR"].Text.ToString();
- //txtBz.Text = ugr.Cells["COL_GROUP"].Text.ToString();
- //txtBC.Text = ugr.Cells["COL_SHIFT"].Text.ToString();
- //txtUser.Text = ugr.Cells["COL_USER"].Text.ToString();
- //cmbStandard.Text = ugr.Cells["INSP_STANDARD"].Text.ToString();
- //CmbType.Text = ugr.Cells["SPECIMEN_TYPE"].Text.ToString();
- //tXtMagnetic.Text = ugr.Cells["SPECIMEN_MAGNETIC"].Text.ToString();
- //cmbPowder.Text = ugr.Cells["MAGNETIC_POWDER"].Text.ToString();
- //numConcentra.Value = ugr.Cells["CONCENTRATION"].Text.ToString();
- //numCoil.Value = ugr.Cells["COIL_INTENSITY"].Text.ToString();
- //numCenter.Value = ugr.Cells["CENTER_INTENSITY"].Text.ToString();
- //numVoltage.Value = ugr.Cells["VOLTAGE"].Text.ToString();
- //txtMemo.Text = ugr.Cells["MEMO"].Text.ToString();
- //}
- }
- 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 numQualified_ValueChanged(object sender, EventArgs e)
- {
- if (nuQualified.Value.ToString().Equals("") || nuQualified.Value.ToString()==null)
- {
- nuQualified.Value = "0";
- }
- if (numQualified.Value.ToString().Equals("") || numQualified.Value.ToString() == null)
- {
- numQualified.Value = "0";
- }
- string zPieces = "";
- string fPieces = "";
- string gPieces = "";
- if (numPieces.Text == null || numPieces.Text.Equals(""))
- {
- zPieces = "0";
- }
- else
- {
- zPieces = numPieces.Text.ToString();
- }
- if (numQualified.Text == null || numQualified.Text.Equals(""))
- {
- gPieces = "0";
- }
- else
- {
- gPieces = numQualified.Text.ToString();
- }
- if (nuQualified.Text == null || nuQualified.Text.Equals(""))
- {
- fPieces = "0";
- }
- else
- {
- fPieces = nuQualified.Text.ToString();
- }
- numPieces.Value = int.Parse(gPieces) + int.Parse(fPieces);
- }
- private void ultraGrid1_CellChange(object sender, CellEventArgs e)
- {
- UltraGridRow ugr = ultraGrid1.ActiveRow;
- if (ugr == null) return;
- //numPieces.Value = ugr.Cells["INSPECT_PIECES"].Text.ToString();
- //numQualified.Value = ugr.Cells["QUALIRIED_PCS"].Text.ToString();
- //nuQualified.Value = ugr.Cells["UNQUALIRIED_PCS"].Text.ToString();
- //UncmbReason.Text = ugr.Cells["UNQUALIRIED_REASON"].Text.ToString();
- //numRejected.Value = ugr.Cells["REJECTED_PCS"].Text.ToString();
- //numAmount.Value = ugr.Cells["AMOUNT_PCS"].Text.ToString();
- //cmbReason.Text = ugr.Cells["REJECTED_REASON"].Text.ToString();
- //cmbOperator.Text = ugr.Cells["COL_OPERATOR"].Text.ToString();
- //txtBz.Text = ugr.Cells["COL_GROUP"].Text.ToString();
- //txtBC.Text = ugr.Cells["COL_SHIFT"].Text.ToString();
- //txtUser.Text = ugr.Cells["COL_USER"].Text.ToString();
- //cmbStandard.Text = ugr.Cells["INSP_STANDARD"].Text.ToString();
- //CmbType.Text = ugr.Cells["SPECIMEN_TYPE"].Text.ToString();
- //tXtMagnetic.Text = ugr.Cells["SPECIMEN_MAGNETIC"].Text.ToString();
- //cmbPowder.Text = ugr.Cells["MAGNETIC_POWDER"].Text.ToString();
- //numConcentra.Value = Convert.ToDouble(ugr.Cells["CONCENTRATION"].Value.ToString());
- //numCoil.Value = ugr.Cells["COIL_INTENSITY"].Text.ToString();
- //numCenter.Value = ugr.Cells["CENTER_INTENSITY"].Text.ToString();
- //txtMemo.Text = ugr.Cells["MEMO"].Text.ToString();
- }
- private void numPieces_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numPieces.SelectAll));
- }
- private void numQualified_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numQualified.SelectAll));
- }
- private void nuQualified_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.nuQualified.SelectAll));
- }
- private void numAmount_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numAmount.SelectAll));
- }
- private void numRejected_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numRejected.SelectAll));
- }
- private void numPieces_ValueChanged(object sender, EventArgs e)
- {
- if (nuQualified.Value.ToString().Equals("") || nuQualified.Value.ToString() == null)
- {
- nuQualified.Value = "0";
- }
- if (numQualified.Value.ToString().Equals("") || numQualified.Value.ToString() == null)
- {
- numQualified.Value = "0";
- }
- string zPieces = "";
- string fPieces = "";
- string gPieces = "";
- if (numPieces.Text == null || numPieces.Text.Equals(""))
- {
- zPieces = "0";
- }
- else
- {
- zPieces = numPieces.Text.ToString();
- }
- if (numQualified.Text == null || numQualified.Text.Equals(""))
- {
- gPieces = "0";
- }
- else
- {
- gPieces = numQualified.Text.ToString();
- }
- if (nuQualified.Text == null || nuQualified.Text.Equals(""))
- {
- fPieces = "0";
- }
- else
- {
- fPieces = nuQualified.Text.ToString();
- }
- numQualified.Value = int.Parse(zPieces) - int.Parse(fPieces);
- }
- private void numAmount_ValueChanged(object sender, EventArgs e)
- {
- if (nuQualified.Value.ToString().Equals("") || nuQualified.Value.ToString() == null)
- {
- nuQualified.Value = "0";
- }
- if (numRejected.Value.ToString().Equals("") || numRejected.Value.ToString() == null)
- {
- numRejected.Value = "0";
- }
- string zPieces = "";
- string fPieces = "";
- string gPieces = "";
- if (nuQualified.Text == null || nuQualified.Text.Equals(""))
- {
- zPieces = "0";
- }
- else
- {
- zPieces = nuQualified.Text.ToString();
- }
- if (numAmount.Text == null || numAmount.Text.Equals(""))
- {
- gPieces = "0";
- }
- else
- {
- gPieces = numAmount.Text.ToString();
- }
- if (numRejected.Text == null || numRejected.Text.Equals(""))
- {
- fPieces = "0";
- }
- else
- {
- fPieces = numRejected.Text.ToString();
- }
- if (int.Parse(gPieces) > int.Parse(zPieces))
- {
- MessageUtil.ShowTips("修后复探量不能大于一次合格量!");
- return;
- }
- numRejected.Value = int.Parse(zPieces) - int.Parse(gPieces);
- }
- private void utUpLoad1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- //var entity = ultraGrid1.ActiveRow.ListObject as CouplingInspectionResultEntity;
- //if (entity == null) return;
- UltraGridRow row = ultraGrid1.ActiveRow;
- if (row == null) return;
- string resultNo = row.Cells["RESULT_NO"].Value.ToString();
- string judgeNo = row.Cells["JUDGE_STOVE_NO"].Value.ToString();
- string batchNo = row.Cells["BATCH_NO"].Value.ToString();
- string woid = row.Cells["WO_ID"].Value.ToString();
- if (e.Button.Key == "VIEW")
- {
- var strurl = "";
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=CouplingInspect.cpt&op=view&resultNo=" + resultNo;
- var fre = new FrmRepExcel(ob, strurl);
- fre.AutoSize = true;
- fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width,
- Screen.PrimaryScreen.WorkingArea.Height);
- fre.WindowState = FormWindowState.Maximized;
- fre.Show();
- }
- else if (e.Button.Key == "UPLOAD")
- {
- var strurl = "";
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=CouplingInspect.cpt&format=pdf&resultNo=" + resultNo;
-
- var webClient = new WebClient();
- var listPdf = new List<FileBean>();
- var date = DateTime.Now.ToString("yyyyMMdd");
- var filePathNew = ""; //报告目录
- var reportNo = ""; //报告编号
- filePathNew = "Coupling/Inspection/" + judgeNo + "/" + batchNo + "/" + woid + "/";
- reportNo = resultNo + "_0";
- var pdf = webClient.DownloadData(strurl);
- var fileBean = new FileBean();
- fileBean.setFile(pdf);
- fileBean.setFileName(reportNo + ".pdf");
- fileBean.setPathName(filePathNew);
- listPdf.Add(fileBean);
- webClient.Dispose();
- var a = FileHelper.Upload(listPdf);
- if (a)
- {
- ServerHelper.SetData("com.steering.mes.mcp.coup.FrmInspection.UpdateReportUrl",
- new object[] { resultNo, filePathNew + reportNo + ".pdf" }, ob);
- MessageUtil.ShowTips("上传报告成功!");
- //GetHttCrackDetectionEtEntity(entity.WoId);
- }
- }
- else
- {
- MessageUtil.ShowError("系统生成PDF失败,请稍后再试!");
- }
- }
- private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e)
- {
- var CouplingInspectEtEntity = e.Row.ListObject as CouplingInspectionResultEntity;
- if (CouplingInspectEtEntity==null)
- { }
- else
- {
- //ultraGrid1.DisplayLayout.Bands[0].Groups["NewGroup0"].Hidden = false;
- e.Row.Cells["Report"].Appearance.BackColor = string.IsNullOrEmpty(CouplingInspectEtEntity.Report)
- ? Color.Red
- : Color.LightGreen;
- e.Row.Cells["Report"].EditorComponent = utUpLoad1;
- }
-
-
- }
- private void UncmbReason_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) return;
- string woid = row.Cells["WoId"].Text.ToString();
- string judgeNo = row.Cells["JudgeStoveNo"].Text.ToString();
- ComCoupBugReasion ccb = new ComCoupBugReasion(woid, judgeNo,"2", ob);
- ccb.ShowDialog();
- listF = ccb.List;
- UncmbReason.Text = ccb.strMemo.ToString();
- }
- private void cmbReason_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- UltraGridRow row = ultraGridWoId.ActiveRow;
- if (row == null) return;
- string woid = row.Cells["WoId"].Text.ToString();
- string judgeNo = row.Cells["JudgeStoveNo"].Text.ToString();
- ComCoupBugReasion ccb = new ComCoupBugReasion(woid, judgeNo, "1", ob);
- ccb.ShowDialog();
- listB = ccb.List;
- cmbReason.Text = ccb.strMemo.ToString();
- }
- private void numConcentra_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numConcentra.SelectAll));
- }
- private void numCenter_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numCenter.SelectAll));
- }
- private void numCoil_AfterEnterEditMode(object sender, EventArgs e)
- {
- this.BeginInvoke(new MethodInvoker(this.numCoil.SelectAll));
- }
- private void txtPosi_ValueChanged(object sender, EventArgs e)
- {
- if (txtPosi.Text.Equals("内外表面纵向"))
- {
- numCoil.Enabled = false;
- }
- else
- {
- numCoil.Enabled = true;
- }
- }
- private void txtBz_ValueChanged(object sender, EventArgs e)
- {
- //根据班组获取操作工
- DataTable dt = ServerHelper.GetData("com.steering.mes.mcp.coup.FrmInspection.getComBaseInfo", new object[] { "7034", txtBz.Text.ToString() }, this.ob);
- cmbOperator.DataSource = dt;
- cmbOperator.DisplayMember = "BASENAME";
- YdmBaseClass.SetComboItemHeight(cmbOperator);
- }
- }
- }
|