| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003 |
- 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;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinGrid;
- using System.Collections;
- using System.Diagnostics;
- using Core.LZMes.Client.QCM;
- namespace Core.LZMes.Client.QCM
- {
- public partial class QCM031010 : FrmBase
- {
- public QCM031010()
- {
- InitializeComponent();
- }
- // public DataSet ds = new DataSet();
- private string SLSelected = null;
- string strQxly = "";
- string strMian = "";
- string strCe = "";
- string strTou = "";
- string strDaxiao = "";
- string strDuoshao = "";
- string strShougan = "";
- string strChengdu = "";
- string strMemo = "";
- string strRepair = "";
- string strPrimary_flag = "";
- string defect_desc = "";
- string strMianval = "";
- string strCeval = "";
- string strTouval = "";
- string strDaxiaoval = "";
- string strDuoshaoval = "";
- string strShouganval = "";
- string strChengduval = "";
- string strMemoval = "";
- string strRepairval = "";
- string strPrimary_flagval = "";
- string defect_descval = "";
- string count = "";
- string strPline_Code = "";
- //string strQxly = "";
- List<SortedList> a = new List<SortedList>();
- int c;
- int jx = 1;
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.DoQuery();
- break;
- case "Save":
- this.DoSave();
- break;
- //case "Judge":
- // Operate();
- // break;
- case "FB":
- fb();
- break;
- case "Cancel_FB":
- cancel_fb();
- break;
- //case "FanXiu":
- // this.FanXiu();
- //break;
- case "Export":
- this.DoExport();
- break;
- }
- }
- private void DoQuery()
- {
- try
- {
- if (this.checkBox1.Checked)
- {
- DateTime dt1 = Convert.ToDateTime(this.ultraDateTimeEditor1.DateTime.ToString("yyyy-MM-dd"));
- DateTime dt2 = Convert.ToDateTime(this.ultraDateTimeEditor2.DateTime.ToString("yyyy-MM-dd"));
- TimeSpan span = dt2.Subtract(dt1);
- int dayDiff = span.Days + 1;
- if (dayDiff < 0 || dayDiff >30)
- {
- this.alert("查询时间不能大于30天,请核实查询时间条件!");
- return;
- }
- }
- ArrayList al = new ArrayList();
- SLSelected = this.comboBox3.Text;
-
- if (textBox1.Text == "" && !this.checkBox1.Checked && this.textBox3.Text == "")
- {
- MessageBox.Show("请选择查询条件!", "提示");
- return;
- }
- //SQL
- if (this.comboBox3.Text == "酸轧")
- {
- al.Add("UIB030110_01.SELECT");
- al.Add(textBox1.Text.ToString());//轧制单元
- }
- else if (this.comboBox3.Text == "酸洗")
- {
- al.Add("UIB030110_11.SELECT");
- al.Add(textBox1.Text.ToString());//轧制单元
- }
- else if (this.comboBox3.Text == "连退")
- //al.Add("UIB030110_01_LIAN.SELECT");
- //20151103修改查询sql语句去掉重复的卷
- al.Add("UIB030110_01_LIAN_QC.SELECT");
- else if (this.comboBox3.Text == "重卷")//重卷
- {
-
- //20151103修改查询sql语句去掉重复的卷
- //al.Add("UIB030110_01_CJ_QC.SELECT");
- if (this.checkBox1.Checked)
- {
- al.Add("UIB030110_01_CJ.SELECT");
- al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd"));//日期
- al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd"));//日期
- }
- else
- {
- al.Add("UIB030110_03_CJ.SELECT");
- }
- }
- //查询条件
- if (this.comboBox3.Text == "连退" || this.comboBox3.Text == "酸轧" || this.comboBox3.Text == "酸洗")
- {
- if (this.checkBox1.Checked)
- {
- al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000");//日期
- al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999");//日期
- }
- else
- {
- al.Add("");
- al.Add("");
- }
- }
- al.Add(this.textBox3.Text.Trim());//钢卷号
- if (!this.checkBox1.Checked && this.textBox3.Text.Trim() == "")
- return;
- OperateConditionRecode.WriteCondition("UIB030110", this.textBox1.Text.ToString());
- OperateConditionRecode.WriteCondition("UIB030110_1", this.comboBox3.SelectedIndex.ToString());
- this.dataSet1.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet1.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- //MessageBox.Show(ccp.ReturnInfo, "调试信息");
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["SMP_DIR_PIC_YN"].Text == "Y"
- && ugr.Cells["SMP_PICK_YN"].Text == "")
- {
- //ugr.Appearance.ForeColor = Color.Red;//字体显示红色
- //ugr.Delete();
- //ugr.Hidden = true;
- }
- //判断人工录入宽度判定值与机器测量宽度实际值之差,若≥10则显示红色
- string COILWTH = ugr.Cells["COIL_WTH"].Text;
- string DCSWTH = ugr.Cells["DCS_WTH"].Text;
- if (COILWTH != null && COILWTH != "" && DCSWTH != null && DCSWTH != "" && DCSWTH != "0")
- {
- double chazhi = double.Parse(DCSWTH) - double.Parse(COILWTH);
- if (System.Math.Abs(chazhi) >= 10)
- {
- ugr.Cells["COIL_WTH"].Appearance.BackColor = Color.Red;
- ugr.Cells["DCS_WTH"].Appearance.BackColor = Color.Red;
- }
- else
- {
- ugr.Cells["COIL_WTH"].Appearance.BackColor = Color.White;
- ugr.Cells["DCS_WTH"].Appearance.BackColor = Color.FromArgb(255, 255, 128);
- }
- }
- else
- {
- ugr.Cells["COIL_WTH"].Appearance.BackColor = Color.White;
- ugr.Cells["DCS_WTH"].Appearance.BackColor = Color.FromArgb(255, 255, 128);
- }
- //判断人工录入厚度判定值与机器测量厚度实际值之差,若≥0.01则显示红色
- string COILTHK = ugr.Cells["COIL_THK"].Text;
- string DCSTHK = ugr.Cells["DCS_THK"].Text;
- if (COILTHK != null && COILTHK != "" && DCSTHK != null && DCSTHK != "" && DCSTHK != "0")
- {
- double chazhi = double.Parse(DCSTHK) - double.Parse(COILTHK);
- if (System.Math.Abs(chazhi) >= 0.01)
- {
- ugr.Cells["COIL_THK"].Appearance.BackColor = Color.Red;
- ugr.Cells["DCS_THK"].Appearance.BackColor = Color.Red;
- }
- else
- {
- ugr.Cells["COIL_THK"].Appearance.BackColor = Color.White;
- ugr.Cells["DCS_THK"].Appearance.BackColor = Color.FromArgb(255, 255, 128);
- }
- }
- else
- {
- ugr.Cells["COIL_THK"].Appearance.BackColor = Color.White;
- ugr.Cells["DCS_THK"].Appearance.BackColor = Color.FromArgb(255, 255, 128);
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- }
- }
-
- private void fb()
- {
- try
- {
- if (comboBox3.Text.ToString() == "连退" || comboBox3.Text.ToString() == "重卷")
- {
- strPline_Code = "LT1";
- }
- else
- {
- strPline_Code = "SZ1";
- }
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "coiljudge_status_call_commit";
- ccp.ServerParams = new object[] { strPline_Code
- , ugr.Cells["COIL_NO"].Value.ToString()
- , ""
- , ""
- , ""
- , ""
- , ""
- , "Y"
- , textBox4.Text};
- 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);
- //}
- //DoQuery();
- MessageBox.Show("封闭成功!");
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void cancel_fb()
- {
- try
- {
- if (comboBox3.Text.ToString() == "连退" || comboBox3.Text.ToString() == "重卷")
- {
- strPline_Code = "LT1";
- }
- else
- {
- strPline_Code = "SZ1";
- }
- List<UltraGridRow> lists = new List<UltraGridRow>();
- foreach (UltraGridRow ugr in ultraGrid1.Rows)
- {
- if (ugr.Cells["CHECK"].Text.ToString() == "True")
- {
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "coiljudge_status_call_commit";
- ccp.ServerParams = new object[] { strPline_Code
- , ugr.Cells["COIL_NO"].Value.ToString()
- , ""
- , ""
- , ""
- , ""
- , ""
- , "N"
- , textBox4.Text,""};
- 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);
- }
- //DoQuery();
- MessageBox.Show("解除封闭成功!");
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- MessageBox.Show("系统出错,请联系管理人员", "警告");
- }
- }
- private void DoSave()
- {
- try
- {
- //this.ultraGrid1.UpdateData();//选择以后,这里必须要updatedata。
- ArrayList list = new ArrayList();
-
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Value))
- {
- /*if (ugr.Cells["EXSHAPE_TP"].Text.ToString() == "Y" || ugr.Cells["CRK_TP"].Text.ToString() == "Y")
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- string is_pass = "";
- string is_zl1 = "";
- list1.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list1.Add("");//检验结果代码
- list1.Add("");//检验结果
- list1.Add(ultraComboEditor1.Text.Trim().ToString());//质量等级代码
- list1.Add(ultraComboEditor1.Text.Trim().ToString());//质量等级名称
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());//操作人
- list1.Add(this.UserInfo.GetUserOrderText());//班次
- list1.Add(this.UserInfo.GetUserGroupText());//班组
- int count1 = 0;
- int i = 0;
- for (int c1 = 0; c1 < c; c1++)
- {
- // MessageBox.Show(CWindow.al[i].ToString() +"---------"+ CWindow.al[i].ToString().Substring(2));
- if (ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1)) + "_TYPE"].Text.ToString() != "")
- {
- string[] sArray = ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1)) + "_TYPE"].Text.ToString().Split(';');
- defect_desc = sArray[0];
- strRepair = sArray[1];
- strPrimary_flag = sArray[2];
- strMian = sArray[3];
- strTou = sArray[4];
- strCe = sArray[5];
- strDaxiao = sArray[6];
- strDuoshao = sArray[7];
- strChengdu = sArray[8];
- strMemo = sArray[9];
- defect_descval = sArray[10];
- strRepairval = sArray[11];
- strPrimary_flagval = sArray[12];
- strMianval = sArray[13];
- strCeval = sArray[15];
- strTouval = sArray[14];
- strDaxiaoval = sArray[16];
- strDuoshaoval = sArray[17];
- strChengduval = sArray[18];
- strMemoval = sArray[19];
- ArrayList listbm = new ArrayList();
- if (strPrimary_flag == "")
- {
- listbm.Add(strPrimary_flag);
- }
- else
- {
- listbm.Add(strPrimary_flagval);
- }
- //int j = c1+1;
- if (strPrimary_flag == "1" && c1 + 1 == 1)
- {
- i++;
- listbm.Add("1");
- //j = j - 1;
- }
- else if (strPrimary_flag == "1" && c1 + 1 != 1)
- {
- MessageBox.Show("请把序号为1的缺陷选为主要缺陷!");
- return;
- }
- else
- {
- listbm.Add(Convert.ToString(c1 + 1));
- }
- if (defect_desc == "")
- {
- listbm.Add(defect_desc);
- }
- else
- {
- listbm.Add(defect_descval);
- }
- listbm.Add(defect_desc);
- if (strMian == "上表面")
- {
- listbm.Add("U");
- }
- else if (strMian == "下表面")
- {
- listbm.Add("D");
- }
- else if (strMian == "边部")
- {
- listbm.Add("E");
- }
- else
- {
- listbm.Add("");
- }
- //list.Add(strMian);
- if (strTou == "")
- {
- listbm.Add(strTou);
- }
- else
- {
- listbm.Add(strTouval);
- }
- listbm.Add(strTou);
- if (strCe == "")
- {
- listbm.Add(strCe);
- }
- else
- {
- listbm.Add(strCeval);
- }
- listbm.Add(strCe);
- if (strDaxiao == "")
- {
- listbm.Add(strDaxiao);
- }
- else
- {
- listbm.Add(strDaxiaoval);
- }
- listbm.Add(strDaxiao);
- if (strChengdu == "")
- {
- listbm.Add(strChengdu);
- }
- else
- {
- listbm.Add(strChengduval);
- }
- listbm.Add(strChengdu);
- listbm.Add(strDuoshao);
- listbm.Add(strMemo);
- if (strRepair == "")
- {
- listbm.Add("0");
- }
- else
- {
- listbm.Add(strRepairval);
- }
- list2.Add(listbm);
- }
- }
- if (i > 1)
- {
- MessageBox.Show("请不要录入多条主要缺陷!");
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "doAddFlawL1";
- ccp.ServerParams = new object[] { list2, list1 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- MessageBox.Show("表面检验登记成功!");
- }*/
- if (ugr.Cells["SMPPICK_TP"].Text == "Y")
- {
- // smpList = new ArrayList();
- //取样操作
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//试样号
- ht.Add("i" + jx, ugr.Cells["SMP_CUT_LOC"].Text); jx++;//位置
- ht.Add("i" + jx, ""); jx++;//去向
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//外观等级
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入厚度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入宽度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//温度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ugr.Cells["SMP_PICK_YN"].Text); jx++;//是否取样
- ht.Add("i" + jx, ""); jx++;//外观缺陷1
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;//外观缺陷5
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserName().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_01.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["SMPPICK_TP"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- if (ugr.Cells["CRK_TP"].Text == "Y")//外观缺陷
- {
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//试样号
- ht.Add("i" + jx, ugr.Cells["SMP_CUT_LOC"].Text); jx++;//位置
- ht.Add("i" + jx, ""); jx++;//去向
- ht.Add("i" + jx, ugr.Cells["EXTSHAPE_QUALITY"].Text); jx++;//外观等级
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入厚度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入宽度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//温度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ugr.Cells["SMP_PICK_YN"].Text); jx++;//是否取样
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++;//外观缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD1_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++;//外观缺陷5
- ht.Add("i" + jx, ugr.Cells["CRK_CD5_TYPE"].Text); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//操作人
- ht.Add("i" + jx, "外观缺陷录入N"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_01.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["CRK_TP"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- if (ugr.Cells["EXSHAPE_TP"].Text == "Y")//外观等级
- {
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//试样号
- ht.Add("i" + jx, ugr.Cells["SMP_CUT_LOC"].Text); jx++;//位置
- // ht.Add("i" + jx, ugr.Cells["COIL_RT"].Text); jx++;//去向
- ht.Add("i" + jx, ugr.Cells["CUR_PROG_CD"].Text); jx++;//20190228指定钢卷去向
- ht.Add("i" + jx, ugr.Cells["EXTSHAPE_QUALITY"].Text); jx++;//外观等级
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入厚度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入宽度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//温度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ugr.Cells["SMP_PICK_YN"].Text); jx++;//是否取样
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++;//外观缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD1_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++;//外观缺陷5
- ht.Add("i" + jx, ugr.Cells["CRK_CD5_TYPE"].Text); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserName().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_LTWG.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["EXSHAPE_TP"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
-
- /*if (ugr.Cells["DCS_YP"].Text == "Y")//是否更改公差
- {
- if ((ugr.Cells["DCS_THK"].Text.ToString() != "") && (ugr.Cells["DCS_WTH"].Text.ToString() != ""))
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- List<ArrayList> list3 = new List<ArrayList>();
- list1.Add(ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString());
- list1.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list1.Add("");
- list1.Add("");
- string is_zl = "";
- if (comboBox7.Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (comboBox7.Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (comboBox7.Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (comboBox7.Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (comboBox7.Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());
- list1.Add(this.UserInfo.GetUserOrderText());
- list1.Add(this.UserInfo.GetUserGroupText());
- list1.Add(is_zl);//质量等级代码
- list1.Add(comboBox7.Text.Trim().ToString());//质量等级名称
- ArrayList a3 = new ArrayList();
- this.dataSet4.Clear();
- string design_key = ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString();
- a3.Add("QCM031010_SELECT_01");
- a3.Add(design_key);
- //string material_no = ugr.Cells["COIL_NO"].Value.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { a3 };
- ccp.SourceDataTable = this.dataSet4.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- foreach (System.Data.DataRow row in dataSet4.Tables[0].Rows)
- {
- if (row["BIAS_CODE"].ToString() == "" || row["BIAS_CODE_2"].ToString() == "")
- {
- MessageBox.Show(ugr.Cells["COIL_NO"].Value.ToString() + "卷没有判定标准");
- return;
- }
- ArrayList listgc = new ArrayList();
- listgc.Add(row["BIAS_CODE"].ToString());
- listgc.Add(ugr.Cells["DCS_THK"].Text.ToString());
- listgc.Add(row["BIAS_NAME"].ToString());
- listgc.Add(ugr.Cells["C_ORD_THK"].Text.ToString());
- listgc.Add(ugr.Cells["COIL_THK"].Text.ToString());
- list2.Add(listgc);
- listgc = new ArrayList();
- listgc.Add(row["BIAS_CODE_2"].ToString());
- listgc.Add(ugr.Cells["DCS_WTH"].Text.ToString());
- listgc.Add(row["BIAS_NAME_2"].ToString());
- listgc.Add(ugr.Cells["C_ORD_WTH"].Text.ToString());
- listgc.Add(ugr.Cells["COIL_WTH"].Text.ToString());
- list2.Add(listgc);
- }
- dataSet4.Clear();
- 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);
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "judgeByHuman2";
- ccp.ServerParams = new object[] { list1, list2, list3 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- }
- else
- {
- MessageBox.Show("未输入公差判定值,公差判定不成功!");
- return;
- }
- }*/
- }
- }
- MessageBox.Show("保存成功!");
- this.ultraGrid1.UpdateData();
- this.DoQuery();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- //导出
- public void DoExport()
- {
- try
- {
- 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());
- }
- }
- //页面初始化时加载钢卷缺陷
- public void initCoilDefect()
- {
- try
- {
- //缺陷
- ArrayList alt = new ArrayList();
- alt.Add("UIB030110_02.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.ultraCombo1Dataset.Tables[1].Clear();
- 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 comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["SMP_DIR_PIC_YN"].Text.Equals("Y") && ugr.Cells["CHK"].Text.ToLower() == "true") //无取样指示则不允许进行取样操作
- {
- ugr.Cells["SMP_PICK_YN"].Value = this.comboBox1.SelectedItem.ToString();//执行取样操作,或者去除取样标记
- ugr.Cells["SMPPICK_TP"].Value = "Y";
- }
- }
- this.ultraGrid1.UpdateData();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- //取样后,重新去掉取样标记,便于下次取样操作
- this.comboBox1.SelectedIndex = 0;
- }
- private void UIB020310_Load(object sender, EventArgs e)
- {
- try
- {
- this.comboBox1.SelectedIndex = 0;
- this.comboBox2.SelectedIndex = 0;
- // this.comboBox3.SelectedIndex = 0;
- this.ultraDateTimeEditor1.Enabled = this.checkBox1.Checked;
- this.ultraDateTimeEditor2.Enabled = this.checkBox1.Checked;
- this.textBox1.Text = OperateConditionRecode.ReadCondition("UIB030110");
- //this.comboBox3.Text = OperateConditionRecode.ReadCondition("UIB030110_1");
- this.comboBox3.SelectedIndex = Convert.ToInt32(OperateConditionRecode.ReadCondition("UIB030110_1"));
- initCoilDefect();
- /*ValueList vsflv1 = new ValueList();
- CoreClientParam ccp = new CoreClientParam();
- 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.comboBox7.DataSource = vsflv1.ValueListItems;*/
- this.comboBox7.Text = "正品";
- 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.ultraGrid1.DisplayLayout.Bands[0].Columns["RSEPON_UNIT"].ValueList = ponpse_unit;
- }
- catch (Exception ex)
- {
- MessageBox.Show("初始化异常");
- }
- }
-
-
- private void button1_Click(object sender, EventArgs e)
- {
- try
- {
- if (comboBox3.Text.ToString() == "连退" || comboBox3.Text.ToString()=="重卷")
- {
- CUIB030110 CWindow = new CUIB030110();
- CWindow.ob = this.ob;
- //CWindow.frmdoquery += new CUIB030110.ddd(CWindow_frmdoquery);//委托
- if (CWindow.ShowDialog() == DialogResult.OK)
- {
- int arrayCount = CWindow.al.Count;
- //strRepair = CWindow.a2.GetByIndex(0).ToString();
- //strPrimary_flag = CWindow.a2.GetByIndex(1).ToString();
- //defect_desc = CWindow.a2.GetByIndex(2).ToString();
- //strMian = CWindow.a2.GetByIndex(3).ToString();
- //strTou = CWindow.a2.GetByIndex(4).ToString();
- //strCe = CWindow.a2.GetByIndex(5).ToString();
- //strDaxiao = CWindow.a2.GetByIndex(6).ToString();
- //strDuoshao = CWindow.a2.GetByIndex(7).ToString();
- //strChengdu = CWindow.a2.GetByIndex(8).ToString();
- //strMemo = CWindow.a2.GetByIndex(9).ToString();
- c = arrayCount;
- a = CWindow.a3;
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToLower() == "true")
- { //有选中项时,先进行清空。因为有初始选N个,第二次选M个。不清除,当M<N是,会残留N-M个。
- ugr.Cells["CRK_CD1"].Value = "";
- ugr.Cells["CRK_CD1_TYPE"].Value = "";
- ugr.Cells["CRK_CD2"].Value = "";
- ugr.Cells["CRK_CD2_TYPE"].Value = "";
- ugr.Cells["CRK_CD3"].Value = "";
- ugr.Cells["CRK_CD3_TYPE"].Value = "";
- ugr.Cells["CRK_CD4"].Value = "";
- ugr.Cells["CRK_CD4_TYPE"].Value = "";
- ugr.Cells["CRK_CD5"].Value = "";
- ugr.Cells["CRK_CD5_TYPE"].Value = "";
- for (int i = 0; i < arrayCount; i++)
- {
- string[] sArray2 = CWindow.al.GetByIndex(i).ToString().Split(new char[] { ';', '【' });
- string[] sArray1 = CWindow.a2.GetByIndex(i).ToString().Split(new char[] { ';', '【' });
-
- // MessageBox.Show(CWindow.al[i].ToString() +"---------"+ CWindow.al[i].ToString().Substring(2));
- ugr.Cells["CRK_CD" + Convert.ToString((i + 1))].Value = sArray1[1];
- //string s1 = ugr.Cells["CRK_CD1"].Value.ToString();
- //int t = ugr.Cells["CRK_CD" + Convert.ToString((i + 1))].Value.ToString().Length;
-
- ugr.Cells["CRK_CD" + Convert.ToString((i + 1)) + "_TYPE"].Value = CWindow.al.GetByIndex(i).ToString() + CWindow.a2.GetByIndex(i).ToString();
-
- }
- ugr.Cells["CRK_TP"].Value = "Y";
- }
- }
- }
- CWindow.Dispose();
- this.ultraGrid1.UpdateData();
- }
- else if (comboBox3.Text.ToString() == "酸轧")
- {
- CUIB030110SZ CWindow = new CUIB030110SZ();
- CWindow.ob = this.ob;
- //CWindow.frmdoquery += new CUIB030110.ddd(CWindow_frmdoquery);//委托
- if (CWindow.ShowDialog() == DialogResult.OK)
- {
- int arrayCount = CWindow.al.Count;
- //strRepair = CWindow.a2.GetByIndex(0).ToString();
- //strPrimary_flag = CWindow.a2.GetByIndex(1).ToString();
- //defect_desc = CWindow.a2.GetByIndex(2).ToString();
- //strMian = CWindow.a2.GetByIndex(3).ToString();
- //strTou = CWindow.a2.GetByIndex(4).ToString();
- //strCe = CWindow.a2.GetByIndex(5).ToString();
- //strDaxiao = CWindow.a2.GetByIndex(6).ToString();
- //strDuoshao = CWindow.a2.GetByIndex(7).ToString();
- //strChengdu = CWindow.a2.GetByIndex(8).ToString();
- //strMemo = CWindow.a2.GetByIndex(9).ToString();
- c = arrayCount;
- a = CWindow.a3;
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToLower() == "true")
- { //有选中项时,先进行清空。因为有初始选N个,第二次选M个。不清除,当M<N是,会残留N-M个。
- ugr.Cells["CRK_CD1"].Value = "";
- ugr.Cells["CRK_CD1_TYPE"].Value = "";
- ugr.Cells["CRK_CD2"].Value = "";
- ugr.Cells["CRK_CD2_TYPE"].Value = "";
- ugr.Cells["CRK_CD3"].Value = "";
- ugr.Cells["CRK_CD3_TYPE"].Value = "";
- ugr.Cells["CRK_CD4"].Value = "";
- ugr.Cells["CRK_CD4_TYPE"].Value = "";
- ugr.Cells["CRK_CD5"].Value = "";
- ugr.Cells["CRK_CD5_TYPE"].Value = "";
- for (int i = 0; i < arrayCount; i++)
- {
- string[] sArray2 = CWindow.al.GetByIndex(i).ToString().Split(new char[] { ';', '【' });
- string[] sArray1 = CWindow.a2.GetByIndex(i).ToString().Split(new char[] { ';', '【' });
- // MessageBox.Show(CWindow.al[i].ToString() +"---------"+ CWindow.al[i].ToString().Substring(2));
- ugr.Cells["CRK_CD" + Convert.ToString((i + 1))].Value = sArray1[1];
- ugr.Cells["CRK_CD" + Convert.ToString((i + 1)) + "_TYPE"].Value = CWindow.al.GetByIndex(i).ToString() + CWindow.a2.GetByIndex(i).ToString();
- string[] sArray = ugr.Cells["CRK_CD" + Convert.ToString((i + 1)) + "_TYPE"].Value.ToString().Split(new char[] { ';', '【', '】' });
-
- }
- ugr.Cells["CRK_TP"].Value = "Y";
- }
- }
- }
- CWindow.Dispose();
- this.ultraGrid1.UpdateData();
- }
-
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- //委托,暂未使用
- void CWindow_frmdoquery()
- {
- try
- {
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- }
- }
- private void ultraCombo1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
- {
- }
- private void button2_Click(object sender, EventArgs e)
- {
- try
- {
- CUIB030110SP childCib02 = new CUIB030110SP();
- childCib02.ob = this.ob;
- if (childCib02.ShowDialog() == DialogResult.OK)
- {
- }
- childCib02.Close();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- //回车保存返修温度、粗糙度、判定厚度、判定宽度
- private void ultraGrid1_KeyDown_1(object sender, KeyEventArgs e)
- {
- try
- {
- //if (SLSelected == "酸轧")
- // return;
- if (e.KeyCode != Keys.Enter)
- return; //只对回车事件操作
- if (this.ultraGrid1.ActiveCell.Column.Key != "DCS_THK"//只对判定厚度、返修温度、判定宽度操作
- && this.ultraGrid1.ActiveCell.Column.Key != "DCS_WTH"
- && this.ultraGrid1.ActiveCell.Column.Key != "CAL_TYPE_TEMP"
- && this.ultraGrid1.ActiveCell.Column.Key != "CU_CAO_DU"
- && this.ultraGrid1.ActiveCell.Column.Key != "YUAN_COIL_THK"
- && this.ultraGrid1.ActiveCell.Column.Key != "YUAN_COIL_WTH"
- && this.ultraGrid1.ActiveCell.Column.Key != "RSEPON_UNIT"
- && this.ultraGrid1.ActiveCell.Column.Key != "DETAINFO"
-
- )
- return;
- if (this.ultraGrid1.ActiveCell.DataChanged == false) return;//无数据变更时不做修改操作
- if (this.ultraGrid1.ActiveCell.Column.Key == "DCS_THK"//只对判定厚度、返修温度、判定宽度操作
- || this.ultraGrid1.ActiveCell.Column.Key == "DCS_WTH"
- || this.ultraGrid1.ActiveCell.Column.Key == "CAL_TYPE_TEMP"
- || this.ultraGrid1.ActiveCell.Column.Key == "CU_CAO_DU"
- || this.ultraGrid1.ActiveCell.Column.Key == "YUAN_COIL_THK"
- || this.ultraGrid1.ActiveCell.Column.Key == "YUAN_COIL_WTH")
- {
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ""); jx++;//试样号
- ht.Add("i" + jx, ""); jx++;//位置
- ht.Add("i" + jx, ""); jx++;//去向
- ht.Add("i" + jx, ""); jx++;//外观等级
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["DCS_THK"].Text); jx++;//录入厚度
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["DCS_WTH"].Text); jx++;//录入宽度
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["CAL_TYPE_TEMP"].Text); jx++;//温度
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["CU_CAO_DU"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ""); jx++;//是否取样
- ht.Add("i" + jx, ""); jx++;//外观缺陷1
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, ""); jx++;//外观缺陷5
- ht.Add("i" + jx, ""); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserName().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_01.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.ultraGrid1.ActiveCell.Column.Index;//换行前获取当前列的列序号
- //取消录入判定宽度值覆盖原来的机器测量宽度实绩值
- //this.ultraGrid1.ActiveRow.Cells["COIL_WTH"].Value = this.ultraGrid1.ActiveRow.Cells["DCS_WTH"].Text;////////
- //判断人工录入判定值与机器测量实际值之差,若≥10则显示红色
- string COILWTH = this.ultraGrid1.ActiveRow.Cells["COIL_WTH"].Text;
- string DCSWTH = this.ultraGrid1.ActiveRow.Cells["DCS_WTH"].Text;
- if (COILWTH != null && COILWTH != "" && DCSWTH != null && DCSWTH != "")
- {
- double chazhi = double.Parse(DCSWTH) - double.Parse(COILWTH);
- if (System.Math.Abs(chazhi) >= 10)
- {
- this.ultraGrid1.ActiveRow.Cells["COIL_WTH"].Appearance.BackColor = Color.Red;
- this.ultraGrid1.ActiveRow.Cells["DCS_WTH"].Appearance.BackColor = Color.Red;
- }
- else
- {
- this.ultraGrid1.ActiveRow.Cells["COIL_WTH"].Appearance.BackColor = Color.White;
- this.ultraGrid1.ActiveRow.Cells["DCS_WTH"].Appearance.BackColor = Color.FromArgb(255, 255, 128); //黄色
- }
- }
- else
- {
- this.ultraGrid1.ActiveRow.Cells["COIL_WTH"].Appearance.BackColor = Color.White;
- this.ultraGrid1.ActiveRow.Cells["DCS_WTH"].Appearance.BackColor = Color.FromArgb(255, 255, 128);
- }
- //判断人工录入厚度判定值与机器测量厚度实际值之差,若≥0.01则显示红色
- string COILTHK = this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text;
- string DCSTHK = this.ultraGrid1.ActiveRow.Cells["DCS_THK"].Text;
- if (COILTHK != null && COILTHK != "" && DCSTHK != null && DCSTHK != "")
- {
- double chazhi = double.Parse(DCSTHK) - double.Parse(COILTHK);
- if (System.Math.Abs(chazhi) >= 0.01)
- {
- this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Appearance.BackColor = Color.Red;
- this.ultraGrid1.ActiveRow.Cells["DCS_THK"].Appearance.BackColor = Color.Red;
- }
- else
- {
- this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Appearance.BackColor = Color.White;
- this.ultraGrid1.ActiveRow.Cells["DCS_THK"].Appearance.BackColor = Color.FromArgb(255, 255, 128);
- }
- }
- else
- {
- this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Appearance.BackColor = Color.White;
- this.ultraGrid1.ActiveRow.Cells["DCS_THK"].Appearance.BackColor = Color.FromArgb(255, 255, 128);
- }
- //换行并使其可编辑
- this.ultraGrid1.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.NextRow);
- this.ultraGrid1.ActiveRow.Cells[currentColIndex].Activate();
- this.ultraGrid1.PerformAction(UltraGridAction.EnterEditMode);
- }
- if(this.ultraGrid1.ActiveCell.Column.Key == "RSEPON_UNIT"
- || this.ultraGrid1.ActiveCell.Column.Key == "DETAINFO")
- {
- int jx;
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text.ToString()); jx++; //钢卷号
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["RSEPON_UNIT"].Text.ToString()); jx++; //责任单位
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++; //录入人
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["DETAINFO"].Text.ToString()); jx++; //详细信息
- ht.Add("i" + jx, "1"); jx++; //缺陷5
- ht.Add("i" + jx, "1"); 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);
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- return;
- }
- MessageBox.Show("责任归属单位录入成功");
- }
-
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- //private void ultraGrid1_MouseDown(object sender, MouseEventArgs e)
- //{
- // try
- // {
- // if (this.ultraGrid1.ActiveCell.Column.Key == "ORD_NO")//链接到品质设计结果查询
- // {
- // UIB010301 frm = new UIB010301();
- // frm.ob = this.ob;
- // frm.OrderNO = this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text;
- // frm.OrderSEQ = this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text;
- // frm.ShowDialog();
- // this.ultraGrid1.ActiveRow.Cells["SPEC_ABBSYM"].Activate();//换焦点
- // }
- // else if (this.ultraGrid1.ActiveCell.Column.Key == "COIL_NO")
- // {
- // this.dataSet2.Tables[0].Clear();
- // if (this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text != "")
- // {
- // ArrayList al = new ArrayList();
- // al.Add("UIB030110_03.SELECT");
- // al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text);
- // al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_CUT_LOC"].Text);
- // this.dataSet2.Tables[0].Clear();
- // CoreClientParam ccp = new CoreClientParam();
- // ccp.ServerName = "UIB.COM.ComDBQuery";
- // ccp.MethodName = "doSimpleQuery";
- // ccp.ServerParams = new object[] { al };
- // ccp.SourceDataTable = this.dataSet2.Tables[0];
- // this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- // }
- // //this.ultraGrid1.ActiveRow.Cells["SPEC_ABBSYM"].Activate();//换焦点
- // }
- // }
- // catch (Exception ex)
- // {
- // System.Diagnostics.Debug.WriteLine(ex.ToString());
- // }
- //}
- private void textBox1_KeyDown(object sender, KeyEventArgs e)
- {
- try
- {
- if (e.KeyCode != Keys.Enter)
- return; //只对回车事件操作
- this.DoQuery();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void checkBox1_Click(object sender, EventArgs e)
- {
- this.ultraDateTimeEditor1.Enabled = this.checkBox1.Checked;
- this.ultraDateTimeEditor2.Enabled = this.checkBox1.Checked;
- }
- private void ultraComboEditor1_SelectionChanged_1(object sender, EventArgs e)
- {
- try
- {
- object chk_ex = ultraComboEditor1.Value;
- if (this.ultraGrid1.ActiveRow == null || chk_ex == null) return;
- string chek_exs = chk_ex.ToString();
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToLower() == "true")
- {
- string sz_exp = ugr.Cells["EXTSHAPE_QUALITY_S"].Text;
- if (this.comboBox3.Text == "连退")
- {
- //与酸轧的外观等级进行比较是否一致,不一致则弹出提示
- if (!sz_exp.Equals(chek_exs))
- {
- if (MessageBox.Show("所选外观等级与酸轧的外观等级不一致,确定要继续吗?", "确认提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
- {
- ugr.Cells["EXSHAPE_TP"].Value = "Y";//表做了外观判定
- ugr.Cells["EXTSHAPE_QUALITY"].Value = chek_exs;
- }
- }
- else
- {
- ugr.Cells["EXSHAPE_TP"].Value = "Y";//表做了外观判定
- ugr.Cells["EXTSHAPE_QUALITY"].Value = chek_exs;
- }
- }
- else if (this.comboBox3.Text == "重卷")
- {
- string lt_exp = ugr.Cells["EXTSHAPE_QUALITY_L"].Text;
- if (sz_exp.Equals(chek_exs) && lt_exp.Equals(chek_exs))
- {
- ugr.Cells["EXSHAPE_TP"].Value = "Y";//表做了外观判定
- ugr.Cells["EXTSHAPE_QUALITY"].Value = chek_exs;
- }
- else
- {
- if (MessageBox.Show("所选外观等级与酸轧或连退的外观等级不一致,确定要继续吗?", "确认提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
- {
- ugr.Cells["EXSHAPE_TP"].Value = "Y";//表做了外观判定
- ugr.Cells["EXTSHAPE_QUALITY"].Value = chek_exs;
- }
- }
- }
- else
- {
- ugr.Cells["EXSHAPE_TP"].Value = "Y";//表做了外观判定
- ugr.Cells["EXTSHAPE_QUALITY"].Value = chek_exs;
- }
- }
- }
- this.ultraGrid1.UpdateData();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void ultraGrid1_Click(object sender, EventArgs e)
- {
- }
-
- //返修或降级处理
- private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- string MES = "";
- if (this.comboBox4.Text == "返修" || this.comboBox4.Text == "过渡")
- {
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Value))
- {
- MES += string.Format(ugr.Cells["COIL_NO"].Value.ToString()+":");
- if (ugr.Cells["COIL_THK"].Value.ToString() == "0")
- MES += string.Format("厚度为0");
- if (ugr.Cells["COIL_WTH"].Value.ToString() == "0")
- MES += string.Format("宽度为0");
- if (ugr.Cells["WGT_DEC_RST"].Value.ToString() == "")
- MES += string.Format("重量未判");
- if (ugr.Cells["EXTSHAPE_DEC_GRD"].Value.ToString() == "")
- MES += string.Format("外观未判");
- if (ugr.Cells["COIL_THK"].Value.ToString() != "0" && ugr.Cells["COIL_WTH"].Value.ToString() != "0"
- && ugr.Cells["WGT_DEC_RST"].Value.ToString() != "" && ugr.Cells["EXTSHAPE_DEC_GRD"].Value.ToString() != "")
- MES += string.Format("可以判过渡/返修");
- MES += string.Format("\r\n");
- }
- }
- if (MessageBox.Show(MES, "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
- return;
-
- }
-
-
- if (MessageBox.Show("确定执行该操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
- return;
- if ((SLSelected == "酸轧")||(SLSelected == "酸洗"))//连退才有返修操作
- {
- if (this.comboBox4.Text == "封闭" || this.comboBox4.Text == "取消封闭"
- || this.comboBox4.Text == "返修" || this.comboBox4.Text == "取消返修"
- || this.comboBox4.Text == "过渡" || this.comboBox4.Text == "取消过渡")
- {
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Value))
- {
- if (this.comboBox4.Text == "封闭")
- {
- object prog_cd = ugr.Cells["CUR_PROG_CD"].Value;
- if (prog_cd != null && (prog_cd.ToString() == "运送待机" || prog_cd.ToString() == "运送完成" || prog_cd.ToString() == "DFB"
- || prog_cd.ToString() == "DFF" || prog_cd.ToString() == "SFB" || prog_cd.ToString() == "SFF"))
- {
- MessageBox.Show("运送待机或运送完成的钢卷不能做封闭操作!", "提示");
- return;
- }
- }
- ugr.Cells["FB_YN"].Value = this.comboBox4.Text;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i1", ugr.Cells["COIL_NO"].Text);
- ht.Add("i2", this.comboBox4.Text);
- ht.Add("i3", this.textBox4.Text);
- ht.Add("i4", this.UserInfo.GetUserName().ToString());
- ht.Add("o5", "");
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_01_SUAN.CALL", ht };
- CoreClientParam rccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ArrayList all = rccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- }
- }
- return;
- }
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Value))
- {
- if (this.comboBox4.Text == "封闭")
- {
- object prog_cd = ugr.Cells["CUR_PROG_CD"].Value;
- if (prog_cd != null && (prog_cd.ToString() == "运送待机" || prog_cd.ToString() == "运送完成" || prog_cd.ToString() == "DFB"
- || prog_cd.ToString() == "DFF" || prog_cd.ToString() == "SFB" || prog_cd.ToString() == "SFF"))
- {
- MessageBox.Show("运送待机或运送完成的钢卷不能做封闭操作!", "提示");
- return;
- }
- }
- if (this.comboBox4.Text == "" || this.comboBox4.Text == "返修")
- {
- ugr.Cells["FAN_XIU"].Value = this.comboBox4.Text;
- }
- else
- {
- ugr.Cells["RCAL_CNT"].Value = this.comboBox4.Text;
- }
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i1", ugr.Cells["COIL_NO"].Text);
- ht.Add("i2", this.comboBox4.Text);
- ht.Add("i3", this.textBox4.Text);
- ht.Add("i4", this.UserInfo.GetUserName().ToString());
- ht.Add("o5", "");
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_01_LIAN.CALL", ht };
- CoreClientParam rccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ArrayList all = rccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- }
- this.DoQuery();
- }
- catch (Exception ex)
- {
- MessageBox.Show("系统发生错误", "提示");
- }
- }
- private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- //foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- //{
- // if (ugr.Cells["CHK"].Text.ToLower() == "true") //无取样指示则不允许进行取样操作
- // {
- // ugr.Cells["COIL_RT"].Value = this.comboBox5.SelectedItem.ToString();//执行取样操作,或者去除取样标记
- // ugr.Cells["EXSHAPE_TP"].Value = "Y";//与外观判定的更新放在一起
- // }
- //}
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToLower() == "true") //无取样指示则不允许进行取样操作
- {
- ugr.Cells["CUR_PROG_CD"].Value = this.comboBox6.SelectedItem.ToString();//执行取样操作,或者去除取样标记
- ugr.Cells["EXSHAPE_TP"].Value = "Y";//与外观判定的更新放在一起
- }
- }
- this.ultraGrid1.UpdateData();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
- {
-
- UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
-
- if (comboBox2.SelectedItem.ToString() == "全部"){
- band.ColumnFilters["FB_YN"].ClearFilterConditions();
- band.ColumnFilters["EXTSHAPE_DEC_GRD"].ClearFilterConditions();
- band.ColumnFilters["SMP_DIR_PIC_YN"].ClearFilterConditions();
- band.ColumnFilters["SMP_PICK_YN"].ClearFilterConditions();
- }
- else if (comboBox2.SelectedItem.ToString() == "封闭卷")
- {
- band.ColumnFilters["FB_YN"].ClearFilterConditions();
- band.ColumnFilters["EXTSHAPE_DEC_GRD"].ClearFilterConditions();
- band.ColumnFilters["SMP_DIR_PIC_YN"].ClearFilterConditions();
- band.ColumnFilters["SMP_PICK_YN"].ClearFilterConditions();
- band.ColumnFilters["FB_YN"].FilterConditions.Add(FilterComparisionOperator.Equals, "Y");
- }
- else if (comboBox2.SelectedItem.ToString() == "待判卷")
- {
- band.ColumnFilters["FB_YN"].ClearFilterConditions();
- band.ColumnFilters["EXTSHAPE_DEC_GRD"].ClearFilterConditions();
- band.ColumnFilters["SMP_DIR_PIC_YN"].ClearFilterConditions();
- band.ColumnFilters["SMP_PICK_YN"].ClearFilterConditions();
- band.ColumnFilters["EXTSHAPE_DEC_GRD"].FilterConditions.Add(FilterComparisionOperator.NotEquals,1);
- band.ColumnFilters["EXTSHAPE_DEC_GRD"].FilterConditions.Add(FilterComparisionOperator.NotEquals, 2);
- }
- else if (comboBox2.SelectedItem.ToString() == "未取样卷")
- {
- band.ColumnFilters["FB_YN"].ClearFilterConditions();
- band.ColumnFilters["EXTSHAPE_DEC_GRD"].ClearFilterConditions();
- band.ColumnFilters["SMP_DIR_PIC_YN"].ClearFilterConditions();
- band.ColumnFilters["SMP_PICK_YN"].ClearFilterConditions();
- band.ColumnFilters["SMP_DIR_PIC_YN"].FilterConditions.Add(FilterComparisionOperator.Equals, "Y");
- band.ColumnFilters["SMP_PICK_YN"].FilterConditions.Add(FilterComparisionOperator.NotEquals, "Y");
-
- }
- }
- private void comboBox6_SelectedIndexChanged(object sender, EventArgs e)
- {
- try
- {
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToLower() == "true") //无取样指示则不允许进行取样操作
- {
- ugr.Cells["CUR_PROG_CD"].Value = this.comboBox6.SelectedItem.ToString();//执行取样操作,或者去除取样标记
- ugr.Cells["EXSHAPE_TP"].Value = "Y";//与外观判定的更新放在一起
- }
- }
- this.ultraGrid1.UpdateData();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
-
- private void button3_Click(object sender, EventArgs e)
- {
- }
- private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
- {
- }
- private void button4_Click_1(object sender, EventArgs e)
- {
- try
- {
- foreach (UltraGridRow ugr in ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- string is_pass = "";
- string is_zl1 = "";
- list1.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list1.Add("");//检验结果代码
- list1.Add("");//检验结果
- list1.Add(ugr.Cells["EXTSHAPE_QUALITY"].Text.Trim().ToString());//质量等级代码
- list1.Add(ugr.Cells["EXTSHAPE_QUALITY"].Text.Trim().ToString());//质量等级名称
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());//操作人
- list1.Add(this.UserInfo.GetUserOrderText());//班次
- list1.Add(this.UserInfo.GetUserGroupText());//班组
- if (ugr.Cells["MAOCI"].Text.Trim().ToString()!="")
- {
- list1.Add(ugr.Cells["MAOCI"].Text.Trim().ToString());//边部毛刺
- }
- else
- {
- list1.Add(this.comboBox8.Text.ToString());//边部毛刺
- }
-
- int count1 = 0;
- int i = 0;
- for (int c1 = 0; c1 < 5; c1++)
- {
- // MessageBox.Show(CWindow.al[i].ToString() +"---------"+ CWindow.al[i].ToString().Substring(2));
- if (ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1)) + "_TYPE"].Text.ToString() != ""&&ugr.Cells["CRK_TP"].Text == "Y")
- {
- string[] sArray = ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1)) + "_TYPE"].Value.ToString().Split(new char[] { ';', '【', '】' });
- string strQxly = sArray[0];
- string defect_desc = ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1))].Text.ToString();
- string strRepair = sArray[7];
- string strPrimary_flag = sArray[8];
- string strMian = sArray[1];
- string strTou = sArray[2];
- string strCe = sArray[3];
- string strDaxiao = sArray[4];
- string strDuoshao = sArray[5];
- string strChengdu = sArray[6];
- string strMemo = sArray[10];
- string defect_descval = sArray[12];
- string strRepairval = sArray[13];
- string strPrimary_flagval = sArray[14];
- string strMianval = sArray[15];
- string strCeval = sArray[17];
- string strTouval = sArray[16];
- string strDaxiaoval = sArray[18];
- string strDuoshaoval = sArray[19];
- string strChengduval = sArray[20];
- string strMemoval = sArray[21];
-
-
- // string[] sArray = ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1)) + "_TYPE"].Text.ToString().Split(';');
- // defect_desc = sArray[0];
- // strRepair = sArray[1];
- // strPrimary_flag = sArray[2];
- // strMian = sArray[3];
- // strTou = sArray[4];
- // strCe = sArray[5];
- // strDaxiao = sArray[6];
- // strDuoshao = sArray[7];
- // strChengdu = sArray[8];
- // strMemo = sArray[9];
- // defect_descval = sArray[10];
- // strRepairval = sArray[11];
- // strPrimary_flagval = sArray[12];
- // strMianval = sArray[13];
- // strCeval = sArray[15];
- // strTouval = sArray[14];
- // strDaxiaoval = sArray[16];
- // strDuoshaoval = sArray[17];
- // strChengduval = sArray[18];
- // strMemoval = sArray[19];
- // strQxly = sArray[20];
- ArrayList list = new ArrayList();
- if (strPrimary_flag == "")
- {
- list.Add(strPrimary_flag);
- }
- else
- {
- list.Add(strPrimary_flagval);
- }
- //int j = c1+1;
- if (strPrimary_flag == "1" && c1 + 1 == 1)
- {
- i++;
- list.Add("1");
- //j = j - 1;
- }
- else if (strPrimary_flag == "1" && c1 + 1 != 1)
- {
- MessageBox.Show("请把序号为1的缺陷选为主要缺陷!");
- return;
- }
- else
- {
- list.Add(Convert.ToString(c1 + 1));
- }
- if (defect_desc == "")
- {
- list.Add(defect_desc);
- }
- else
- {
- list.Add(defect_descval);
- }
- list.Add(defect_desc);
- if (strMian == "上表面")
- {
- list.Add("U");
- }
- else if (strMian == "下表面")
- {
- list.Add("D");
- }
- else if (strMian == "边部")
- {
- list.Add("E");
- }
- else if (strMian == "上下表面都有,且不对称")
- {
- list.Add("N");
- }
- else if (strMian == "上下表面都有,且对称")
- {
- list.Add("S");
- }
- else if (strMian == "钢卷侧面")
- {
- list.Add("A");
- }
- else if (strMian == "上凸下凹")
- {
- list.Add("T");
- }
- else if (strMian == "上凹下凸")
- {
- list.Add("B");
- }
- else if (strMian == "已跟踪去重卷切除")
- {
- list.Add("C");
- }
- else
- {
- list.Add("");
- }
- //list.Add(strMian);
- if (strTou == "")
- {
- list.Add(strTou);
- }
- else
- {
- list.Add(strTouval);
- }
- list.Add(strTou);
- if (strCe == "")
- {
- list.Add(strCe);
- }
- else
- {
- list.Add(strCeval);
- }
- list.Add(strCe);
- if (strDaxiao == "")
- {
- list.Add(strDaxiao);
- }
- else
- {
- list.Add(strDaxiaoval);
- }
- list.Add(strDaxiao);
- if (strChengdu == "")
- {
- list.Add(strChengdu);
- }
- else
- {
- list.Add(strChengduval);
- }
- list.Add(strChengdu);
- list.Add(strDuoshao);
- list.Add(strMemo);
- if (strRepair == "")
- {
- list.Add("0");
- }
- else
- {
- list.Add(strRepairval);
- }
- list.Add(strQxly);
- list2.Add(list);
- }
- }
- if (i > 1)
- {
- MessageBox.Show("请不要录入多条主要缺陷!");
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0305.QcmJudgeSurfaceServiceImpl";
- ccp.MethodName = "doAddFlawL1";
- ccp.ServerParams = new object[] { list2, list1 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- MessageBox.Show("表面检验登记成功!");
- }
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- if (ugr.Cells["CRK_TP"].Text == "Y")//外观缺陷
- {
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//试样号
- ht.Add("i" + jx, ugr.Cells["SMP_CUT_LOC"].Text); jx++;//位置
- ht.Add("i" + jx, ""); jx++;//去向
- ht.Add("i" + jx, ugr.Cells["EXTSHAPE_QUALITY"].Text); jx++;//外观等级
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入厚度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入宽度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//温度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ugr.Cells["SMP_PICK_YN"].Text); jx++;//是否取样
-
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD1_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2_TYPE"].Text); jx++;
-
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3_TYPE"].Text); jx++;
-
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4_TYPE"].Text); jx++;
-
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD5_TYPE"].Text); jx++;
-
- //ht.Add("i" + jx, ugr.Cells["CRK_CD1_TYPE"].Text); jx++;
- //ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString().Substring(0, 4)); jx++;
- //ht.Add("i" + jx, ugr.Cells["CRK_CD2_TYPE"].Text); jx++;
- //ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString().Substring(0, 4)); jx++;
- //ht.Add("i" + jx, ugr.Cells["CRK_CD3_TYPE"].Text); jx++;
- //ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString().Substring(0, 4)); jx++;
- //ht.Add("i" + jx, ugr.Cells["CRK_CD4_TYPE"].Text); jx++;
- //ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString().Substring(0, 4)); jx++;//外观缺陷5
- //ht.Add("i" + jx, ugr.Cells["CRK_CD5_TYPE"].Text); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserID().ToString()); jx++;//操作人
- ht.Add("i" + jx, "外观缺陷录入N"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_01.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["CRK_TP"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- }
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- if (ugr.Cells["EXSHAPE_TP"].Text == "Y")//外观等级
- {
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//试样号
- ht.Add("i" + jx, ugr.Cells["SMP_CUT_LOC"].Text); jx++;//位置
- // ht.Add("i" + jx, ugr.Cells["COIL_RT"].Text); jx++;//去向
- ht.Add("i" + jx, ugr.Cells["CUR_PROG_CD"].Text); jx++;//20190228指定钢卷去向
- ht.Add("i" + jx, ugr.Cells["EXTSHAPE_QUALITY"].Text); jx++;//外观等级
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入厚度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入宽度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//温度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ugr.Cells["SMP_PICK_YN"].Text); jx++;//是否取样
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++;//外观缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD1_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++;//外观缺陷5
- ht.Add("i" + jx, ugr.Cells["CRK_CD5_TYPE"].Text); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserID().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_01.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["EXSHAPE_TP"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- }
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", "");
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_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(), "提示");
- }
-
- }
- }
- this.ultraGrid1.UpdateData();
- this.DoQuery();
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void button5_Click(object sender, EventArgs e)
- {
- try
- {
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- if ((ugr.Cells["DCS_THK"].Text.ToString() != "" && ugr.Cells["DCS_WTH"].Text.ToString() != "")
- || (ugr.Cells["COIL_THK"].Text.ToString()!="" && ugr.Cells["COIL_WTH"].Text.ToString()!=""))
- {
- string ss = ugr.Cells["PRODNM_CD"].Text.ToString();
- if (SLSelected == "酸轧"&&(ugr.Cells["PRODNM_CD"].Text.ToString() == "SD" || ugr.Cells["PRODNM_CD"].Text.ToString() == "SB"))
- {
-
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- List<ArrayList> list3 = new List<ArrayList>();
- list1.Add(ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString());
- list1.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list1.Add("1");
- list1.Add("合格");
- string is_zl = "";
- if (comboBox7.Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (comboBox7.Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (comboBox7.Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (comboBox7.Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (comboBox7.Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());
- list1.Add(this.UserInfo.GetUserOrderText());
- list1.Add(this.UserInfo.GetUserGroupText());
- list1.Add(is_zl);//质量等级代码
- list1.Add(comboBox7.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);
- CoreClientParam ccp = new 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;
- }
- }
- else
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- List<ArrayList> list3 = new List<ArrayList>();
- list1.Add(ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString());
- list1.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list1.Add("");
- list1.Add("");
- string is_zl = "";
- if (comboBox7.Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (comboBox7.Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (comboBox7.Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (comboBox7.Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (comboBox7.Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());
- list1.Add(this.UserInfo.GetUserOrderText());
- list1.Add(this.UserInfo.GetUserGroupText());
- list1.Add(is_zl);//质量等级代码
- list1.Add(comboBox7.Text.Trim().ToString());//质量等级名称
- ArrayList a7 = new ArrayList();
- //界面的订单规格存在问题,从后台订单表获取送去判定
- this.dataSet5.Clear();
- string design_key1 = ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString();
- //string design_key = "W502024021086001";
- a7.Add("QCM031010_SELECT_02");
- a7.Add(design_key1);
- CoreClientParam ccp5 = new CoreClientParam();
- ccp5.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp5.MethodName = "doSimpleQuery";
- ccp5.ServerParams = new object[] { a7 };
- ccp5.SourceDataTable = this.dataSet5.Tables[0];
- this.ExecuteQueryToDataTable(ccp5, CoreInvokeType.Internal);
- ArrayList a3 = new ArrayList();
- this.dataSet4.Clear();
- string design_key = ugr.Cells["ORD_NO"].Text.ToString() + ugr.Cells["ORD_SEQ"].Text.ToString();
- a3.Add("QCM031010_SELECT_01");
- a3.Add(design_key);
- //string material_no = ugr.Cells["COIL_NO"].Value.ToString();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { a3 };
- ccp.SourceDataTable = this.dataSet4.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- if (dataSet4.Tables[0].Rows.Count != 0)
- {
- foreach (System.Data.DataRow row in dataSet4.Tables[0].Rows)
- {
- if (row["BIAS_CODE"].ToString() == "" || row["BIAS_CODE_2"].ToString() == "")
- {
- MessageBox.Show(ugr.Cells["COIL_NO"].Value.ToString() + "卷没有判定标准");
- return;
- }
- ArrayList list = new ArrayList();
- list.Add(row["BIAS_CODE"].ToString());
- if (SLSelected == "酸轧")
- {
- list.Add(ugr.Cells["COIL_THK"].Text.ToString());
- }
- else if (ugr.Cells["DCS_THK"].Text.ToString() != "")
- {
- list.Add(ugr.Cells["DCS_THK"].Text.ToString());
- }
- else
- {
- list.Add(ugr.Cells["COIL_THK"].Text.ToString());
- }
- list.Add(row["BIAS_NAME"].ToString());
- //list.Add(ugr.Cells["C_ORD_THK"].Text.ToString());
- //修改订单规格为后台获取的
- //list.Add(ugr.Cells["C_ORD_THK"].Text.ToString());
- foreach (System.Data.DataRow row1 in dataSet5.Tables[0].Rows)
- {
- list.Add(row1["C_ORD_THK"].ToString());
- }
- list.Add(ugr.Cells["COIL_THK"].Text.ToString());
- list2.Add(list);
- list = new ArrayList();
- list.Add(row["BIAS_CODE_2"].ToString());
- if (SLSelected == "酸轧"&&ugr.Cells["DCS_WTH"].Text.ToString() != ""&&ugr.Cells["DCS_WTH"].Text.ToString() != "0")
- {
- list.Add(ugr.Cells["DCS_WTH"].Text.ToString());
- }
- else if (SLSelected != "酸轧" && ugr.Cells["DCS_WTH"].Text.ToString() != "")
- {
- list.Add(ugr.Cells["DCS_WTH"].Text.ToString());
- }
- else
- {
- list.Add(ugr.Cells["COIL_WTH"].Text.ToString());
- }
- list.Add(row["BIAS_NAME_2"].ToString());
- //list.Add(ugr.Cells["C_ORD_WTH"].Text.ToString());
- //修改订单规格为后台获取的
- //list.Add(ugr.Cells["C_ORD_THK"].Text.ToString());
- foreach (System.Data.DataRow row1 in dataSet5.Tables[0].Rows)
- {
- list.Add(row1["C_ORD_WTH"].ToString());
- }
- list.Add(ugr.Cells["COIL_WTH"].Text.ToString());
- list2.Add(list);
- }
- }
- else
- {
- MessageBox.Show(ugr.Cells["COIL_NO"].Value.ToString() + "卷没有判定标准");
- return;
- }
- dataSet4.Clear();
- 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);
- ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "judgeByHuman2";
- ccp.ServerParams = new object[] { list1, list2, list3 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- }
-
-
- }
- else
- {
- MessageBox.Show("公差判定值为空,公差判定不成功!");
- return;
- }
- }
- }
- //for (int i = 0; i < lists.Count; i++)
- //{
- // lists[i].Delete(false);
- //}
- MessageBox.Show("公差检验登记成功!");
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
-
- }
- private void ultraGrid1_AfterCellUpdate(object sender, CellEventArgs e)
- {
- try
- {
- foreach (UltraGridRow ugr in ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- if (ugr.Cells["DCS_THK"] == e.Cell || ugr.Cells["DCS_WTH"]== e.Cell)
- {
- ugr.Cells["DCS_YP"].Value = "Y";
-
- }
- }
- }
- }
- catch
- {
- }
- }
- private void ultraGrid1_AfterEnterEditMode(object sender, EventArgs e)
- {
- }
- private void ultraGrid1_MouseDown(object sender, MouseEventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveCell.Column.Key == "ORD_NO")//链接到品质设计结果查询
- {
- CUIB010301 frm = new CUIB010301();
- frm.ob = this.ob;
- frm.OrderNO = this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text;
- frm.OrderSEQ = this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text;
- frm.ShowDialog();
- this.ultraGrid1.ActiveRow.Cells["SPEC_ABBSYM"].Activate();//换焦点
- }
- else if (this.ultraGrid1.ActiveCell.Column.Key == "COIL_NO")
- {
- this.dataSet2.Tables[0].Clear();
- if (this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text != "")
- {
- ArrayList al = new ArrayList();
- al.Add("UIB030110_033.SELECT");
- al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text);
- /*al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_CUT_LOC"].Text);*/
- this.dataSet2.Tables[0].Clear();
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp.MethodName = "doSimpleQuery";
- ccp.ServerParams = new object[] { al };
- ccp.SourceDataTable = this.dataSet2.Tables[0];
- this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
- }
- //this.ultraGrid1.ActiveRow.Cells["SPEC_ABBSYM"].Activate();//换焦点
- }
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void button6_Click(object sender, EventArgs e)
- {
- try
- {
- foreach (UltraGridRow ugr in ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- ArrayList list1 = new ArrayList();
- List<ArrayList> list2 = new List<ArrayList>();
- string is_pass = "";
- string is_zl1 = "";
- ArrayList list4 = new ArrayList();
- List<ArrayList> list5 = new List<ArrayList>();
- List<ArrayList> list6 = new List<ArrayList>();
- if ((ugr.Cells["DCS_THK"].Text.ToString() != "" && ugr.Cells["DCS_WTH"].Text.ToString() != "") ||
- (ugr.Cells["COIL_THK"].Text.ToString() != "" && ugr.Cells["COIL_WTH"].Text.ToString() != ""))
- {
- string ss = ugr.Cells["PRODNM_CD"].Text.ToString();
- if (SLSelected == "酸轧" && (ugr.Cells["PRODNM_CD"].Text.ToString() == "SD" || ugr.Cells["PRODNM_CD"].Text.ToString() == "SB"))
- {
- list4.Add(ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString());
- //list4.Add("W502024021086001");
- list4.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list4.Add("1");
- list4.Add("合格");
- string is_zl = "";
- if (comboBox7.Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (comboBox7.Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (comboBox7.Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (comboBox7.Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (comboBox7.Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- list4.Add("");
- list4.Add(this.UserInfo.GetUserName());
- list4.Add(this.UserInfo.GetUserOrderText());
- list4.Add(this.UserInfo.GetUserGroupText());
- list4.Add(is_zl);//质量等级代码
- list4.Add(comboBox7.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());
- list6.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());
- list6.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());
- list6.Add(listc1);
- }
- else
- {
- list4.Add(ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString());
- list4.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list4.Add("");
- list4.Add("");
- string is_zl = "";
- if (comboBox7.Text.ToString() == "正品")
- {
- is_zl = "512601";
- }
- else if (comboBox7.Text.ToString() == "次品")
- {
- is_zl = "512602";
- }
- else if (comboBox7.Text.ToString() == "废品")
- {
- is_zl = "512603";
- }
- else if (comboBox7.Text.ToString() == "协议品")
- {
- is_zl = "512604";
- }
- else if (comboBox7.Text.ToString() == "订单外")
- {
- is_zl = "512605";
- }
- list4.Add("");
- list4.Add(this.UserInfo.GetUserName());
- list4.Add(this.UserInfo.GetUserOrderText());
- list4.Add(this.UserInfo.GetUserGroupText());
- list4.Add(is_zl);//质量等级代码
- list4.Add(comboBox7.Text.Trim().ToString());//质量等级名称
- ArrayList a7 = new ArrayList();
- //界面的订单规格存在问题,从后台订单表获取送去判定
- this.dataSet5.Clear();
- string design_key1 = ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString();
- //string design_key = "W502024021086001";
- a7.Add("QCM031010_SELECT_02");
- a7.Add(design_key1);
- CoreClientParam ccp5 = new CoreClientParam();
- ccp5.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp5.MethodName = "doSimpleQuery";
- ccp5.ServerParams = new object[] { a7 };
- ccp5.SourceDataTable = this.dataSet5.Tables[0];
- this.ExecuteQueryToDataTable(ccp5, CoreInvokeType.Internal);
- ArrayList a3 = new ArrayList();
- this.dataSet4.Clear();
- string design_key = ugr.Cells["ORD_NO"].Value.ToString() + ugr.Cells["ORD_SEQ"].Value.ToString();
- //string design_key = "W502024021086001";
- a3.Add("QCM031010_SELECT_01");
- a3.Add(design_key);
-
- CoreClientParam ccp2 = new CoreClientParam();
- ccp2.ServerName = "QCM.COMMUNAL.ComDBQueryQCM";
- ccp2.MethodName = "doSimpleQuery";
- ccp2.ServerParams = new object[] { a3 };
- ccp2.SourceDataTable = this.dataSet4.Tables[0];
- this.ExecuteQueryToDataTable(ccp2, CoreInvokeType.Internal);
- if (dataSet4.Tables[0].Rows.Count != 0)
- {
- foreach (System.Data.DataRow row in dataSet4.Tables[0].Rows)
- {
- if (row["BIAS_CODE"].ToString() == "" || row["BIAS_CODE_2"].ToString() == "")
- {
- MessageBox.Show(ugr.Cells["COIL_NO"].Value.ToString() + "卷没有判定标准");
- return;
- }
- ArrayList list = new ArrayList();
- list.Add(row["BIAS_CODE"].ToString());
- if (SLSelected == "酸轧")
- {
- list.Add(ugr.Cells["COIL_THK"].Text.ToString());
- }
- else if (ugr.Cells["DCS_THK"].Text.ToString() != "")
- {
- list.Add(ugr.Cells["DCS_THK"].Text.ToString());
- }
- else
- {
- list.Add(ugr.Cells["COIL_THK"].Text.ToString());
- }
- list.Add(row["BIAS_NAME"].ToString());
- //修改订单规格为后台获取的
- //list.Add(ugr.Cells["C_ORD_THK"].Text.ToString());
- foreach (System.Data.DataRow row1 in dataSet5.Tables[0].Rows)
- {
- list.Add(row1["C_ORD_THK"].ToString());
- }
-
- list.Add(ugr.Cells["COIL_THK"].Text.ToString());
- list5.Add(list);
- list = new ArrayList();
- list.Add(row["BIAS_CODE_2"].ToString());
- if (SLSelected == "酸轧" && ugr.Cells["DCS_WTH"].Text.ToString() != "" && ugr.Cells["DCS_WTH"].Text.ToString() != "0")
- {
- list.Add(ugr.Cells["DCS_WTH"].Text.ToString());
- }
- else if (SLSelected != "酸轧" && ugr.Cells["DCS_WTH"].Text.ToString() != "")
- {
- list.Add(ugr.Cells["DCS_WTH"].Text.ToString());
- }
- else
- {
- list.Add(ugr.Cells["COIL_WTH"].Text.ToString());
- }
- list.Add(row["BIAS_NAME_2"].ToString());
- //list.Add(ugr.Cells["C_ORD_WTH"].Text.ToString());
- foreach (System.Data.DataRow row1 in dataSet5.Tables[0].Rows)
- {
- list.Add(row1["C_ORD_WTH"].ToString());
- }
- list.Add(ugr.Cells["COIL_WTH"].Text.ToString());
- list5.Add(list);
- }
- }
- else
- {
- MessageBox.Show(ugr.Cells["COIL_NO"].Value.ToString() + "卷没有判定标准");
- return;
- }
- dataSet4.Clear();
- 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());
- list6.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());
- list6.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());
- list6.Add(listc1);
- }
- }
-
- list1.Add(ugr.Cells["COIL_NO"].Value.ToString());
- list1.Add("");//检验结果代码
- list1.Add("");//检验结果
- list1.Add(ugr.Cells["EXTSHAPE_QUALITY"].Text.Trim().ToString());//质量等级代码
- list1.Add(ugr.Cells["EXTSHAPE_QUALITY"].Text.Trim().ToString());//质量等级名称
- list1.Add("");
- list1.Add(this.UserInfo.GetUserName());//操作人
- list1.Add(this.UserInfo.GetUserOrderText());//班次
- list1.Add(this.UserInfo.GetUserGroupText());//班组
- if (ugr.Cells["MAOCI"].Text.Trim().ToString() != "")
- {
- list1.Add(ugr.Cells["MAOCI"].Text.Trim().ToString());//边部毛刺
- }
- else
- {
- list1.Add(this.comboBox8.Text.ToString());//边部毛刺
- }
- int count1 = 0;
- int i = 0;
- for (int c1 = 0; c1 < 5; c1++)
- {
- // MessageBox.Show(CWindow.al[i].ToString() +"---------"+ CWindow.al[i].ToString().Substring(2));
- if (ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1)) + "_TYPE"].Text.ToString() != "")
- {
- string[] sArray = ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1)) + "_TYPE"].Value.ToString().Split(new char[] { ';', '【', '】' });
- string strQxly = sArray[0];
- string defect_desc = ugr.Cells["CRK_CD" + Convert.ToString((c1 + 1))].Text.ToString();
- string strRepair = sArray[7];
- string strPrimary_flag = sArray[8];
- string strMian = sArray[1];
- string strTou = sArray[2];
- string strCe = sArray[3];
- string strDaxiao = sArray[4];
- string strDuoshao = sArray[5];
- string strChengdu = sArray[6];
- string strMemo = sArray[10];
- string defect_descval = sArray[12];
- string strRepairval = sArray[13];
- string strPrimary_flagval = sArray[14];
- string strMianval = sArray[15];
- string strCeval = sArray[17];
- string strTouval = sArray[16];
- string strDaxiaoval = sArray[18];
- string strDuoshaoval = sArray[19];
- string strChengduval = sArray[20];
- string strMemoval = sArray[21];
-
- ArrayList list = new ArrayList();
- if (strPrimary_flag == "")
- {
- list.Add(strPrimary_flag);
- }
- else
- {
- list.Add(strPrimary_flagval);
- }
- //int j = c1+1;
- if (strPrimary_flag == "1" && c1 + 1 == 1)
- {
- i++;
- list.Add("1");
- //j = j - 1;
- }
- else if (strPrimary_flag == "1" && c1 + 1 != 1)
- {
- MessageBox.Show("请把序号为1的缺陷选为主要缺陷!");
- return;
- }
- else
- {
- list.Add(Convert.ToString(c1 + 1));
- }
- if (defect_desc == "")
- {
- list.Add(defect_desc);
- }
- else
- {
- list.Add(defect_descval);
- }
- list.Add(defect_desc);
- if (strMian == "上表面")
- {
- list.Add("U");
- }
- else if (strMian == "下表面")
- {
- list.Add("D");
- }
- else if (strMian == "边部")
- {
- list.Add("E");
- }
- else if (strMian == "上下表面都有,且不对称")
- {
- list.Add("N");
- }
- else if (strMian == "上下表面都有,且对称")
- {
- list.Add("S");
- }
- else if (strMian == "钢卷侧面")
- {
- list.Add("A");
- }
- else if (strMian == "上凸下凹")
- {
- list.Add("T");
- }
- else if (strMian == "上凹下凸")
- {
- list.Add("B");
- }
- else if (strMian == "已跟踪去重卷切除")
- {
- list.Add("C");
- }
- else
- {
- list.Add("");
- }
- //list.Add(strMian);
- if (strTou == "")
- {
- list.Add(strTou);
- }
- else
- {
- list.Add(strTouval);
- }
- list.Add(strTou);
- if (strCe == "")
- {
- list.Add(strCe);
- }
- else
- {
- list.Add(strCeval);
- }
- list.Add(strCe);
- if (strDaxiao == "")
- {
- list.Add(strDaxiao);
- }
- else
- {
- list.Add(strDaxiaoval);
- }
- list.Add(strDaxiao);
- if (strChengdu == "")
- {
- list.Add(strChengdu);
- }
- else
- {
- list.Add(strChengduval);
- }
- list.Add(strChengdu);
- list.Add(strDuoshao);
- list.Add(strMemo);
- if (strRepair == "")
- {
- list.Add("0");
- }
- else
- {
- list.Add(strRepairval);
- }
- list.Add(strQxly);
- list2.Add(list);
- }
- }
- if (i > 1)
- {
- MessageBox.Show("请不要录入多条主要缺陷!");
- return;
- }
- CoreClientParam ccp = new CoreClientParam();
- ccp.ServerName = "QCM.QCM03.QCM0303.QcmJudgeMeasureServiceImpl";
- ccp.MethodName = "judgeByHuman2LZBmgc";
- ccp.ServerParams = new object[] { list2, list1,list4,list5,list6 };
- ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- if (ccp.ReturnCode == -1)
- {
- return;
- }
- }
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- if (ugr.Cells["CRK_TP"].Text == "Y")//外观缺陷
- {
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//试样号
- ht.Add("i" + jx, ugr.Cells["SMP_CUT_LOC"].Text); jx++;//位置
- ht.Add("i" + jx, ""); jx++;//去向
- ht.Add("i" + jx, ugr.Cells["EXTSHAPE_QUALITY"].Text); jx++;//外观等级
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入厚度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入宽度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//温度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ugr.Cells["SMP_PICK_YN"].Text); jx++;//是否取样
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD1_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD5_TYPE"].Text); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++;//操作人
- ht.Add("i" + jx, "外观缺陷录入N"); jx++;//操作标志
- ht.Add("o" + jx, ""); jx = 1;
- ccp.ServerName = "QCM.COMMUNAL.ComDBProcedureQCM";
- ccp.MethodName = "doXmlProcedure";
- ccp.ServerParams = new object[] { "UIB030110_01.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["CRK_TP"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- }
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- if (ugr.Cells["EXSHAPE_TP"].Text == "Y")//外观等级
- {
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_NO"].Text); jx++;//钢卷号
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//试样号
- ht.Add("i" + jx, ugr.Cells["SMP_CUT_LOC"].Text); jx++;//位置
- // ht.Add("i" + jx, ugr.Cells["COIL_RT"].Text); jx++;//去向
- ht.Add("i" + jx, ugr.Cells["CUR_PROG_CD"].Text); jx++;//20190228指定钢卷去向
- ht.Add("i" + jx, ugr.Cells["EXTSHAPE_QUALITY"].Text); jx++;//外观等级
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入厚度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//录入宽度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//温度
- ht.Add("i" + jx, ugr.Cells["SMP_NO"].Text); jx++;//粗糙度
- ht.Add("i" + jx, ugr.Cells["SMP_PICK_YN"].Text); jx++;//是否取样
- ht.Add("i" + jx, ugr.Cells["CRK_CD1"].Value.ToString()); jx++;//外观缺陷1
- ht.Add("i" + jx, ugr.Cells["CRK_CD1_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD2_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD3_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4"].Value.ToString()); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD4_TYPE"].Text); jx++;
- ht.Add("i" + jx, ugr.Cells["CRK_CD5"].Value.ToString()); jx++;//外观缺陷5
- ht.Add("i" + jx, ugr.Cells["CRK_CD5_TYPE"].Text); jx++;
- ht.Add("i" + jx, this.UserInfo.GetUserName().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_01.CALL", ht };
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- ugr.Cells["EXSHAPE_TP"].Value = "";
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- }
- }
- }
- if (ugr.Cells["CHK"].Text.ToString() == "True")
- {
- string ss = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("/", "").Replace(":", "").Replace("-", "").Replace(".", "").Replace(" ", ""); jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, SLSelected); jx++;//产线
- ht.Add("i" + jx, ugr.Cells["COIL_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(), "提示");
- }
- }
- }
-
- MessageBox.Show("表面公差检验登记成功!");
- this.ultraGrid1.UpdateData();
- this.DoQuery();
- }
- catch (Exception EX)
- {
- MessageBox.Show(EX.ToString());
- }
- }
- private void button6_Click_1(object sender, EventArgs e)
- {
- int jx;
- jx = 1;
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text.ToString()); jx++; //钢卷号
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["RSEPON_UNIT"].Text.ToString()); jx++; //责任单位
- ht.Add("i" + jx, this.UserInfo.GetUserName().ToString()); jx++; //录入人
- ht.Add("i" + jx, this.ultraGrid1.ActiveRow.Cells["RSEPON_UNIT"].Text.ToString()); jx++; //缺陷4
- ht.Add("i" + jx, "1"); jx++; //缺陷5
- ht.Add("i" + jx, "1"); 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);
- ArrayList all = ccp.ReturnObject as ArrayList;
- if (all[0].ToString() != "YY")//确认是否存在问题
- {
- MessageBox.Show(all[0].ToString(), "提示");
- return;
- }
- MessageBox.Show("责任归属单位录入成功");
- }
- private void comboBox8_SelectedValueChanged(object sender, EventArgs e)
- {
- try
- {
- object chk_ex = comboBox8.Text;
- if (this.ultraGrid1.ActiveRow == null || chk_ex == null) return;
- string chek_exs = chk_ex.ToString();
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["CHK"].Text.ToLower() == "true")
- {
- ugr.Cells["MAOCI"].Value = chek_exs;
- this.ultraGrid1.UpdateData();
- }
- }
-
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
-
-
- //private void ultraGrid1_KeyUp(object sender, KeyEventArgs e)
- //{
- // int currentColIndex = this.ultraGrid1.ActiveCell.Column.Index;
- // switch (e.KeyCode)
- // {
-
- // case Keys.Up:
- // this.ultraGrid1.PerformAction(UltraGridAction.ExitEditMode);
- // this.ultraGrid1.PerformAction(UltraGridAction.AboveRow);
- // this.ultraGrid1.ActiveRow.Cells[currentColIndex].Activate();
- // e.Handled = true;
- // this.ultraGrid1.PerformAction(UltraGridAction.EnterEditMode);
- // break;
- // case Keys.Down:
- // this.ultraGrid1.PerformAction(UltraGridAction.ExitEditMode);
- // this.ultraGrid1.PerformAction(UltraGridAction.NextRow);
- // this.ultraGrid1.ActiveRow.Cells[currentColIndex].Activate();
- // e.Handled = true;
- // this.ultraGrid1.PerformAction(UltraGridAction.EnterEditMode);
- // break;
- // case Keys.Right:
- // this.ultraGrid1.PerformAction(UltraGridAction.ExitEditMode);
- // this.ultraGrid1.PerformAction(UltraGridAction.NextCell);
-
- // e.Handled = true;
- // this.ultraGrid1.PerformAction(UltraGridAction.EnterEditMode);
- // break;
- // case Keys.Left:
- // this.ultraGrid1.PerformAction(UltraGridAction.ExitEditMode);
- // this.ultraGrid1.PerformAction(UltraGridAction.PrevCell);
-
- // e.Handled = true;
- // this.ultraGrid1.PerformAction(UltraGridAction.EnterEditMode);
- // break;
- // }
- //}
-
-
- }
- }
|