| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037 |
- 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 Infragistics.Win.UltraWinGrid;
- using Infragistics.Win;
- using System.Collections;
- using CoreFS.CA06;
- using System.Diagnostics;
- namespace Core.LZMes.Client.QCM
- {
- public partial class QCM030305RZ : FrmBase
- {
- public QCM030305RZ()
- {
- InitializeComponent();
- }
- private string prodline = "";
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- /*case "Judge":
- Operate();
- break;*/
- case "FB":
- fb();
- break;
- case "Cancel_FB":
- cancel_fb();
- break;
- case "Exit":
- this.Close();
- break;
- case "Export":
- this.DoExport();
- break;
- case "Export1":
- this.DoExport1();
- break;
- case "Export2":
- this.DoExport2();
- break;
- case "Cold_End":
- this.DoCold_End();
- break;
- }
- }
- private void DoQuery()
- {
- if (this.ultraTabControl1.Tabs[0].Selected) //待判信息
- {
- DoQueryMe();
- }
- if (this.ultraTabControl1.Tabs[1].Selected) //表面判定记录
- {
- DoQueryRe();
- }
- if (this.ultraTabControl1.Tabs[2].Selected) //公差判定记录
- {
- DoQueryRe1();
- }
- }
- private void DoQueryMe()
- {
- //查询探伤待检信息(轧批号、计划号)
- try
- {
- this.dataSet3.Clear();
- //dataSet6.Clear();
- string starttime = "";
- string endtime = "";
- if (checkBox2.Checked)
- {
- starttime = this.dateTimePicker1.Value.ToString("yyyyMMdd");
- endtime = this.dateTimePicker2.Value.AddDays(1).ToString("yyyyMMdd");
- if (this.comboBox4.Text.ToString() == "全部")
- {
- if (this.dateTimePicker2.Value.AddDays(1).Subtract(this.dateTimePicker1.Value).Days > 30)
- {
- MessageBox.Show("时间范围较大,请缩小范围");
- return;
- }
-
- }
- }
-
- string sbatchno = "";
- string ebatchno = "";
- if (checkBox3.Checked)
- {
- sbatchno = this.textBox2.Text.Trim();
- /*if (textBox1.Text.ToString() == "")
- {
- ebatchno = this.textBox2.Text.Trim();
- }
- else
- {
- ebatchno = this.textBox1.Text.Trim();
- }*/
- }
- string plan_no = "";
- if (checkBox4.Checked)
- {
- plan_no = textBox3.Text.Trim(); //轧辊单元
- }
- if (!checkBox2.Checked && !checkBox3.Checked && !checkBox4.Checked)
- {
- MessageBox.Show("时间、轧批号、轧辊单元必须选择其中一个条件!");
- return;
- }
- string orderno = this.textBox4.Text.Trim();// 订单号
-
- string stellname = this.textBox7.Text.Trim();
- //string prodline = "连退";
- string isjudge = this.comboBox4.Text.ToString();
- //string stellname = this.textBox7.Text.Trim();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "doQueryMaterialDetailsJ2N";
- ccp.ServerParams = new object[] { starttime, endtime, sbatchno, ebatchno, orderno, plan_no, "MB", prodline, isjudge, stellname };
- ccp.SourceDataTable = this.dataSet3.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- if (ugr.Cells["WEIGHT"].Value.ToString() == "" || ugr.Cells["WEIGHT_WGT"].Value.ToString()=="")
- {
- ugr.Cells["SIZE_QUALITY_GRD"].Appearance.BackColor = Color.Yellow;
- ugr.Cells["EXTSHAPE_QUALITY_GRD"].Appearance.BackColor = Color.Yellow;
- }
- else if (double.Parse(ugr.Cells["WEIGHT"].Value.ToString()) > double.Parse(ugr.Cells["WEIGHT_WGT"].Value.ToString()))//卷重大于磅重
- {
- ugr.Cells["SIZE_QUALITY_GRD"].Appearance.BackColor = Color.Orange;
- ugr.Cells["EXTSHAPE_QUALITY_GRD"].Appearance.BackColor = Color.Orange;
- }
- }
- /*this.ultraGrid3.DisplayLayout.Bands[0].Columns["PLAN"].SortIndicator = SortIndicator.Ascending;
- this.ultraGrid3.DisplayLayout.Bands[0].Columns["PLAN_2"].SortIndicator = SortIndicator.Ascending;*/
- /*ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findFlawDataJ";
- ccp.ServerParams = new object[] { prodline };
- ccp.SourceDataTable = this.dataSet6.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);*/
- /*ultraCombo1.DataSource = ccp.SourceDataTable;
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].EditorComponent = ultraCombo1;
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown;
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].FilterOperandDropDownItems = FilterOperandDropDownItems.CellValues;*/
-
-
- //this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].AllowRowFiltering = Infragistics.Win.AutoCompleteMode.Append;
-
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void DoQueryRe()
- {
- //查询判定记录
- try
- {
- this.dataSet2.Clear();
- string starttime = "";
- string endtime = "";
- if (checkBox2.Checked)
- {
- starttime = this.dateTimePicker1.Value.ToString("yyyyMMdd");
- endtime = this.dateTimePicker2.Value.ToString("yyyyMMdd");
- }
- string sbatchno = "";
- string ebatchno = "";
- if (checkBox3.Checked)
- {
- sbatchno = this.textBox2.Text.Trim();
- /*if (textBox1.Text.ToString() == "")
- {
- ebatchno = this.textBox2.Text.Trim();
- }
- else
- {
- ebatchno = this.textBox1.Text.Trim();
- }*/
- }
- if (!checkBox2.Checked && !checkBox3.Checked)
- {
- MessageBox.Show("时间与轧批号必须选择其中一个条件!");
- return;
- }
- string orderno = textBox4.Text.Trim();
- string plan_no = "";
- if (checkBox4.Checked)
- {
- plan_no = textBox3.Text.Trim(); //轧辊单元
- }
- string stellname = this.textBox7.Text.Trim();
- //string prodline = "连退";
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "GetSurfaceInfoJ";
- ccp.ServerParams = new object[] { starttime, endtime, sbatchno, ebatchno, orderno, plan_no, prodline, stellname };
- ccp.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void DoQueryRe1()
- {
- try
- {
- this.dataSet9.Clear();
-
- string starttime = "";
- string endtime = "";
- if (checkBox2.Checked)
- {
- starttime = this.dateTimePicker1.Value.ToString("yyyyMMdd");
- endtime = this.dateTimePicker2.Value.ToString("yyyyMMdd");
- }
- string sbatchno = "";
- string ebatchno = "";
- if (checkBox3.Checked)
- {
- sbatchno = this.textBox2.Text.Trim();
- /*if (textBox1.Text.ToString() == "")
- {
- ebatchno = this.textBox2.Text.Trim();
- }
- else
- {
- ebatchno = this.textBox1.Text.Trim();
- }*/
- }
- if (!checkBox2.Checked && !checkBox3.Checked)
- {
- MessageBox.Show("时间与轧批号必须选择其中一个条件!");
- return;
- }
- string orderno = this.textBox4.Text.Trim();// 订单号
- string plan_no = ""; //产品描述
- if (checkBox4.Checked)
- {
- plan_no = textBox3.Text.Trim(); //轧辊单元
- }
- string stellname = this.textBox7.Text.Trim();
- //string prodline = "连退";
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "GetMeasureInfoJ";
- ccp.ServerParams = new object[] { starttime, endtime, sbatchno, ebatchno, orderno, plan_no, prodline, stellname };
- ccp.SourceDataTable = this.dataSet9.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void DoCold_End()
- {
- foreach (UltraGridRow ugr in ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "upCold_End";
- ccp.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString() };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- ugr.Cells["CHECK"].Value = "False";
- }
- }
- MessageBox.Show("缓冷结束成功");
- }
- /*private void Operate()
- {
- string material_no = "";
- try
- {
- UltraGridRow ugr = this.ultraGrid3.ActiveRow;
- if (ugr == null)
- return;
- CoreClientParam ccp = new CoreClientParam();
- foreach (UltraGridRow ugrs in this.ultraGrid4.Rows)
- {
- if (ugrs.Cells["CHECKBOX"].Text.ToString() == "True")
- {
- string surfaceid = ugrs.Cells["SURFACE_ID"].Value.ToString();
- string username = this.UserInfo.GetUserName();
- string userorder = this.UserInfo.GetUserOrderText();
- string usergroup = this.UserInfo.GetUserGroupText();
- string flag = "";
- if (ugrs.Cells["PRIMARY_FLAG"].Text.ToString().Contains("是"))
- {
- flag = "1";
- }
- else
- {
- flag = "0";
- }
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "repairFlaw";
- ccp.ServerParams = new object[] { surfaceid, ugrs.Cells["FLAW_SEQ"].Value.ToString(), flag, username, userorder, usergroup };
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- }
- this.dataSet4.Clear();
- string surface_id = ugr.Cells["SURFACE_ID"].Value.ToString();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findNameByMN";
- ccp.ServerParams = new object[] { surface_id };
- ccp.SourceDataTable = this.dataSet4.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }*/
- private void fb()
- {
- try
- {
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- if (ugr.Cells["DLIV_DIRNO"].Value.ToString() != "")
- {
- MessageBox.Show(ugr.Cells["MATERIAL_NO"].Value.ToString()+"卷已有货运指示号,不可进行封闭操作!");
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "coiljudge_status_call_commit";
- ccp.ServerParams = new object[] { ugr.Cells["PLINE_CODE"].Value.ToString()
- , ugr.Cells["MATERIAL_NO"].Value.ToString()
- , ""
- , ""
- , ""
- , ""
- , ""
- , "Y"
- , ugr.Cells["FB_REASON"].Text.ToString(),""};
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- string remark = "封闭";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record1";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark, ugr.Cells["FB_REASON"].Text.ToString() };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- //DoQuery();
- MessageBox.Show("封闭成功!");
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void cancel_fb()
- {
- try
- {
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- if (ugr.Cells["DLIV_DIRNO"].Value.ToString() != "")
- {
- MessageBox.Show(ugr.Cells["MATERIAL_NO"].Value.ToString() + "卷已有货运指示号,不可进行封闭操作!");
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "coiljudge_status_call_commit";
- ccp.ServerParams = new object[] { ugr.Cells["PLINE_CODE"].Value.ToString()
- , ugr.Cells["MATERIAL_NO"].Value.ToString()
- , ""
- , ""
- , ""
- , ""
- , ""
- , "N"
- , ugr.Cells["FB_REASON"].Text.ToString(),""};
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- string remark = "取消封闭";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record1";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark, ugr.Cells["FB_REASON"].Text.ToString() };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- //DoQuery();
- MessageBox.Show("解除封闭成功!");
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void label9_Click(object sender, EventArgs e)
- {
-
- }
- public static bool IsNumberal(string input)
- {
- bool flag = true;
- int count = 0;
- int count1 = 0;
- if (input.Length == 0)
- {
- flag = false;
- }
- else
- {
- char[] x = input.ToCharArray();
- for (int i = 0; i < input.Length; i++)
- {
- if (!char.IsNumber(x[i]) && x[i] != '.' && x[i] != '-')
- {
- flag = false; break;
- }
- if (x[i] == '.')
- {
- count++;
- if (i == 0 || i == input.Length - 1) flag = false;
- }
- if (x[i] == '-')
- {
- count1++;
- if (i > 1) flag = false;
- }
- }
- if (count > 1 || count1 > 1) flag = false;
- }
- return flag;
- }
- public void initCoilDefect()
- {
- try
- {
- //缺陷
- ArrayList alt = new ArrayList();
- alt.Add("UIB030110_021N.SELECT");
- //alt.Add("UIB030110_022.SELECT");
- this.ultraCombo1Dataset.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { alt };
- ccp.SourceDataTable = this.ultraCombo1Dataset.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- //ccp.SourceDataTable = this.ultraCombo1Dataset.Tables[0].Merge(this.ultraCombo1Dataset.Tables[2]);
- //进程
- alt = new ArrayList();
- alt.Add("UIB030110_01.INIT_SELECT");
- this.dataSet11.Tables[0].Clear();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { alt };
- ccp.SourceDataTable = this.dataSet11.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void QCM030305RZ_Load(object sender, EventArgs e)
- {
- //获取自定义参数
- if (!this.CustomInfo.Equals(""))
- {
- prodline = this.CustomInfo;
- }
- //this.comboBox3.SelectedIndex = 0;
- this.comboBox4.SelectedIndex = 0;
- //string prodline = "连退";
- this.ultraGrid1.DisplayLayout.Override.FilterUIType = FilterUIType.HeaderIcons;
- this.ultraGrid3.DisplayLayout.Override.FilterUIType = FilterUIType.HeaderIcons;
- this.dateTimePicker1.Value = System.DateTime.Now.AddDays(-3);
- this.ultraGrid1.DisplayLayout.Bands[0].Header.Appearance.BackColor = Color.LightBlue;
- this.ultraGrid3.DisplayLayout.Bands[0].Header.Appearance.BackColor = Color.LightBlue;
- //this.ultraGrid4.DisplayLayout.Bands[0].Header.Appearance.BackColor = Color.LightBlue;
- initCoilDefect();
- if (this.UserInfo.GetUserID().ToString() == "X07755" || this.UserInfo.GetUserID().ToString() == "llei"
- || this.UserInfo.GetUserID().ToString() == "X07743" || this.UserInfo.GetUserID().ToString() == "X07748"
- || this.UserInfo.GetUserID().ToString() == "X07745" || this.UserInfo.GetUserID().ToString() == "X07793"
- || this.UserInfo.GetUserID().ToString() == "X00437" || this.UserInfo.GetUserID().ToString() == "X07842"
- || this.UserInfo.GetUserID().ToString() == "X35126" || this.UserInfo.GetUserID().ToString() == "X07797"
- || this.UserInfo.GetUserID().ToString() == "X22746" || this.UserInfo.GetUserID().ToString() == "1")
- {
- this.button4.Visible = true;
- }
- else
- {
- this.button4.Visible = false;
- }
- if (this.UserInfo.GetUserID().ToString() == "X07832" || this.UserInfo.GetUserID().ToString() == "X07784"
- || this.UserInfo.GetUserID().ToString() == "X07799" || this.UserInfo.GetUserID().ToString() == "X07809"
- || this.UserInfo.GetUserID().ToString() == "X07835" || this.UserInfo.GetUserID().ToString() == "X07816"
- || this.UserInfo.GetUserID().ToString() == "X07823" || this.UserInfo.GetUserID().ToString() == "X07802")
- {
- this.button4.Visible = false;
- this.button1.Visible = false;
- this.button2.Visible = false;
- this.button3.Visible = false;
- }
- ValueList spm_appoint = new ValueList();
- spm_appoint.ValueListItems.Add("","");
- spm_appoint.ValueListItems.Add("1", "平整");
- spm_appoint.ValueListItems.Add("2", "分卷");
- spm_appoint.ValueListItems.Add("3","平整分卷");
- spm_appoint.ValueListItems.Add("4", "重卷");
- spm_appoint.ValueListItems.Add("5", "开卷检查");
- spm_appoint.ValueListItems.Add("D", "完成");
- spm_appoint.ValueListItems.Add("S", "综合判定");
- this.ultraGrid3.DisplayLayout.Bands[0].Columns["SPM_APPOINT_SYS"].ValueList = spm_appoint;
- ValueList ponpse_unit = new ValueList();
- ponpse_unit.ValueListItems.Add("操作类", "操作类");
- ponpse_unit.ValueListItems.Add("设备类", "设备类");
- ponpse_unit.ValueListItems.Add("生产计划类", "生产计划类");
- ponpse_unit.ValueListItems.Add("工艺类", "工艺类");
- ponpse_unit.ValueListItems.Add("其他类", "其他类");
- this.ultraGrid3.DisplayLayout.Bands[0].Columns["RSEPON_UNIT"].ValueList = ponpse_unit;
- /* ValueList vis_repair = new ValueList();
- vis_repair.ValueListItems.Add("0", "待修复");
- vis_repair.ValueListItems.Add("1", "已修复");
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["IS_REPAIR"].ValueList = vis_repair;
- ValueList vprimary_flag = new ValueList();
- /*vprimary_flag.ValueListItems.Add("1", "是");
- vprimary_flag.ValueListItems.Add("0", "否");
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["PRIMARY_FLAG"].ValueList = vprimary_flag;*/
- //ValueList vFLAW_DESC = new ValueList();
- CoreClientParam ccp = new CoreClientParam();
- /*ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findJFlawArea";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- vFLAW_DESC.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["SM_CD"].ToString(), ccp.SourceDataTable.Rows[i]["SM_CFNM"].ToString());
- }
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_AREA"].ValueList = vFLAW_DESC;
- /*ValueList vflaw_pos_desc = new ValueList();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findJFlawPosDesc";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- vflaw_pos_desc.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["SM_CD"].ToString(), ccp.SourceDataTable.Rows[i]["SM_CFNM"].ToString());
- }
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_POS_DESC"].ValueList = vflaw_pos_desc;*/
- ValueList vsflv1 = new ValueList();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findSfLv";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- vsflv1.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["SM_CD"].ToString(), ccp.SourceDataTable.Rows[i]["SM_CFNM"].ToString());
- }
- this.ultraGrid3.DisplayLayout.Bands[0].Columns["SIZE_QUALITY_GRD"].ValueList = vsflv1;
- ValueList vsflv2 = new ValueList();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findSfLv";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- vsflv2.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["SM_CD"].ToString(), ccp.SourceDataTable.Rows[i]["SM_CFNM"].ToString());
- }
- this.ultraGrid3.DisplayLayout.Bands[0].Columns["EXTSHAPE_QUALITY_GRD"].ValueList = vsflv2;
- /*ValueList VFLAW_SIZE_DESC = new ValueList();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findJFlawSizeDesc";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- VFLAW_SIZE_DESC.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["SM_CD"].ToString(), ccp.SourceDataTable.Rows[i]["SM_CFNM"].ToString());
- }
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_SIZE_DESC"].ValueList = VFLAW_SIZE_DESC;*/
- /*ValueList VFLAW_LV_DESC = new ValueList();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findJFlawLvDesc";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- VFLAW_LV_DESC.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["SM_CD"].ToString(), ccp.SourceDataTable.Rows[i]["SM_CFNM"].ToString());
- }
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_LV_DESC"].ValueList = VFLAW_LV_DESC;*/
- /*ValueList VFLAW_DIR_DESC = new ValueList();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findJFlawDirDesc";
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- {
- VFLAW_DIR_DESC.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["SM_CD"].ToString(), ccp.SourceDataTable.Rows[i]["SM_CFNM"].ToString());
- }
- this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DIR_DESC"].ValueList = VFLAW_DIR_DESC;*/
- //ccp = new CoreClientParam();
- //ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- //ccp.MethodName = "findFlawDataJ";
- //ccp.ServerParams = new object[] {prodline };
- //ccp.SourceDataTable = this.dataSet6.Tables[0];
- //this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- ////ValueList VDEFECT_DESC = new ValueList();
- ////for (int i = 0; i < ccp.SourceDataTable.Rows.Count; i++)
- ////{
- //// VDEFECT_DESC.ValueListItems.Add(ccp.SourceDataTable.Rows[i]["DEFECT_CODE"].ToString(), ccp.SourceDataTable.Rows[i]["DEFECT_DESC"].ToString());
- ////}
- ////this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].ValueList = VDEFECT_DESC;
- ////this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].EditorComponent = VDEFECT_DESC;
- //UltraCombo uc;
- //uc = new UltraCombo();
- //uc.BindingContext = this.BindingContext;
- //uc.DataSource = ccp.SourceDataTable;
- //this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].ValueList = new BindableValueList(ccp.SourceDataTable, "", "DEFECT_NAME", "DEFECT_CODE", this.ultraGrid4);
- //DoQuery();
- /*this.ultraGrid3.DisplayLayout.UseFixedHeaders = true;
- this.ultraGrid3.DisplayLayout.Bands[0].Columns[1].Header.Fixed = true;
- this.ultraGrid3.DisplayLayout.Bands[0].Columns[1].Header.FixedHeaderIndicator = FixedHeaderIndicator.None;
- /*this.ultraGrid3.DisplayLayout.Override.AllowRowSummaries = AllowRowSummaries.True;
- this.ultraGrid3.DisplayLayout.Override.SummaryDisplayArea =SummaryDisplayAreas.GroupByRowsFooter | SummaryDisplayAreas.TopFixed;*/
-
- }
- private void ultraGrid3_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- UltraGridRow ugr = this.ultraGrid3.ActiveRow;
- this.dataSet4.Clear();
- string surface_id = ugr.Cells["SURFACE_ID"].Value.ToString();
- if (surface_id != "")
- {
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findNameByMN";
- ccp.ServerParams = new object[] { surface_id };
- ccp.SourceDataTable = this.dataSet4.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- string design_key = ugr.Cells["DESIGN_KEY"].Value.ToString();
- if (design_key != "")
- {
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "GetMemo";
- ccp.ServerParams = new object[] { design_key };
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- if (ccp.SourceDataTable.Rows.Count == 0)
- {
- this.textBox6.Text = "";
- }
- else
- {
- this.textBox6.Text = ccp.SourceDataTable.Rows[0]["MEMO"].ToString();
- }
- }
- this.dataSet7.Clear();
- string material_no = ugr.Cells["MATERIAL_NO"].Value.ToString();
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "getToleranceJ";
- ccp1.ServerParams = new object[] { design_key, material_no };
- ccp1.SourceDataTable = this.dataSet7.Tables[0];
- this.ExecuteQueryToDataTable(ccp1, CoreInvokeType.Internal);
- /*this.ultraGrid4.DisplayLayout.Bands[0].Columns["FLAW_DESC"].EditorComponent = ultraCombo1;
- foreach (UltraGridRow ugrs in this.ultraGrid4.Rows)
- {
- if (ugrs.Cells["IS_REPAIR"].Text.ToString().Contains("已修复"))
- {
- ugrs.Appearance.BackColor = Color.Pink;
- }
- }*/
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- return;
- this.dataSet5.Clear();
- string surface_id = ugr.Cells["SURFACE_ID"].Value.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "findNameByMN";
- ccp.ServerParams = new object[] { surface_id };
- ccp.SourceDataTable = this.dataSet5.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- foreach (UltraGridRow ugrs in this.ultraGrid5.Rows)
- {
- if (ugrs.Cells["IS_REPAIR"].Text.ToString().Contains("已修复"))
- {
- ugrs.Appearance.BackColor = Color.Pink;
- }
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows.Where(p => p.IsFilteredOut == false).ToList())
- {
- if (checkBox1.Checked)
- {
- ugr.Cells["CHECK"].Value = "True";
- }
- else
- {
- ugr.Cells["CHECK"].Value = "False";
- }
- }
- }
- private void ultraTabControl1_Click(object sender, EventArgs e)
- {
- if (this.ultraTabControl1.Tabs[1].Selected || this.ultraTabControl1.Tabs[2].Selected) //判定记录
- {
- this.label11.Visible = false;
- this.comboBox4.Visible = false;
- this.label12.Text = "判定时间";
- /*this.label5.Visible = false;
- this.textBox3.Visible = false;
- this.checkBox4.Visible = false;*/
- }
- if (this.ultraTabControl1.Tabs[0].Selected) //判定记录
- {
- /*this.label5.Visible = true;
- this.textBox3.Visible = true;*/
- this.label11.Visible = true;
- this.comboBox4.Visible = true;
- this.label12.Text = "生产时间";
- //this.checkBox4.Visible = true;
- }
- }
- private void DoExport()
- {
- try
- {
- if (this.ultraGrid1.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的已检验的表面数据", "提示");
- return;
- }
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(this.ultraGrid1, fName);
- Process.Start(fName);
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
-
- //DoQuery();
- }
- private void ultraGrid4_InitializeLayout(object sender, InitializeLayoutEventArgs e)
- {
- }
- private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
-
- UltraGridRow ugr = this.ultraGrid2.ActiveRow;
- if (ugr == null)
- return;
- this.dataSet10.Clear();
- string sic = ugr.Cells["SIC_ID"].Value.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "getToleranceInfoNew";
- ccp.ServerParams = new object[] { sic };
- ccp.SourceDataTable = this.dataSet10.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- this.dataSet8.Clear();
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "getQcmJudgeMeasureJ";
- ccp.ServerParams = new object[] { sic };
- ccp.SourceDataTable = this.dataSet8.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void ultraGrid2_InitializeLayout(object sender, InitializeLayoutEventArgs e)
- {
- }
- private void DoExport1()
- {
- try
- {
- if (this.ultraGrid2.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的已检验公差数据", "提示");
- return;
- }
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(this.ultraGrid2, fName);
- Process.Start(fName);
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void DoExport2()
- {
- try
- {
- if (this.ultraGrid3.Rows.Count == 0)
- {
- MessageBox.Show("没有可以导出的待检数据", "提示");
- return;
- }
- if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
- {
- string fName = this.saveFileDialog1.FileName;
- this.ultraGridExcelExporter1.Export(this.ultraGrid3, fName);
- Process.Start(fName);
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void button3_Click(object sender, EventArgs e)
- {
- try
- {
- /*int count = 0;
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- count++;
- }
- }*/
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in ultraGrid3.Rows)
- {
- int x = 1;
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- ArrayList list4 = new ArrayList();
- List<ArrayList> list5 = new List<ArrayList>();
- string ss = ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString();
- if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "")
- {
- MessageBox.Show("请选择表面质量等级");
- return;
- }
- //if (comboBox2.Text.Trim() == "")
- //{
- // MessageBox.Show("请输入质量等级!");
- // return;
- //}
- string is_pass = "";
- string is_zl = "";
- string result_extshape = "";
- /*if (comboBox3.Text.ToString() == "合格")
- {
- is_pass = "1";
- }
- else if (comboBox3.Text.ToString() == "不合格")
- {
- is_pass = "2";
- }
- else if (comboBox3.Text.ToString() == "待判")
- {
- is_pass = "0";
- }
- else
- {
- is_pass = "";
- }
- if (comboBox5.Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (comboBox5.Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (comboBox5.Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (comboBox5.Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (comboBox5.Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- else if (comboBox5.Text.ToString() == "待处理")
- {
- is_zl = "512606";
- }*/
- if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "正品")
- {
- is_pass = "1";
- is_zl = "512601";
- result_extshape = "合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "次品")
- {
- is_zl = "512602";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "废品")
- {
- is_zl = "512603";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "协议品")
- {
- is_zl = "512604";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "订单外")
- {
- is_zl = "512605";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "待处理")
- {
- is_zl = "512606";
- is_pass = "0";
- result_extshape = "待判";
- }
- string is_zl_gc = "";
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "正品")
- {
- is_zl_gc = "512601";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "次品")
- {
- is_zl_gc = "512602";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "废品")
- {
- is_zl_gc = "512603";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "协议品")
- {
- is_zl_gc = "512604";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "订单外")
- {
- is_zl_gc = "512605";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "待处理")
- {
- is_zl_gc = "512606";
- }
- if (/*!((ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "正品" && ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "正品")
- || (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "待处理" && ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "待处理")
- ||*/ !((is_zl == "512601" || is_zl == "512606") && (is_zl_gc == "512601" || is_zl_gc == "512606"))
- && (ugr.Cells["CRK_CD1"].Text.ToString() == "" || ugr.Cells["CRK_CD1"].Value == null))
- {
- MessageBox.Show(ugr.Cells["MATERIAL_NO"].Value.ToString() + "卷质量等级不合格,请选择缺陷", "提示");
- return;
- }
- list4.Add(ugr.Cells["MATERIAL_NO"].Value.ToString());
- list4.Add(is_pass);//检验结果代码
- list4.Add(result_extshape);//检验结果
- list4.Add(is_zl);//质量等级代码
- list4.Add(ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString());//质量等级名称
- list4.Add("");
- list4.Add(this.UserInfo.GetUserName());//操作人
- list4.Add(this.UserInfo.GetUserOrderText());//班次
- list4.Add(this.UserInfo.GetUserGroupText());//班组
-
- int count1 = 0;
- int i = 0;
- if (ugr.Cells["CRK_YN"].Text.ToString() == "Y")
- {
- for (int c1 = 1; c1 < 6 && ugr.Cells["CRK_CD" + c1].Text.ToString()!=""; c1++)
- {
- ArrayList list = new ArrayList();
- if (ugr.Cells["QUEXIAN_TP"].Value.ToString() == "")
- {
- MessageBox.Show("请选择缺陷来源次!", "提示");
- return;
- }
- list.Add("");
- list.Add(c1);
- list.Add(ugr.Cells["CRK_CD" + c1].Text.ToString() == "" ? ugr.Cells["CRK_CD" + c1].Text.ToString() : ugr.Cells["CRK_CD" + c1].Value.ToString());
- list.Add(ugr.Cells["CRK_CD" + c1].Text.ToString());
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add(ugr.Cells["QUEXIAN_TP"].Value.ToString());
- list5.Add(list);
- }
- }
- /*foreach (UltraGridRow ugrs in this.ultraGrid4.Rows)
- {
- if (ugrs.Cells["CHECKBOX"].Text.ToString() == "True")
- {
- int j = 2;
- ArrayList list = new ArrayList();
- if (ugrs.Cells["QUEXIAN_TP"].Value.ToString() == "")
- {
- MessageBox.Show("请选择缺陷来源次!", "提示");
- return;
- }
- if (ugrs.Cells["PRIMARY_FLAG"].Value.ToString() == "1")
- i++;
- list.Add(ugrs.Cells["PRIMARY_FLAG"].Value.ToString());
- if (ugrs.Cells["PRIMARY_FLAG"].Value.ToString() == "1")
- {
- list.Add("1");
- j = j - 1;
- }
- else
- {
- list.Add(j);
- }
- if (ugrs.Cells["FLAW_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_DESC"].Text.ToString() == "")
- {
- MessageBox.Show("已选择的请录入缺陷信息!");
- return;
- }
- if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上表面")
- {
- list.Add("U");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "下表面")
- {
- list.Add("D");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "边部")
- {
- list.Add("E");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "钢卷侧面")
- {
- list.Add("A");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上下表面都有,且不对称")
- {
- list.Add("N");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上下表面都有,且对称")
- {
- list.Add("S");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上凸下凹")
- {
- list.Add("T");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上凹下凸")
- {
- list.Add("B");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "已跟踪去重卷切除")
- {
- list.Add("C");
- }
- else
- {
- list.Add("");
- }
- //list.Add(ugrs.Cells["FLAW_TYPE_DESC"].Value.ToString());
- //list.Add(ugrs.Cells["FLAW_TYPE_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_POS_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_POS_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_POS_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_POS_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_DIR_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_DIR_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_DIR_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_DIR_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_SIZE_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_SIZE_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_SIZE_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_SIZE_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_LV_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_LV_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_LV_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_LV_DESC"].Text.ToString());
- //if (!IsNumberal(ugrs.Cells["FLAW_QUANTITY"].Text))
- //{
- // MessageBox.Show("数量请输入数字!");
- // return;
- //}
- list.Add(ugrs.Cells["FLAW_QUANTITY"].Text.ToString());
- list.Add(ugrs.Cells["MEMO"].Text.ToString());
- if (ugrs.Cells["IS_REPAIR"].Text.ToString() == "")
- {
- list.Add("0");
- }
- else
- {
- list.Add(ugrs.Cells["IS_REPAIR"].Value.ToString());
- }
- list.Add(ugrs.Cells["QUEXIAN_TP"].Value.ToString());
- count1++;
- j++;
- list5.Add(list);
- ugr.Cells["CRK_CD" + x++].Value = ugrs.Cells["FLAW_DESC"].Text.ToString() == "" ? ugrs.Cells["FLAW_DESC"].Text.ToString() : ugrs.Cells["FLAW_DESC"].Value.ToString();
- }
- }*/
- /*if (count1 == 0 && comboBox3.Text.ToString() == "不合格")
- {
- MessageBox.Show("请录入缺陷信息并选择!");
- return;
- }
- if (i == 0 && comboBox3.Text.ToString() == "不合格")
- {
- MessageBox.Show("请录入主要缺陷!");
- return;
- }*/
- //if (i > 1)
- //{
- // MessageBox.Show("请不要录入多条主要缺陷!");
- // return;
- //}
- /*if ((comboBox3.Text.ToString() == "合格" && comboBox5.Text.ToString() != "正品") || (comboBox3.Text.ToString() == "不合格" && comboBox5.Text.ToString() == "正品"))
- {
- MessageBox.Show("检验结果与质量等级不一致!");
- return;
- }*/
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "doAddFlawJ";
- ccp.ServerParams = new object[] { list5, list4 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- }
- if (ugr.Cells["CHECK"].Text.ToString() == "True" && ugr.Cells["CRK_YN"].Text.ToString() == "Y")
- {
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text.ToString()); jx++;//钢卷号
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD1"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷1
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD2"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷2
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD3"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷3
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD4"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷4
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD5"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷5
- }
- /*ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5*/
- ht.Add("i" + jx, "热轧缺陷录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_RZQXLR.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- /* if (ugr.Cells["EXTSHAPE_YN"].Text.ToString() == "Y")
- {
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", "");
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["EXTSHAPE_QUALITY_GRD"].Value.ToString());
- ht.Add("i" + jx, "");
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//操作人
- ht.Add("i" + jx, ss); jx++;//
- ht.Add("i" + jx, "热轧外观质量等级录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_RZSJXG.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["EXTSHAPE_YN"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }*/
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", "");
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, "热轧"); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//
- ht.Add("i" + jx, ss); jx++;//
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_WAIGUAN.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- }
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- if ((ugr.Cells["VAL"].Value.ToString() != "" && ugr.Cells["VAL_2"].Value.ToString() != "") &&
- (ugr.Cells["VAL2"].Value.ToString() != "" && ugr.Cells["VAL2_2"].Value.ToString() != ""))
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- List<ArrayList> list3 = new List<ArrayList>();
- list1.Add(ugr.Cells["DESIGN_KEY"].Value.ToString());
- list1.Add(ugr.Cells["MATERIAL_NO"].Value.ToString());
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "待处理")
- {
-
- list1.Add("0");
- list1.Add("待判");
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "正品")
- {
- list1.Add("");
- list1.Add("");
- }
- else
- {
- list1.Add("2");
- list1.Add("不合格");
- }
-
- //else
- //{
- // if (comboBox1.Text.ToString() == "合格")
- // {
- // list1.Add("1");
- // list1.Add("合格");
- // }
- // else if (comboBox1.Text.ToString() == "不合格")
- // {
- // list1.Add("2");
- // list1.Add("不合格");
- // }
- // else
- // {
- // list1.Add("0");
- // list1.Add("待判");
- // }
- //}
- string ss = ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString();
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "")
- {
- MessageBox.Show("请选择公差质量等级", "提示");
- return;
- }
- string is_zl = "";
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "待处理")
- {
- is_zl = "512606";
- }
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());
- list1.Add(this.UserInfo.GetUserOrderText());
- list1.Add(this.UserInfo.GetUserGroupText());
- list1.Add(is_zl);//质量等级代码
- list1.Add(ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString());//质量等级名称
-
- ArrayList list = new ArrayList();
- if (ugr.Cells["BIAS_CODE"].Text.ToString() == "" || ugr.Cells["BIAS_CODE_2"].Text.ToString() == "")
- {
- MessageBox.Show(ugr.Cells["MATERIAL_NO"].Value.ToString() + "卷没有判定标准");
- return;
- }
- list.Add(ugr.Cells["BIAS_CODE"].Text.ToString());
- list.Add(ugr.Cells["VAL"].Text.ToString());
- list.Add(ugr.Cells["BIAS_NAME"].Text.ToString());
- list.Add(ugr.Cells["PLAN"].Text.ToString());
- list.Add(ugr.Cells["VAL2"].Text.ToString());
- list2.Add(list);
- list = new ArrayList();
-
- list.Add(ugr.Cells["BIAS_CODE_2"].Text.ToString());
- list.Add(ugr.Cells["VAL_2"].Text.ToString());
- list.Add(ugr.Cells["BIAS_NAME_2"].Text.ToString());
- list.Add(ugr.Cells["PLAN_2"].Text.ToString());
- list.Add(ugr.Cells["VAL2_2"].Text.ToString());
- list2.Add(list);
- ArrayList listc1 = new ArrayList();
- listc1.Add("传动侧");
- listc1.Add(ugr.Cells["THICK_VAL1"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL1"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL1"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL1"].Value.ToString());
- list3.Add(listc1);
- listc1 = new ArrayList();
- listc1.Add("中间");
- listc1.Add(ugr.Cells["THICK_VAL2"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL2"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL2"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL2"].Value.ToString());
- list3.Add(listc1);
- listc1 = new ArrayList();
- listc1.Add("操作侧");
- listc1.Add(ugr.Cells["THICK_VAL3"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL3"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL3"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL3"].Value.ToString());
- list3.Add(listc1);
- /*if ((comboBox1.Text.ToString() == "合格" && comboBox2.Text.ToString() != "正品") || (comboBox1.Text.ToString() == "不合格" && comboBox2.Text.ToString() == "正品"))
- {
- MessageBox.Show("检验结果与质量等级不一致!");
- return;
- }*/
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "judgeByHumanRZ";
- ccp.ServerParams = new object[] { list1, list2, list3 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- else
- {
- MessageBox.Show("没有公差判定值,公差暂未判定");
- return;
-
- /*else
- {
- if (comboBox1.Text.ToString() == "合格")
- {
- list1.Add("1");
- list1.Add("合格");
- }
- else if (comboBox1.Text.ToString() == "待判")
- {
- list1.Add("0");
- list1.Add("待判");
- }
- else
- {
- list1.Add("2");
- list1.Add("不合格");
- }
- }
- string is_zl = "";
- if (comboBox2.Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (comboBox2.Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (comboBox2.Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (comboBox2.Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (comboBox2.Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- list1.Add(textBox5.Text.Trim().ToString());
- list1.Add(this.UserInfo.GetUserName());
- list1.Add(this.UserInfo.GetUserOrderText());
- list1.Add(this.UserInfo.GetUserGroupText());
- list1.Add(is_zl);//质量等级代码
- list1.Add(comboBox2.Text.Trim().ToString());//质量等级名称
- ArrayList listc1 = new ArrayList();
- listc1.Add("传动侧");
- listc1.Add(ugr.Cells["THICK_VAL1"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL1"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL1"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL1"].Value.ToString());
- list3.Add(listc1);
- listc1 = new ArrayList();
- listc1.Add("中间");
- listc1.Add(ugr.Cells["THICK_VAL2"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL2"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL2"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL2"].Value.ToString());
- list3.Add(listc1);
- listc1 = new ArrayList();
- listc1.Add("操作侧");
- listc1.Add(ugr.Cells["THICK_VAL3"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL3"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL3"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL3"].Value.ToString());
- list3.Add(listc1);
- if ((comboBox1.Text.ToString() == "合格" && comboBox2.Text.ToString() != "正品") || (comboBox1.Text.ToString() == "不合格" && comboBox2.Text.ToString() == "正品"))
- {
- MessageBox.Show("检验结果与质量等级不一致!");
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "judgeByHumanJ";
- ccp.ServerParams = new object[] { list1, list3 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);*/
- }
- }
- }
-
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- MessageBox.Show("表面公差检验登记成功!");
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- }
- private void ultraGrid3_InitializeLayout(object sender, InitializeLayoutEventArgs e)
- {
- }
- private void button1_Click_1(object sender, EventArgs e)
- {
- try
- {
- int count = 0;
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- if ((ugr.Cells["VAL"].Value.ToString() != "" && ugr.Cells["VAL_2"].Value.ToString() != "") &&
- (ugr.Cells["VAL2"].Value.ToString() != "" && ugr.Cells["VAL2_2"].Value.ToString() != ""))
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- List<ArrayList> list3 = new List<ArrayList>();
- list1.Add(ugr.Cells["DESIGN_KEY"].Value.ToString());
- list1.Add(ugr.Cells["MATERIAL_NO"].Value.ToString());
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "待处理")
- {
- list1.Add("0");
- list1.Add("待判");
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "正品")
- {
- list1.Add("");
- list1.Add("");
- }
- else
- {
- list1.Add("2");
- list1.Add("不合格");
- }
-
-
- //else
- //{
- // if (comboBox1.Text.ToString() == "合格")
- // {
- // list1.Add("1");
- // list1.Add("合格");
- // }
- // else if (comboBox1.Text.ToString() == "不合格")
- // {
- // list1.Add("2");
- // list1.Add("不合格");
- // }
- // else
- // {
- // list1.Add("0");
- // list1.Add("待判");
- // }
- //}
- string ss = ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString();
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "")
- {
- MessageBox.Show("请选择公差质量等级","提示");
- return;
- }
- string is_zl = "";
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- else if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "待处理")
- {
- is_zl = "512606";
- }
- if (!(ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "正品"||ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() == "待处理")
- && ugr.Cells["CRK_CD1" ].Text.ToString() == "")
- {
- MessageBox.Show(ugr.Cells["MATERIAL_NO"].Value.ToString() + "卷公差质量等级不合格,请选择尺寸缺陷","提示");
- return;
- }
- if (ugr.Cells["CRK_YN"].Text.ToString() == "Y")
- {
- int jx = 1;
- CoreClientParam ccp1 = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text.ToString()); jx++;//钢卷号
- /*ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5 */
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD1"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷1
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD2"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷2
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD3"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷3
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD4"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷4
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD5"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷5
- }
- ht.Add("i" + jx, "热轧缺陷录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp1.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp1.MethodName = "doXmlProcedure";
- ccp1.ServerParams = new object[] { "UIB030110_RZQXLR.CALL", ht };
- this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- ugr.Cells["CRK_YN"].Value = "";
- ArrayList all = ccp1.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- return;
- }
-
- }
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());
- list1.Add(this.UserInfo.GetUserOrderText());
- list1.Add(this.UserInfo.GetUserGroupText());
- list1.Add(is_zl);//质量等级代码
- list1.Add(ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString());//质量等级名称
-
- ArrayList list = new ArrayList();
- if (ugr.Cells["BIAS_CODE"].Text.ToString() == "" || ugr.Cells["BIAS_CODE_2"].Text.ToString() == "")
- {
- MessageBox.Show(ugr.Cells["MATERIAL_NO"].Value.ToString() + "卷没有判定标准");
- return;
- }
- if (ugr.Cells["CRK_YN"].Text.ToString() == "Y")
- {
- for (int c1 = 1; c1 < 6 && ugr.Cells["CRK_CD" + c1].Text.ToString() != ""; c1++)
- {
- }
- }
- list.Add(ugr.Cells["BIAS_CODE"].Text.ToString());
- list.Add(ugr.Cells["VAL"].Text.ToString());
- list.Add(ugr.Cells["BIAS_NAME"].Text.ToString());
- list.Add(ugr.Cells["PLAN"].Text.ToString());
- list.Add(ugr.Cells["VAL2"].Text.ToString());
- list2.Add(list);
- list = new ArrayList();
- list.Add(ugr.Cells["BIAS_CODE_2"].Text.ToString());
- list.Add(ugr.Cells["VAL_2"].Text.ToString());
- list.Add(ugr.Cells["BIAS_NAME_2"].Text.ToString());
- list.Add(ugr.Cells["PLAN_2"].Text.ToString());
- list.Add(ugr.Cells["VAL2_2"].Text.ToString());
- list2.Add(list);
- ArrayList listc1 = new ArrayList();
- listc1.Add("传动侧");
- listc1.Add(ugr.Cells["THICK_VAL1"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL1"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL1"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL1"].Value.ToString());
- list3.Add(listc1);
- listc1 = new ArrayList();
- listc1.Add("中间");
- listc1.Add(ugr.Cells["THICK_VAL2"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL2"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL2"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL2"].Value.ToString());
- list3.Add(listc1);
- listc1 = new ArrayList();
- listc1.Add("操作侧");
- listc1.Add(ugr.Cells["THICK_VAL3"].Text.ToString());
- listc1.Add(ugr.Cells["H_VAL3"].Value.ToString());
- listc1.Add(ugr.Cells["M_VAL3"].Value.ToString());
- listc1.Add(ugr.Cells["R_VAL3"].Value.ToString());
- list3.Add(listc1);
- /*if ((comboBox1.Text.ToString() == "合格" && comboBox2.Text.ToString() != "正品") || (comboBox1.Text.ToString() == "不合格" && comboBox2.Text.ToString() == "正品"))
- {
- MessageBox.Show("检验结果与质量等级不一致!");
- return;
- }*/
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "judgeByHumanRZ";
- ccp.ServerParams = new object[] { list1, list2, list3 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- else
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list3 = new List<ArrayList>();
- list1.Add(ugr.Cells["DESIGN_KEY"].Value.ToString());
- list1.Add(ugr.Cells["MATERIAL_NO"].Value.ToString());
- if (ugr.Cells["SIZE_QUALITY_GRD"].Text.ToString() != "")
- {
- MessageBox.Show("请输入公差判定值!");
- return;
- }
-
- }
- }
- /* if (ugr.Cells["CHECK"].Text.ToString() == "True" && ugr.Cells["SIZE_YN"].Text.ToString() == "Y")
- {
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", "");
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SIZE_QUALITY_GRD"].Value.ToString());
- ht.Add("i" + jx, "");
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//操作人
- ht.Add("i" + jx, ss); jx++;//
- ht.Add("i" + jx, "热轧公差质量等级录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_RZSJXG.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["SIZE_YN"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }*/
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- MessageBox.Show("公差检验登记成功!");
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- try
- {
- /*int count = 0;
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- count++;
- }
- }*/
-
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in ultraGrid3.Rows)
- {
- //int x = 1;
-
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- /*if ((ugr.Cells["VAL"].Value.ToString() == "" || ugr.Cells["VAL_2"].Value.ToString() == "") ||
- (ugr.Cells["VAL2"].Value.ToString() == "" || ugr.Cells["VAL2_2"].Value.ToString() == ""))
- {
- MessageBox.Show("公差判定值为空,请对判定值进行输机操作再判定或者单独进行表面判定","提示");
- return;
- }*/
- ArrayList list4 = new ArrayList();
- List<ArrayList> list5 = new List<ArrayList>();
- string ss = ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString();
- if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "")
- {
- MessageBox.Show("请选择表面质量等级");
- return;
- }
- //if (comboBox2.Text.Trim() == "")
- //{
- // MessageBox.Show("请输入质量等级!");
- // return;
- //}
- string is_pass = "";
- string is_zl = "";
- string result_extshape = "";
- /*if (comboBox3.Text.ToString() == "合格")
- {
- is_pass = "1";
- }
- else if (comboBox3.Text.ToString() == "不合格")
- {
- is_pass = "2";
- }
- else if (comboBox3.Text.ToString() == "待判")
- {
- is_pass = "0";
- }
- else
- {
- is_pass = "";
- }*/
- if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "正品")
- {
- is_pass = "1";
- is_zl = "512601";
- result_extshape = "合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "次品")
- {
- is_zl = "512602";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "废品")
- {
- is_zl = "512603";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "协议品")
- {
- is_zl = "512604";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "订单外")
- {
- is_zl = "512605";
- is_pass = "2";
- result_extshape = "不合格";
- }
- else if (ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "待处理")
- {
- is_zl = "512606";
- is_pass = "0";
- result_extshape = "待判";
- }
- if (!(ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "正品" || ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString() == "待处理"
- || is_zl == "512601" || is_zl == "512606" )
- && (ugr.Cells["CRK_CD1"].Text.ToString() == "" || ugr.Cells["CRK_CD1"].Value == null))
- {
- MessageBox.Show(ugr.Cells["MATERIAL_NO"].Value.ToString() + "卷表面质量等级不合格,请选择外观缺陷", "提示");
- return;
- }
- list4.Add(ugr.Cells["MATERIAL_NO"].Value.ToString());
- list4.Add(is_pass);//检验结果代码
- list4.Add(result_extshape);//检验结果
- list4.Add(is_zl);//质量等级代码
- list4.Add(ugr.Cells["EXTSHAPE_QUALITY_GRD"].Text.ToString());//质量等级名称
- list4.Add("");//检验备注
- list4.Add(this.UserInfo.GetUserName());//操作人
- list4.Add(this.UserInfo.GetUserOrderText());//班次
- list4.Add(this.UserInfo.GetUserGroupText());//班组
- list4.Add("新表面公差检验管理(热轧)的表面检验登记按钮");
- int count1 = 0;
- int i = 0;
- if (ugr.Cells["CRK_YN"].Text.ToString()=="Y")
- {
- for (int c1 = 1; c1 < 6 && ugr.Cells["CRK_CD" + c1].Text.ToString() != ""; c1++)
- {
- ArrayList list = new ArrayList();
- if (ugr.Cells["QUEXIAN_TP"].Value.ToString() == "")
- {
- MessageBox.Show("请选择缺陷来源次!", "提示");
- return;
- }
- list.Add("");
- list.Add(c1);
- list.Add(ugr.Cells["CRK_CD"+c1].Text.ToString()==""?ugr.Cells["CRK_CD"+c1].Text.ToString():ugr.Cells["CRK_CD"+c1].Value.ToString());
- list.Add(ugr.Cells["CRK_CD"+c1].Text.ToString());
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add("");
- list.Add(ugr.Cells["QUEXIAN_TP"].Value.ToString());
- list5.Add(list);
- }
- }
-
- /*foreach (UltraGridRow ugrs in this.ultraGrid4.Rows)
- {
- if (ugrs.Cells["CHECKBOX"].Text.ToString() == "True")
- {
- int j = 2;
- ArrayList list = new ArrayList();
- if ( ugrs.Cells["QUEXIAN_TP"].Value.ToString() == "")
- {
- MessageBox.Show("请选择缺陷来源次!", "提示");
- return;
- }
- if (ugrs.Cells["PRIMARY_FLAG"].Value.ToString() == "1")
- i++;
- list.Add(ugrs.Cells["PRIMARY_FLAG"].Value.ToString());
- if (ugrs.Cells["PRIMARY_FLAG"].Value.ToString() == "1")
- {
- list.Add("1");
- j = j - 1;
- }
- else
- {
- list.Add(j);
- }
- if (ugrs.Cells["FLAW_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_DESC"].Text.ToString() == "")
- {
- MessageBox.Show("已选择的请录入缺陷信息!");
- return;
- }
- if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上表面")
- {
- list.Add("U");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "下表面")
- {
- list.Add("D");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "边部")
- {
- list.Add("E");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "钢卷侧面")
- {
- list.Add("A");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上下表面都有,且不对称")
- {
- list.Add("N");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上下表面都有,且对称")
- {
- list.Add("S");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上凸下凹")
- {
- list.Add("T");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "上凹下凸")
- {
- list.Add("B");
- }
- else if (ugrs.Cells["FLAW_AREA"].Text.ToString() == "已跟踪去重卷切除")
- {
- list.Add("C");
- }
- else
- {
- list.Add("");
- }
- //list.Add(ugrs.Cells["FLAW_TYPE_DESC"].Value.ToString());
- //list.Add(ugrs.Cells["FLAW_TYPE_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_POS_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_POS_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_POS_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_POS_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_DIR_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_DIR_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_DIR_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_DIR_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_SIZE_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_SIZE_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_SIZE_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_SIZE_DESC"].Text.ToString());
- if (ugrs.Cells["FLAW_LV_DESC"].Text.ToString() == "")
- {
- list.Add(ugrs.Cells["FLAW_LV_DESC"].Text.ToString());
- }
- else
- {
- list.Add(ugrs.Cells["FLAW_LV_DESC"].Value.ToString());
- }
- list.Add(ugrs.Cells["FLAW_LV_DESC"].Text.ToString());
- //if (!IsNumberal(ugrs.Cells["FLAW_QUANTITY"].Text))
- //{
- // MessageBox.Show("数量请输入数字!");
- // return;
- //}
- list.Add(ugrs.Cells["FLAW_QUANTITY"].Text.ToString());
- list.Add(ugrs.Cells["MEMO"].Text.ToString());
- if (ugrs.Cells["IS_REPAIR"].Text.ToString() == "")
- {
- list.Add("0");
- }
- else
- {
- list.Add(ugrs.Cells["IS_REPAIR"].Value.ToString());
- }
- list.Add(ugrs.Cells["QUEXIAN_TP"].Value.ToString());
- count1++;
- j++;
- list5.Add(list);
- ugr.Cells["CRK_CD" + x++].Value = ugrs.Cells["FLAW_DESC"].Text.ToString() == "" ? ugrs.Cells["FLAW_DESC"].Text.ToString() : ugrs.Cells["FLAW_DESC"].Value.ToString();
- }
- }*/
- /*if (count1 == 0 && comboBox3.Text.ToString() == "不合格")
- {
- MessageBox.Show("请录入缺陷信息并选择!");
- return;
- }*/
- /*if (i == 0 && comboBox3.Text.ToString() == "不合格")
- {
- MessageBox.Show("请录入主要缺陷!");
- return;
- }*/
- //if (i > 1)
- //{
- // MessageBox.Show("请不要录入多条主要缺陷!");
- // return;
- //}
- /*if ((comboBox3.Text.ToString() == "合格" && comboBox5.Text.ToString() != "正品") || (comboBox3.Text.ToString() == "不合格" && comboBox5.Text.ToString() == "正品"))
- {
- MessageBox.Show("检验结果与质量等级不一致!");
- return;
- }*/
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "doAddFlawJ";
- ccp.ServerParams = new object[] { list5, list4 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- lists.Add(ugr);
- }
- if (ugr.Cells["CHECK"].Text.ToString() == "True" && ugr.Cells["CRK_YN"].Text.ToString() == "Y")
- {
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text.ToString()); jx++;//钢卷号
- /*ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5 */
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD1"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷1
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD2"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷2
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD3"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷3
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD4"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷4
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD5"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷5
- }
- ht.Add("i" + jx, "热轧缺陷录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_RZQXLR.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["CRK_YN"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- return;
- }
- }
- /*--if (ugr.Cells["CHECK"].Text.ToString() == "True" && ugr.Cells["EXTSHAPE_YN"].Text.ToString() == "Y")
- {
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", "");
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text); jx++;//钢卷号
- ht.Add("i"+jx ,ugr.Cells["EXTSHAPE_QUALITY_GRD"].Value.ToString());
- ht.Add("i"+jx ,"");
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//操作人
- ht.Add("i" + jx, ss); jx++;//
- ht.Add("i" + jx, "热轧外观质量等级录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_RZSJXG.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["EXTSHAPE_YN"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }*/
-
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", "");
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, "热轧"); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text.ToString()); jx++;//钢卷号
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//
- ht.Add("i" + jx, ss); jx++;//
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_WAIGUAN.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- return;
- }
- }
- }
- for (int i = 0; i < lists.Count; i++)
- {
- lists[i].Delete(false);
- }
- //DoQuery();
- MessageBox.Show("表面登记成功!");
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void button4_Click(object sender, EventArgs e)
- {
- try
- {
-
- foreach (UltraGridRow ugr in ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- /*ArrayList list4 = new ArrayList();
- List<ArrayList> list5 = new List<ArrayList>();
- list4.Add(ugr.Cells["CJ_REMARK"].Text.ToString());
- list4.Add(ugr.Cells["CPCJ_REMARK"].Text.ToString());
- list4.Add(ugr.Cells["SPM_RMK"].Text.ToString());
- list4.Add(ugr.Cells["DEAL_REMARK"].Text.ToString());
- list4.Add(ugr.Cells["MATERIAL_NO"].Text.ToString());
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "upRemarks";
- ccp.ServerParams = new object[] { list4 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }*/
- int jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, ugr.Cells["MATERIAL_NO"].Text.ToString()); jx++;//钢卷号
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD1"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷1
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD2"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷2
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD3"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷3
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD4"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷4
- }
- if (true.Equals(IsNumberal(ugr.Cells["CRK_CD5"].Value.ToString())))
- {
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5
- }
- else
- {
- ht.Add("i" + jx, ""); jx++; //缺陷5
- }
- /*ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++; //缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++; //缺陷2
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++; //缺陷3
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++; //缺陷4
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++; //缺陷5*/
- //ht.Add("i" + jx, ugr.Cells["QUEXIAN_TP"].Value.ToString()); jx++; //缺陷来源次
- ht.Add("i" + jx, "热轧缺陷录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_RZQXLR.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["CRK_YN"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- return;
- }
- }
- }
- MessageBox.Show("缺陷录入成功");
- //DoQuery();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- /*public static bool IsNumberal(string input)
- {
- bool flag = true;
- int count = 0;
- int count1 = 0;
- if (input.Length == 0)
- {
- flag = false;
- }
- else
- {
- char[] x = input.ToCharArray();
- for (int i = 0; i < input.Length; i++)
- {
- if (!char.IsNumber(x[i]) && x[i] != '.' && x[i] != '-')
- {
- flag = false; break;
- }
- if (x[i] == '.')
- {
- count++;
- if (i == 0 || i == input.Length - 1) flag = false;
- }
- if (x[i] == '-')
- {
- count1++;
- if (i > 1) flag = false;
- }
- }
- if (count > 1 || count1 > 1) flag = false;
- }
- return flag;
- }*/
- private void ultraGrid3_KeyDown(object sender, KeyEventArgs e)
- {
- try
- {
-
- if (e.KeyCode != Keys.Enter)
- return; //只对回车事件操作
- if (this.ultraGrid3.ActiveCell==null)
- {
- MessageBox.Show("请选择具体的单元格再按回车", "提示");
- return;
- }
- if (this.ultraGrid3.ActiveCell.Column.Key != "VAL"//只对判定厚度、判定宽度、备注等操作
- && this.ultraGrid3.ActiveCell.Column.Key != "VAL_2"
- && this.ultraGrid3.ActiveCell.Column.Key != "CPCJ_REMARK"
- && this.ultraGrid3.ActiveCell.Column.Key != "CJ_REMARK"
- && this.ultraGrid3.ActiveCell.Column.Key != "DEAL_REMARK"
- && this.ultraGrid3.ActiveCell.Column.Key != "SPM_RMK"
- //20231113新增责任归属单位录入
- && this.ultraGrid3.ActiveCell.Column.Key != "RSEPON_UNIT"
- && this.ultraGrid3.ActiveCell.Column.Key != "DETAINFO"
- )
- return;
- if (this.ultraGrid3.ActiveCell.DataChanged == false) return;//无数据变更时不做修改操作
- if (this.ultraGrid3.ActiveCell.Column.Key == "RSEPON_UNIT" || this.ultraGrid3.ActiveCell.Column.Key == "DETAINFO")
- {
- int jx1;
- jx1 = 1;
- CoreClientParam ccp1 = new CoreClientParam();
- Hashtable ht1 = new Hashtable();
- ht1.Add("i" + jx1, this.ultraGrid3.ActiveRow.Cells["MATERIAL_NO"].Text.ToString()); jx1++; //钢卷号
- ht1.Add("i" + jx1, this.ultraGrid3.ActiveRow.Cells["RSEPON_UNIT"].Text.ToString()); jx1++; //责任单位
- ht1.Add("i" + jx1, this.UserInfo.GetUserName().ToString()); jx1++; //录入人
- ht1.Add("i" + jx1, this.ultraGrid3.ActiveRow.Cells["DETAINFO"].Text.ToString()); jx1++; //详细信息 DETAINFO
- ht1.Add("i" + jx1, "1"); jx1++; //缺陷5
- ht1.Add("i" + jx1, "1"); jx1++; //缺陷5
- //ht.Add("i" + jx, ugr.Cells["QUEXIAN_TP"].Value.ToString()); jx++; //缺陷来源次
- ht1.Add("i" + jx1, "卷板责任归属单位"); jx1++;//操作标志
- ht1.Add("o" + jx1, ""); jx1 = 1;
- ccp1.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp1.MethodName = "doXmlProcedure";
- ccp1.ServerParams = new object[] { "UIB030110_RZQXLR.CALL", ht1 };
- this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- ArrayList all = ccp1.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- return;
- }
- MessageBox.Show("责任归属单位录入成功");
- }
- int jx;
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- if (this.ultraGrid3.ActiveCell.Column.Key == "VAL" || this.ultraGrid3.ActiveCell.Column.Key == "VAL_2")
- {
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", "");
- ht.Add("i" + jx, this.ultraGrid3.ActiveRow.Cells["MATERIAL_NO"].Text.ToString()); jx++;//钢卷号
- ht.Add("i" + jx, this.ultraGrid3.ActiveRow.Cells["VAL"].Text); jx++;//录入厚度
- ht.Add("i" + jx, this.ultraGrid3.ActiveRow.Cells["VAL_2"].Text); jx++;//录入宽度
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//操作人
- ht.Add("i" + jx, ss); jx++;
- ht.Add("i" + jx, "热轧判定规格录入"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_RZSJXG.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- int currentColIndex = this.ultraGrid3.ActiveCell.Column.Index;//换行前获取当前列的列序号
- this.ultraGrid3.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.NextRow);
- this.ultraGrid3.ActiveRow.Cells[currentColIndex].Activate();
- this.ultraGrid3.PerformAction(UltraGridAction.EnterEditMode);
- }
- if (this.ultraGrid3.ActiveCell.Column.Key == "CPCJ_REMARK"
- || this.ultraGrid3.ActiveCell.Column.Key == "CJ_REMARK"
- || this.ultraGrid3.ActiveCell.Column.Key == "DEAL_REMARK"
- || this.ultraGrid3.ActiveCell.Column.Key == "SPM_RMK")
- {
- ArrayList list4 = new ArrayList();
- List<ArrayList> list5 = new List<ArrayList>();
- list4.Add(this.ultraGrid3.ActiveRow.Cells["CJ_REMARK"].Text.ToString());
- list4.Add(this.ultraGrid3.ActiveRow.Cells["CPCJ_REMARK"].Text.ToString());
- list4.Add(this.ultraGrid3.ActiveRow.Cells["SPM_RMK"].Text.ToString());
- list4.Add(this.ultraGrid3.ActiveRow.Cells["DEAL_REMARK"].Text.ToString());
- list4.Add(this.ultraGrid3.ActiveRow.Cells["MATERIAL_NO"].Text.ToString());
- list4.Add(this.UserInfo.GetUserName().ToString());
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "upRemarks";
- ccp.ServerParams = new object[] { list4 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- MessageBox.Show("备注修改成功");
- }
-
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
-
- private void ultraGrid3_CellChange(object sender, CellEventArgs e)
- {
- try
- {
- //string MES = "";
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHECK"].Value))
- {
- if (ugr.Cells["SPM_APPOINT_SYS"] == e.Cell)
- {
- if (this.UserInfo.GetUserID().ToString() == "X07832" || this.UserInfo.GetUserID().ToString() == "X07784"
- || this.UserInfo.GetUserID().ToString() == "X07799" || this.UserInfo.GetUserID().ToString() == "X07809"
- || this.UserInfo.GetUserID().ToString() == "X07835" || this.UserInfo.GetUserID().ToString() == "X07816"
- || this.UserInfo.GetUserID().ToString() == "X07823" || this.UserInfo.GetUserID().ToString() == "X07802")
- {
- MessageBox.Show("该账号没有平整权限", "提示");
- return;
- }
- if ("Y".Equals(ugr.Cells["FB_YN"].Value.ToString()))
- {
- MessageBox.Show("该卷已封闭,请取消封闭后再进行平整操作", "提示");
- return;
- }
- if (ugr.Cells["CUR_PROG_CD"].Value.ToString() == "SPA" || ugr.Cells["CUR_PROG_CD"].Value.ToString() == "SED" || ugr.Cells["CUR_PROG_CD"].Value.ToString() == "SPB")
- {
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- string spm_appoint ;
- if (ugr.Cells["SPM_APPOINT_SYS"].Text.ToString()=="平整")
- {
- spm_appoint = "1";
- }
- else if (ugr.Cells["SPM_APPOINT_SYS"].Text.ToString() == "分卷")
- {
- spm_appoint = "2";
- }
- else if (ugr.Cells["SPM_APPOINT_SYS"].Text.ToString() == "平整分卷")
- {
- spm_appoint = "3";
- }
- else if (ugr.Cells["SPM_APPOINT_SYS"].Text.ToString() == "重卷")
- {
- spm_appoint = "4";
- }
- else if (ugr.Cells["SPM_APPOINT_SYS"].Text.ToString() == "开卷检查")
- {
- spm_appoint = "5";
- }
- else if (ugr.Cells["SPM_APPOINT_SYS"].Text.ToString() == "完成")
- {
- spm_appoint = "D";
- }
- else if (ugr.Cells["SPM_APPOINT_SYS"].Text.ToString() == "综合判定")
- {
- spm_appoint = "S";
- }
- else
- {
- spm_appoint = "";
- }
- ugr.Cells["SPM_APPOINT_SYS"].Value.ToString();
- ht.Add("i1", ugr.Cells["COIL_NO"].Text.ToString());//流水钢卷号
- ht.Add("i2", spm_appoint);//平整分卷
- ht.Add("i3", this.UserInfo.GetUserName().ToString());//操作人
- ht.Add("i4", ugr.Cells["SPM_RMK"].Text.ToString());//平整备注
- ht.Add("o5", "");
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "SPM_APPOINT.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (spm_appoint == "D")
- {
- string remark = "平整完成";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- }
- else if (spm_appoint == "5")
- {
- string remark = "开卷检查";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- }
- else if (spm_appoint == "4")
- {
- string remark = "重卷";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- }
- else if (spm_appoint == "3")
- {
- string remark = "平整分卷";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- }
- else if (spm_appoint == "2")
- {
- string remark = "分卷";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- }
- else if (spm_appoint == "1")
- {
- string remark = "平整";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- }
- else if (spm_appoint == "S")
- {
- string remark = "平整综合判定";
- CoreClientParam ccp1 = new CoreClientParam();
- ccp1.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp1.MethodName = "RZ_Record";
- ccp1.ServerParams = new object[] { ugr.Cells["MATERIAL_NO"].Value.ToString(), this.UserInfo.GetUserName().ToString(), remark };
- ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
- if (ccp1.ReturnCode == -1)
- {
- return;
- }
- }
- /*if (all[0].ToString() == "XX")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }*/
- MessageBox.Show("平整指定成功", "提示");
- //DoQuery();
- }
- else
- {
- MessageBox.Show("当前卷号进程不可平整指定", "提示");
- }
-
- }
- if (ugr.Cells["CRK_CD1"] == e.Cell || ugr.Cells["CRK_CD2"] == e.Cell
- || ugr.Cells["CRK_CD3"] == e.Cell || ugr.Cells["CRK_CD4"] == e.Cell || ugr.Cells["CRK_CD5"] == e.Cell)
- {
- ugr.Cells["CRK_YN"].Value = "Y";
- }
- /*if (ugr.Cells["CRK_CD1"] == e.Cell && this.ultraCombo2Dataset != null)
- {
- ugr.Cells["CRK_CD1"].EditorComponent = this.ultraCombo2;
- ugr.Cells["CRK_YN"].Value = "Y";
- }
- if (ugr.Cells["CRK_CD2"] == e.Cell && this.ultraCombo2Dataset != null)
- {
- ugr.Cells["CRK_CD2"].EditorComponent = this.ultraCombo2;
- ugr.Cells["CRK_YN"].Value = "Y";
- }
- if (ugr.Cells["CRK_CD3"] == e.Cell && this.ultraCombo2Dataset != null)
- {
- ugr.Cells["CRK_CD3"].EditorComponent = this.ultraCombo2;
- ugr.Cells["CRK_YN"].Value = "Y";
- }
- if (ugr.Cells["CRK_CD4"] == e.Cell && this.ultraCombo2Dataset != null)
- {
- ugr.Cells["CRK_CD4"].EditorComponent = this.ultraCombo2;
- ugr.Cells["CRK_YN"].Value = "Y";
- }
- if (ugr.Cells["CRK_CD5"] == e.Cell && this.ultraCombo2Dataset != null)
- {
- ugr.Cells["CRK_CD5"].EditorComponent = this.ultraCombo2;
- ugr.Cells["CRK_YN"].Value = "Y";
- }*/
- if (ugr.Cells["QUEXIAN_TP"] == e.Cell)
- {
- string lb;
- if (ugr.Cells["QUEXIAN_TP"].Text.ToString() == "钢质次(A)")
- {
- lb = "钢质";
- }
- else
- {
- lb = "轧制";
- }
- ArrayList alt = new ArrayList();
- alt.Add("UIB030110_021N1.SELECT");
- alt.Add(lb);
- //alt.Add("UIB030110_022.SELECT");
- this.ultraCombo1Dataset.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { alt };
- ccp.SourceDataTable = this.ultraCombo1Dataset.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- /*if (ugr.Cells["SIZE_QUALITY_GRD"] == e.Cell )
- {
- ugr.Cells["EXTSHAPE_YN"].Value = "Y";
- }
- if (ugr.Cells["EXTSHAPE_QUALITY_GRD"] == e.Cell)
- {
- ugr.Cells["SIZE_YN"].Value = "Y";
- }*/
- }
-
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void button5_Click(object sender, EventArgs e)
- {
- try
- {
- //缺陷
- ArrayList alt = new ArrayList();
- alt.Add("UIB030110_021N.SELECT");
- //alt.Add("UIB030110_022.SELECT");
- this.ultraCombo1Dataset.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { alt };
- ccp.SourceDataTable = this.ultraCombo1Dataset.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
-
-
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
-
- /*private void ultraGrid4_CellChanged(object sender, CellEventArgs e)
- {
- try
- {
- Hashtable ht = new Hashtable();
- int x = 1, x1 = 1;
- foreach (UltraGridRow ugrs in this.ultraGrid4.Rows)
- {
- if (ugrs.Cells["CHECKBOX"].Text.ToString() == "True")
- {
- if (ugrs.Cells["FLAW_DESC"] == e.Cell)
- {
- ht.Add("i" + x++, ugrs.Cells["FLAW_DESC"].Value.ToString());
- ht.Add("i" + x++, ugrs.Cells["FLAW_DESC"].Text.ToString());
- }
- }
- }
- /*string crk_cd1 = "";
- string crk_cd2 = "";
- string crk_cd3 = "";
- string crk_cd4 = "";
- string crk_cd5 = "";
- Hashtable ht = new Hashtable();
- int x = 1,x1 = 1;
- foreach (UltraGridRow ugrs in this.ultraGrid4.Rows)
- {
- if (ugrs.Cells["CHECKBOX"].Text.ToString() == "True")
- {
- if (ugrs.Cells["FLAW_DESC"] == e.Cell)
- {
- ht.Add("i"+x++, ugrs.Cells["FLAW_DESC"].Value.ToString());//流水钢卷号
- }
- }
- }
- foreach (UltraGridRow ugr in this.ultraGrid3.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- foreach (DictionaryEntry hl in ht) //获取文件
- {
- //string Key = hl.Key.ToString(); //Key
- string Value = (string)hl.Value.ToString(); //Value
- ugr.Cells["CRK_CD" + (x1++)].Value = Value;
- }
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- */
- /*private void ultraGrid3_KeyUp(object sender, KeyEventArgs e)
- {
- int currentColIndex = this.ultraGrid3.ActiveCell.Column.Index;
- switch (e.KeyCode)
- {
- case Keys.Up:
- this.ultraGrid3.PerformAction(UltraGridAction.ExitEditMode);
- this.ultraGrid3.PerformAction(UltraGridAction.AboveRow);
- this.ultraGrid3.ActiveRow.Cells[currentColIndex].Activate();
- e.Handled = true;
- this.ultraGrid3.PerformAction(UltraGridAction.EnterEditMode);
- break;
- case Keys.Down:
- this.ultraGrid3.PerformAction(UltraGridAction.ExitEditMode);
- this.ultraGrid3.PerformAction(UltraGridAction.NextRow);
- this.ultraGrid3.ActiveRow.Cells[currentColIndex].Activate();
- e.Handled = true;
- this.ultraGrid3.PerformAction(UltraGridAction.EnterEditMode);
- break;
- case Keys.Right:
- this.ultraGrid3.PerformAction(UltraGridAction.ExitEditMode);
- this.ultraGrid3.PerformAction(UltraGridAction.NextCell);
- e.Handled = true;
- this.ultraGrid3.PerformAction(UltraGridAction.EnterEditMode);
- break;
- case Keys.Left:
- this.ultraGrid3.PerformAction(UltraGridAction.ExitEditMode);
- this.ultraGrid3.PerformAction(UltraGridAction.PrevCell);
- e.Handled = true;
- this.ultraGrid3.PerformAction(UltraGridAction.EnterEditMode);
- break;
- }
- }*/
-
- }
- }
|