| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- //using Core.LgMes.Client.LgResMgt;
- using System.Threading;
- using Core.LgMes.Client.lgClassModel;
- using System.Collections;
- using System.Reflection;
- using CoreFS.CA06;
- namespace Core.LgMes.Client.lgJobMgt
- {
- public partial class frmZhiduiIron : CoreFS.CA06.FrmBase
- {
- #region defineData
- private Thread _getDataThread; // 取数据线程
- private bool _bIfGetData = true; // 控制取数据线程循环的标志
- private string[] ArrayIronRow = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存铁运进铁数据
- private string[] ArrayIronRow3 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存直兑出铁数据
- private string[] ArrayIronRow4 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存发送到转炉铁水数据
- private string User ="";//操作人
- private ArrayList alZDIn = new ArrayList(); //保存修改的直兑铁运进铁
- private string _strSendSucceededForBof1 = "";
- private string _strSendSucceededForBof2 = "";
- private string _strSendSucceededForBof3 = "";
- private string _strSendSucceededForHmp1 = "";
- private string _strSendSucceededForHmp2 = "";
- private string _strHmp1No = "";
- private string _strHmp2No = "";
- private bool blModify = false;
- #endregion
- #region formload
- public frmZhiduiIron()
- {
- InitializeComponent();
- CheckForIllegalCrossThreadCalls = false;
- }
- private void frmZhiduiIron_Load(object sender, EventArgs e)
- {
- try
- {
- User = this.UserInfo.GetUserName();
- lblZDJT.Text ="D" + this.Text.Substring(0, 1);
- lblZDCT.Text = "Z" + this.Text.Substring(0, 1);
- ultraDataSource1.Rows.Add(new object[] { "", "", "", "", "", "", "", "", null });
- StartUpThread();
- SetUserControlDelegate();
- timer1_Tick(null, new EventArgs());
- this.timer1.Start();
- setbutton("1");
- setucInIron("1");
- SetColumnModeShift(ucInIron1.ultraGrid1);
- SetColumnModeGroup(ucInIron1.ultraGrid1);
- SetColumnModequxiang();
- GetInIronData();
- setucHtInIron3("1");
- setbutton3("1");
- SetColumnModeShift(ucZDOutIron1.ultraGrid1);
- SetColumnModeGroup(ucZDOutIron1.ultraGrid1);
- SetColumnModeOutquxiang();
- GetHtOutIronData();
- GetElementData();
- }
- catch
- {
- }
- }
- #endregion
- #region dataevent
- private void RefreshHighheatNo()
- {
- string sqlstr = "";
- int nFurnaceNo = 0;
- try
- {
- if (this.rdoFNo1.Checked) nFurnaceNo = 1;
- if (this.rdoFNo2.Checked) nFurnaceNo = 2;
- if (this.rdoFNo3.Checked) nFurnaceNo = 3;
- if (this.rdoFNo4.Checked) nFurnaceNo = 4;
- if (this.rdoFNo5.Checked) nFurnaceNo = 5;
- if (this.rdoFNo6.Checked) nFurnaceNo = 6;
- if (this.rdoFNo7.Checked) nFurnaceNo = 7;
- if (this.rdoFNo8.Checked) nFurnaceNo = 6;
- if (this.rdoFNo9.Checked) nFurnaceNo = 7;
- if (this.radioButton1.Checked) nFurnaceNo = 0;
- if (nFurnaceNo > 0)
- {
- sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
- + " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
- + " from ( select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
- + " from job_chemelement "
- + " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
- + " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
- + " to_char(sysdate, 'YYYYMMDDHH24MISS') "
- + " and Assaytypecode like '%%A%%' and substr(checkno,1,1)='" + nFurnaceNo + "'"
- + " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
- + " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
- }
- else
- {
- sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
- + " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
- + " from (select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
- + " from job_chemelement "
- + " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
- + " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
- + " to_char(sysdate, 'YYYYMMDDHH24MISS') "
- + " and Assaytypecode like '%%A%%' "
- + " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
- + " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
- }
- string htOut = "", htWhere = "";
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "GetHighHeatNo";
- //par.args = new object[] { sqlstr, htWhere };
- object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod(par, out htOut);
- if (htOut == "" && obj != null)
- {
- DataTable furnaceDs = ((DataSet)obj).Tables[0];
- ultraGrid1.DataSource = furnaceDs;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "高炉号/批次";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 60;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "C";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 50;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.Caption = "Si";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Width = 50;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Header.Caption = "Mn";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Width = 50;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Header.Caption = "P";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Width = 50;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Header.Caption = "S";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Width = 50;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Header.Caption = "As";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Width = 50;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Header.Caption = "化验时间";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Width = 60;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Format = "dd HH:mm";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].Hidden = true;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Header.Caption = "铁罐号";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Width = 60;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Header.Caption = "铁水总重";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Width = 60;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Header.Caption = "铁罐皮重";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Width = 60;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Header.Caption = "铁水净重";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Width = 60;
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Header.Caption = "出铁时间";
- this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Width = 60;
- }
- }
- catch { return; }
- }
- private void GetRealData()
- {
- if (this.Text == "") return;
- string Wsid = this.Text.Substring(0, 1);
- string strwhere = "where wsid ='" + Wsid + "'";
- string err = "";
- try
- {
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "GetRealData";
- //par.args = new object[] { strwhere };
- DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- ultraDataSource1.Rows.Clear();
- if (ds.Tables.Count > 0)
- {
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- ultraDataSource1.Rows.Add(new object[] {
- dr["IRONWGT"].ToString(),
- dr["GASSTRESS"].ToString(),
- dr["IMPORTIRONTOTAL"].ToString(),
- dr["EXPORTIRONTOTAL"].ToString(),
- dr["SKIPIRONTOTAL"].ToString(),
- dr["IRONTEMPERATURE"].ToString(),
- dr["GASFLUX"].ToString(),
- dr["GASCONSUME"].ToString(),
- dr["UPDATETIME"].ToString()
- });
- }
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- #endregion
- #region gridevent
- private void ultHtOutIronGrid_Click(object sender, EventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
- if (aRow == null) return;
- ultSelectIron.Text = aRow.Cells["InIronNo"].Text;
- ArrayIronRow4[0] = aRow.Cells["InIronNo"].Text;
- ArrayIronRow4[1] = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
- ArrayIronRow4[2] = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- ArrayIronRow4[3] = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
- ArrayIronRow4[6] = aRow.Cells["ReturnHeatNo"].Text;
- ArrayIronRow4[7] = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
- ArrayIronRow4[8] = aRow.Cells["LDLing"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDLing"].Text : "0";
- }
- private void ultHtElementIron_AfterRowActivate(object sender, EventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtElementIron.ActiveRow;
- if (aRow == null) return;
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text != "自动") return;
- try
- {
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["CHECKNO"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
-
- }
- catch
- {
- }
- }
- private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- if (blModify == false)
- {
- setbutton("2");
- setucInIron("2");
- string shiftgroup = getshift();
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
- try
- {
- SetMisnoNoEdite();
- ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
- ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
- ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", shiftgroup);
- ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", shiftgroup);
- ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0, 1);
- ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
- ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
- ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
- ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
- }
- catch
- { }
- }
- else
- {
- ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0, 1);
- ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
- ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
- ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
- ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
- }
- }
- /// <summary>
- /// 取相关数据到编辑区 铁运进铁数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultraGrid2.ActiveRow;
- if (aRow == null) return;
- if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
- try
- {
- ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = aRow.Cells["InIronNo"].Text;
- ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = aRow.Cells["HighNo"].Text;
- ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = aRow.Cells["InTime"].Text;
- ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
- ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
- ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
- ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = aRow.Cells["FOLDPOTWGT"].Text;
- ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
- }
- catch { }
- }
- private void ultHtOutIronGrid_AfterRowActivate(object sender, EventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
- // Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
- if (aRow == null) return;
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
- try
- {
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = aRow.Cells["IronSource"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = aRow.Cells["StoveNo"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- // ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["CHECKNO"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
- }
- catch { }
- }
- #endregion
- #region function
- /// <summary>
- /// 发送CVT炉号
- /// </summary>
- private void SendIronToCvt()
- {
- string strError = "";
- string strWz = "";
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "SendZDIronToCVT", new object[] { ArrayIronRow4 }, out strError);
- if (strError == "")
- {
- if (ArrayIronRow4[4].Substring(0, 1) == "H")
- strWz = ArrayIronRow4[4].Substring(0, 2);
- else
- strWz = ArrayIronRow4[4].Substring(2, 1);
- switch (strWz)
- {
- case "H1":
- _strSendSucceededForHmp1 = "Y";
- break;
- case "H2":
- _strSendSucceededForHmp2 = "Y";
- break;
- case "1":
- _strSendSucceededForBof1 = "Y";
- break;
- case "2":
- _strSendSucceededForBof2 = "Y";
- break;
- case "3":
- _strSendSucceededForBof3 = "Y";
- break;
- default:
- break;
- }
- MessageBox.Show("成功发送铁水!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- else
- MessageBox.Show("发送失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- private void StartUpThread()
- {
- ThreadStart ts = new ThreadStart(GetDataThread);
- _getDataThread = new Thread(ts);
- _getDataThread.Name = "GetDataThread ";
- _getDataThread.Start();
- }
- private void GetDataThread()
- {
- while (_bIfGetData)
- {
- if (!this.On_Off_Thread)//this.On_Off_Thread
- {
- System.Threading.Thread.Sleep(5000);
- continue;
- }
- try
- {
- // RefreshHighheatNo();
- GetRealData();
- GetCVTHeatno();
- Thread.Sleep(10000);
- }
- catch { }
- }
- }
- /// <summary>
- /// 获取冶炼炉号
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- ///
- private void GetCVTHeatno()
- {
- try
- {
- while (true)
- {
- this.txtCVT1.Text = "";
- this.txtCVT1.Appearance.BackColor = Color.LightGray;
- this.txtCVT2.Text = "";
- this.txtCVT2.Appearance.BackColor = Color.LightGray;
- this.txtCVT3.Text = "";
- this.txtCVT3.Appearance.BackColor = Color.LightGray;
- this.txtHMP1.Text = "";
- this.txtHMP1.Appearance.BackColor = Color.LightGray;
- this.txtHMP2.Text = "";
- this.txtHMP2.Appearance.BackColor = Color.LightGray;
- string strError = "";
- DataSet ds = null;// (DataSet)Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "getCVTHMPCurrentLH", new object[] { }, out strError);
- if (strError == "")
- {
- if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
- {
- for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
- {
- string v_LH = "";
- string v_POS = ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1);
- string v_POSID = ds.Tables[0].Rows[i]["objectpos"].ToString().Substring(3, 2);
- // if (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1) == "V") v_LH = "V" + v_LH;
- if (v_POS == "C")
- {
- v_LH = (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(5, 8));
- if (v_POSID == "01")
- {
- if (_strSendSucceededForBof1 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
- if (_strSendSucceededForBof1 == "Y") txtCVT1.Appearance.BackColor = Color.LightBlue;
- this.txtCVT1.Text = v_LH;
- }
- if (v_POSID == "02")
- {
- if (_strSendSucceededForBof2 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
- if (_strSendSucceededForBof2 == "Y") txtCVT2.Appearance.BackColor = Color.LightBlue;
- this.txtCVT2.Text = v_LH;
- }
- if (v_POSID == "03")
- {
- if (_strSendSucceededForBof3 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
- if (_strSendSucceededForBof3 == "Y") txtCVT3.Appearance.BackColor = Color.LightBlue;
- this.txtCVT3.Text = v_LH;
- }
- }
- if (v_POS == "H")
- {
- v_LH = ds.Tables[0].Rows[i]["objectid"].ToString();
- if (v_POSID == "01")
- {
- if (_strSendSucceededForHmp1 == "" || _strSendSucceededForHmp1 == "N") HeatNo_HudwId_Exist(v_LH);
- _strHmp1No = ds.Tables[0].Rows[i]["objectid"].ToString();
- if (_strSendSucceededForHmp1 == "Y") txtHMP1.Appearance.BackColor = Color.LightBlue;
- this.txtHMP1.Text = v_LH;
- }
- if (v_POSID == "02")
- {
- if (_strSendSucceededForHmp2 == "" || _strSendSucceededForHmp2 == "N") HeatNo_HudwId_Exist(v_LH);
- _strHmp2No = ds.Tables[0].Rows[i]["objectid"].ToString();
- if (_strSendSucceededForHmp2 == "Y") txtHMP2.Appearance.BackColor = Color.LightBlue;
- this.txtHMP2.Text = v_LH;
- }
- }
- }
- }
- if (txtCVT1.Text.Trim().Length == 0) _strSendSucceededForBof1 = "N";
- if (txtCVT2.Text.Trim().Length == 0) _strSendSucceededForBof2 = "N";
- if (txtCVT3.Text.Trim().Length == 0) _strSendSucceededForBof3 = "N";
- if (txtHMP1.Text.Trim().Length == 0) _strSendSucceededForHmp1 = "N";
- if (txtHMP2.Text.Trim().Length == 0) _strSendSucceededForHmp2 = "N";
- }
- Thread.Sleep(5000);
- }
- }
- catch (Exception EE)
- {
- }
- }
- /// <summary>
- /// 设置铁运进铁 按钮状态
- ///
- /// </summary>
- /// <param name="flag"></param>
- private void setbutton(string flag)
- {
- switch (flag)
- {
- case "1":
- ulbtnAdd.Enabled = true;
- ulbtnEdit.Enabled = true;
- ulbtnDelete.Enabled = true;
- ulbtnSave.Enabled = false;
- ulbtnCancel.Enabled = false;
- ulbtnRef.Enabled = true;
- ulbtnHisRequir.Enabled = true;
- break;
- case "2":
- ulbtnAdd.Enabled = false;
- ulbtnEdit.Enabled = false;
- ulbtnDelete.Enabled = false;
- ulbtnSave.Enabled = true;
- ulbtnCancel.Enabled = true;
- ulbtnRef.Enabled = true;
- ulbtnHisRequir.Enabled = true;
- break;
- }
- }
- /// <summary>
- /// 设置出铁界面BUTTON
- /// </summary>
- /// <param name="flag"></param>
- private void setbutton3(string flag)
- {
- switch (flag)
- {
- case "1":
- ulbtnAdd3.Enabled = true;
- ulbtnEdit3.Enabled = true;
- ulbtnDelete3.Enabled = true;
- ulbtnSave3.Enabled = false;
- ulbtnCancel3.Enabled = false;
- ulbtnRef3.Enabled = true;
- ulbtnHisRequir3.Enabled = true;
- break;
- case "2":
- ulbtnAdd3.Enabled = false;
- ulbtnEdit3.Enabled = false;
- ulbtnDelete3.Enabled = false;
- ulbtnSave3.Enabled = true;
- ulbtnCancel3.Enabled = true;
- ulbtnRef3.Enabled = true;
- ulbtnHisRequir3.Enabled = true;
- break;
- }
- }
- private void setucHtInIron3(string flag)
- {
- switch (flag)
- {
- case "1":
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
-
- break;
- case "2":
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
- break;
- }
- }
- /// <summary>
- /// 设置 ucInIron Grid的读写状态
- /// 1:NoEDIT 2:ALLOWEDIT
- /// </summary>
- /// <param name="flag"></param>
- private void setucInIron(string flag)
- {
- switch (flag)
- {
- case "1":
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- break;
- case "2":
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
- break;
- }
- }
- private string getshift()
- {
- string err = "";
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classCommonModule";
- //par.MethodName = "GetCurrDuty";
- //par.args = new object[] { };
- string ds = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- if (ds != "")
- {
- return ds;
- }
- else
- {
- return "";
- }
- }
- /// <summary>
- /// 序号栏锁定
- /// </summary>
- private void SetMisnoNoEdite()
- {
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- }
- /// <summary>
- /// 序号栏锁定
- /// </summary>
- private void SetMisnoNoEdite3()
- {
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- //ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucZDOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- }
- /// <summary>
- /// 班组转化
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private string ConvertShift(string flag, string shift)
- {
- string StrReturn = "";
- if (flag == "1" & shift != "")
- {
- switch (shift.Substring(0, 1))
- {
- case "1":
- StrReturn = "白";
- break;
- case "2":
- StrReturn = "中";
- break;
- case "3":
- StrReturn = "夜";
- break;
- }
- }
- else if (flag == "2" & shift != "")
- {
- switch (shift.Substring(1, 1))
- {
- case "1":
- StrReturn = "甲";
- break;
- case "2":
- StrReturn = "乙";
- break;
- case "3":
- StrReturn = "丙";
- break;
- case "4":
- StrReturn = "丁";
- break;
- }
- }
- else if (flag == "3" & shift != "")
- {
- switch (shift.Trim())
- {
- case "白":
- StrReturn = "1";
- break;
- case "中":
- StrReturn = "2";
- break;
- case "夜":
- StrReturn = "3";
- break;
- }
- }
- else if (flag == "4" & shift != "")
- {
- switch (shift.Trim())
- {
- case "甲":
- StrReturn = "1";
- break;
- case "乙":
- StrReturn = "2";
- break;
- case "丙":
- StrReturn = "3";
- break;
- case "丁":
- StrReturn = "4";
- break;
- }
- }
- return StrReturn;
- }
- /// <summary>
- /// 设置班组下拉框
- /// </summary>
- /// <param name="Grid"></param>
- private void SetColumnModeGroup(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
- {
- DataTable dt = new DataTable();
- dt.TableName = "JIALIAO";
- DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- dc = new DataColumn("BCNA", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- DataRow dr = dt.NewRow();
- dr["BCBM"] = "1";
- dr["BCNA"] = "白";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "2";
- dr["BCNA"] = "中";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "3";
- dr["BCNA"] = "夜";
- dt.Rows.Add(dr);
- //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Group", 0, "班 组", 60, Grid, dt, "BCBM", "BCNA");
- }
- /// <summary>
- /// 设置班组下拉框
- /// </summary>
- /// <param name="Grid"></param>
- private void SetColumnModeShift(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
- {
- DataTable dt = new DataTable();
- dt.TableName = "JIALIAO";
- DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- dc = new DataColumn("BCNA", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- DataRow dr = dt.NewRow();
- dr["BCBM"] = "1";
- dr["BCNA"] = "甲";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "2";
- dr["BCNA"] = "乙";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "3";
- dr["BCNA"] = "丙";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "4";
- dr["BCNA"] = "丁";
- dt.Rows.Add(dr);
- //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Shift", 0, "班组", 60, Grid, dt, "BCBM", "BCNA");
- }
- /// <summary>
- /// 设置去向
- /// </summary>
- private void SetColumnModequxiang()
- {
- DataTable dt = new DataTable();
- dt.TableName = "JIALIAO";
- DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- dc = new DataColumn("BCNA", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- DataRow dr = dt.NewRow();
- dr["BCBM"] = "1";
- dr["BCNA"] = "1#直兑";
- dt.Rows.Add(dr);
- //dr = dt.NewRow();
- //dr["BCBM"] = "2";
- //dr["BCNA"] = "2#直兑";
- //dt.Rows.Add(dr);
- //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("IronQuxiang", 0, "铁水去向", 135, ucInIron1.ultraGrid1, dt, "BCBM", "BCNA");
- }
- /// <summary>
- /// 设置去向
- /// </summary>
- private void SetColumnModeOutquxiang()
- {
- DataTable dt = new DataTable();
- dt.TableName = "JIALIAO";
- DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- dc = new DataColumn("BCNA", Type.GetType("System.String"));
- dt.Columns.Add(dc);
- DataRow dr = dt.NewRow();
- dr["BCBM"] = "1";
- dr["BCNA"] = "1#转炉";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "2";
- dr["BCNA"] = "2#转炉";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "3";
- dr["BCNA"] = "3#转炉";
- dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "4";
- dr["BCNA"] = "1#预处理";
- dt.Rows.Add(dr);
- //dr = dt.NewRow();
- //dr["BCBM"] = "5";
- //dr["BCNA"] = "2#预处理";
- //dt.Rows.Add(dr);
- dr = dt.NewRow();
- dr["BCBM"] = "6";
- dr["BCNA"] = "1#混铁炉";
- dt.Rows.Add(dr);
- //dr = dt.NewRow();
- //dr["BCBM"] = "7";
- //dr["BCNA"] = "2#混铁炉";
- //dt.Rows.Add(dr);
- //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCellEdit("IronQuxiang", 0, "铁水去向", 100, ucZDOutIron1.ultraGrid1, dt, "BCBM", "BCNA");
- }
- /// <summary>
- /// 铁运进铁设置初始数据
- /// </summary>
- private void SetGridNewIronData()
- {
- ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
- ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = "";
- ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
- ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
- ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
- ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = "";
- ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = "0";
- ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = this.Text.Substring(0, 1);
- }
- /// <summary>
- /// 设置出铁初始数据
- /// </summary>
- private void SetGridNewIronData3()
- {
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "自动";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = "1#转炉";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = "";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = DateTime.Now;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = "直兑出铁";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
- }
- private void Modify_Es_Comeinto()
- {
- string strError = "";
- try
- {
- for (int i = 0; i < alZDIn.Count; i++)
- {
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateZDHBData", new object[] { alZDIn[i] }, out strError);
- }
- alZDIn.Clear();
- }
- catch
- {
- MessageBox.Show("直兑进铁更新失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- }
- /// <summary>
- /// 插入出铁记录
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void InsertData3()
- {
- GetGridData3();
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动")
- {
- string strError = "";
- Modify_Es_Comeinto();
- // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertZDOutIronData", new object[] { ArrayIronRow3 }, out strError);
- if (strError == "")
- {
- // MessageBox.Show("插入记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
-
- }
- else
- MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- else
- {
- string strError = "";
-
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateZDOutIronData", new object[] { ArrayIronRow3 }, out strError);
- if (strError != "")
- MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
-
- }
- /// <summary>
- /// 铁运进铁数据 ultraGrid2
- /// </summary>
- private void GetInIronData()
- {
- string err = "";
- string htWhere = "";
- htWhere = " where to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS')";
- try
- {
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "SelectZDInIronData";
- //par.args = new object[] { htWhere };
- //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- ultraDataSource2.Rows.Clear();
- if (ds.Tables.Count > 0)
- {
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- ultraDataSource2.Rows.Add(new object[] {
- dr["MISID"].ToString(),
- dr["MOLIRNSOURCE"].ToString(),
- dr["STOVEID"].ToString(),
- dr["TFPOTID"].ToString(),
- dr["TFPOTGROSSWGT"].ToString(),
- dr["TFPOTTAREWGT"].ToString(),
- dr["TFPOTWGT"].ToString(),
- dr["C"].ToString(),
- dr["SI"].ToString(),
- dr["MN"].ToString(),
- dr["P"].ToString(),
- dr["S"].ToString(),
- dr["ASN"].ToString(),
- dr["IRONTEMPERATURE"].ToString(),
- dr["ARRIVETIME"].ToString(),
- ConvertShift("1",dr["SHIFTCODE"].ToString()),
- ConvertShift("2",dr["SHIFTCODE"].ToString()),
- dr["FOLDPOTWGT"].ToString(),
- });
- }
- }
- }
- catch
- { }
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- RefreshHighheatNo();
- // GetCVTHeatno();
- }
- /// <summary>
- /// 数据CHECK
- /// </summary>
- /// <returns></returns>
- private bool CheckData()
- {
- if (ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
- if (ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
- ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
- //if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
- //{
- // return false;
- //}
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
- {
- return false;
- }
- return true;
- }
- private static bool IsDouble(string AValue)
- {
- try
- {
- Convert.ToDouble(AValue);
- return true;
- }
- catch
- {
- return false;
- }
- }
- private void InsertData()
- {
- GetGridData();
- if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动")
- {
- string strError = "";
- string[] strGLGH = ArrayIronRow[5].Split(',');
- bool blErr = false;
- for (int i = 0; i < strGLGH.Length; i++)
- {
- ArrayIronRow[5] = strGLGH[i];
- // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertZDIronData", new object[] { ArrayIronRow }, out strError);
- if (strError == "") blErr = true;
- }
- if (blErr == false)
- MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- else
- {
- string strError = "";
- // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateZDIronData", new object[] { ArrayIronRow }, out strError);
- if (strError != "")
- MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- /// <summary>
- /// 取铁运进铁的数据 到数组
- /// </summary>
- private void GetGridData()
- {
- try
- {
- ArrayIronRow[0] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text;
- ArrayIronRow[1] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
- ArrayIronRow[2] = ConvertShift("3", ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucInIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
- ArrayIronRow[3] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Text;
- ArrayIronRow[4] = ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
- ArrayIronRow[5] = ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Text;
- ArrayIronRow[6] = ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
- ArrayIronRow[7] = ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
- ArrayIronRow[8] = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
- ArrayIronRow[9] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
- ArrayIronRow[10] = ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text;
- ArrayIronRow[11] = ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
- ArrayIronRow[12] = ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
- ArrayIronRow[13] = ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text;
- ArrayIronRow[14] = ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text;
- ArrayIronRow[15] = ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text;
- ArrayIronRow[16] = ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
- ArrayIronRow[17] = User;
- ArrayIronRow[18] = this.Text.Substring(0,1);
- ArrayIronRow[19] = ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Text;
- }
- catch { }
- }
- /// <summary>
- /// 取得出铁GRID数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void GetGridData3()
- {
- try
- {
- ArrayIronRow3[0] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text;
- ArrayIronRow3[1] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Text; //高炉炉号
- ArrayIronRow3[2] = ConvertShift("3", ucZDOutIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucZDOutIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
- ArrayIronRow3[3] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Text;
- ArrayIronRow3[4] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
- ArrayIronRow3[5] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLDno"].Text;
- ArrayIronRow3[6] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
- ArrayIronRow3[7] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
- ArrayIronRow3[8] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
- ArrayIronRow3[9] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text; //铁水来源
- ArrayIronRow3[10] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Text;
- ArrayIronRow3[11] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
- ArrayIronRow3[12] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
- ArrayIronRow3[13] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Text;
- ArrayIronRow3[14] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Text;
- ArrayIronRow3[15] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Text;
- ArrayIronRow3[16] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
- ArrayIronRow3[17] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Text;
- ArrayIronRow3[18] = User;
- ArrayIronRow3[19] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text;
- ArrayIronRow3[20] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Text;//出铁类型
- ArrayIronRow3[21] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text;
- ArrayIronRow3[22] = this.Text.Substring(0, 1);
- ArrayIronRow3[23] = ucZDOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Text;
- }
- catch { }
- }
- /// <summary>
- /// 事件的委托
- /// </summary>
- private void SetUserControlDelegate()
- {
- ucInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucInIron1_CellChange);
- ucZDOutIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucZDOutIron1_CellChange);
- ucZDOutIron1.ultraGrid1.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucZDOutIron1_ClickCellButton);
- }
- private void ucInIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- float flPZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
- float flMZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
- float flJZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
- switch (e.Cell.Column.Key)
- {
- case "LdMaoWeight":
- {
- try
- {
- if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
- else if (flPZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value;
- }
- catch { }
- break;
- }
- case "LdKongWeight":
- {
- try
- {
- if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
- else if (flMZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value;
- }
- catch { }
- break;
- }
- case "IronWeight":
- {
- try
- {
- if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
- else if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
- else if (flMZ > 0 && flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
- ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Value = flJZ;
- }
- catch { }
- break;
- }
- }
- }
- private void ucZDOutIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- switch (e.Cell.Column.Key)
- {
- case "LdKongWeight":
- {
- try
- {
- float a = Convert.ToSingle(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
- float b = Convert.ToSingle(ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(b + a);
- }
- catch { }
- break;
- }
- case "ZhuanluLdNo":
- {
- try
- {
- string strStatus = "";
- int intAge = 0;
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.ToString().Length > 0)
- {
- intAge = GetIronwrapAge(ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text, out strStatus);
- if (strStatus == "备用")
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = intAge + 1;
- else
- {
- // MessageBox.Show("当前铁包状态【" + strStatus + "】不能使用!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "";
- // ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
- }
- }
- else
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
- }
- catch
- { }
- break;
- }
- }
- }
- private void ucZDOutIron1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- switch (e.Cell.Column.Key)
- {
- case "HtHeatNo":
- {
- 弹出窗体.frmZDInIron frmMixInSource_1 = new 弹出窗体.frmZDInIron();
- using (frmMixInSource_1)
- {
- if (frmMixInSource_1.ShowDialog(this) == DialogResult.OK)
- {
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = frmMixInSource_1.Laiyuan;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = frmMixInSource_1.stoveNo;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = frmMixInSource_1.AllWeight;
- alZDIn = frmMixInSource_1.alZDInIron;
- string[] strIronEle = alZDIn[0] as string[];
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = frmMixInSource_1.str_C;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = frmMixInSource_1.str_Si;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = frmMixInSource_1.str_Mn;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = frmMixInSource_1.str_P;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = frmMixInSource_1.str_S;
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = frmMixInSource_1.str_Asn;
- }
- }
- break;
- }
- default:
- break;
- }
- }
- private void GetHtOutIronData()
- {
- string err = "";
- string htWhere = "";
- string Wsid = this.Text.Substring(0, 1);
- htWhere = " where to_char(TAPHOLESTARTTIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') and WSID='" + Wsid + "'";
- try
- {
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "SelectZDOutIronData";
- //par.args = new object[] { htWhere };
- DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- ultraDataSource4.Rows.Clear();
- if (ds.Tables.Count > 0)
- {
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- ultraDataSource4.Rows.Add(new object[] {
- dr["MISID"].ToString(),
- dr["MOLIRNLEAVE"].ToString(),
- dr["IRONWRAPID"].ToString(),
-
- dr["IRONPOTTAREWGT"].ToString(),
- dr["IRONPOTGROSSWGT"].ToString(),
- dr["IRONPOTWGT"].ToString(),
- dr["C"].ToString(),
- dr["SI"].ToString(),
- dr["MN"].ToString(),
- dr["P"].ToString(),
- dr["S"].ToString(),
- dr["ASN"].ToString(),
- dr["IRONTEMPERATURE"].ToString(),
- dr["TAPHOLESTARTTIME"].ToString(),
- ConvertShift("1",dr["SHIFTCODE"].ToString()),
- ConvertShift("2",dr["SHIFTCODE"].ToString()),
- dr["IRONEXPORTTYPE"].ToString(),
- dr["SMELTINGIDOFCVT"].ToString(),
- dr["WEIGHTOFCVT"].ToString(),
- dr["IRONWRAPAGE"].ToString(),
- dr["MOLIRNSOURCE"].ToString(),
- dr["STOVEID"].ToString(),
- });
- }
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- private void GetElementData()
- {
- string err = "";
- string htWhere = "";
- string Wsid = this.Text.Substring(0, 1);
- htWhere = " and to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') ";
- try
- {
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "SelectZDElementData";
- //par.args = new object[] { htWhere };
- DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- ultraDataSource5.Rows.Clear();
- if (ds.Tables.Count > 0)
- {
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- ultraDataSource5.Rows.Add(new object[] {
- dr["HEATNO"].ToString(),
- dr["C"].ToString(),
- dr["SI"].ToString(),
- dr["MN"].ToString(),
- dr["P"].ToString(),
- dr["S"].ToString(),
- dr["ASN"].ToString(),
- dr["NI"].ToString(),
- dr["CU"].ToString(),
- dr["SN"].ToString(),
- dr["SB"].ToString(),
- dr["CHECKNO"].ToString()
- });
- }
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- private bool CheckData3()
- {
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
- if (ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["C"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["P"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["S"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["As"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text))
- {
- return false;
- }
- if (!IsDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text))
- {
- return false;
- }
- return true;
- }
- #endregion
- #region buttonevent
- private void ulbtnAdd_Click(object sender, EventArgs e)
- {
- setbutton("2");
- setucInIron("2");
- SetMisnoNoEdite();
- SetGridNewIronData();
- }
- private void ulbtnEdit_Click(object sender, EventArgs e)
- {
- blModify = true;
- setbutton("2");
- setucInIron("2");
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- }
- private void ulbtnDelete_Click(object sender, EventArgs e)
- {
- if (ultraGrid2.ActiveRow == null || ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
- if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
- MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
- string strWhere = "where MISID='" + ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text + "'";
- try
- {
- string strError = "";
- // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "DeleteZDIronData", new object[] { strWhere }, out strError);
- if (strError == "")
- MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- else
- MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- catch (Exception ee)
- {
- string s = ee.Message;
- }
- GetInIronData();
- }
- private void ulbtnSave_Click(object sender, EventArgs e)
- {
- if (CheckData() == false)
- {
- MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value.ToString().Length>0 && ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text.Substring(1, 1) != "#")
- {
- MessageBox.Show(this, "请选择铁水去向!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- InsertData();
- GetInIronData();
- }
- private void ulbtnCancel_Click(object sender, EventArgs e)
- {
- setbutton("1");
- setucInIron("1");
- ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "";
- ultraGrid2_AfterRowActivate(null, null);
- blModify = false;
- }
- private void ulbtnRef_Click(object sender, EventArgs e)
- {
- GetInIronData();
- }
- private void ulbtnHisRequir_Click(object sender, EventArgs e)
- {
- frmRequryZDInIron frm1 = new frmRequryZDInIron();
- frm1.MdiParent = this.MdiParent;
- // frm3.RemotingHelp = this.RemotingHelp;
- frm1.Show();
- }
- private void ulbtnAdd3_Click(object sender, EventArgs e)
- {
- setbutton3("2");
- setucHtInIron3("2");
- SetMisnoNoEdite3();
- SetGridNewIronData3();
- }
- private void ulbtnEdit3_Click(object sender, EventArgs e)
- {
- setbutton3("2");
- setucHtInIron3("2");
- SetMisnoNoEdite3();
- }
- private void ulbtnDelete3_Click(object sender, EventArgs e)
- {
- if (ultHtOutIronGrid.ActiveRow == null || ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
- if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
- MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
- string strWhere = "where MISID='" + ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text + "'";
- try
- {
- string strError = "";
- //hengxing
- //ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
- // "Core.LgMes.Server.lgJobMgt.classIronJob",
- // "DeleteZDOutIronData",
- // new object[] { strWhere,this.Text.Substring(0,1),
- // Convert.ToDouble(ucZDOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text) }, out strError);
- if (strError == "")
- MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- else
- MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- catch (Exception ee)
- {
- string s = ee.Message;
- }
- GetHtOutIronData();
- }
- private void ulbtnSave3_Click(object sender, EventArgs e)
- {
- if (CheckData3() == false)
- {
- MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- InsertData3();
- GetHtOutIronData();
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
- }
- private void ulbtnCancel3_Click(object sender, EventArgs e)
- {
- setbutton3("1");
- setucHtInIron3("1");
- ucZDOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "";
- ultHtOutIronGrid_AfterRowActivate(null, null);
- }
- private void ulbtnRef3_Click(object sender, EventArgs e)
- {
- GetHtOutIronData();
- GetElementData();
- }
- private void ulbtnHisRequir3_Click(object sender, EventArgs e)
- {
- frmRequryZDoutIron frm1 = new frmRequryZDoutIron();
- frm1.MdiParent = this.MdiParent;
- // frm3.RemotingHelp = this.RemotingHelp;
- frm1.Show();
- }
- private void ulbtnCVT1_Click(object sender, EventArgs e)
- {
- if (txtCVT1.Text.Trim().Length == 0)
- {
- MessageBox.Show("1#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- if (ArrayIronRow4[0].Trim().Length > 0)
- {
- ArrayIronRow4[4] = txtCVT1.Text;
- ArrayIronRow4[5] = "CVT";
- SendIronToCvt();
- ArrayIronRow4[0] = "";
- ArrayIronRow4[1] = "";
- ArrayIronRow4[2] = "";
- ArrayIronRow4[3] = "";
- ArrayIronRow4[4] = "";
- ArrayIronRow4[5] = "";
- GetHtOutIronData();
- }
- else
- MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- private void ulbtnCVT2_Click(object sender, EventArgs e)
- {
- if (txtCVT2.Text.Trim().Length == 0)
- {
- MessageBox.Show("2#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- if (ArrayIronRow4[0].Trim().Length > 0)
- {
- ArrayIronRow4[4] = txtCVT2.Text;
- ArrayIronRow4[5] = "CVT";
- SendIronToCvt();
- ArrayIronRow4[0] = "";
- ArrayIronRow4[1] = "";
- ArrayIronRow4[2] = "";
- ArrayIronRow4[3] = "";
- ArrayIronRow4[4] = "";
- ArrayIronRow4[5] = "";
- GetHtOutIronData();
- }
- else
- MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- private void ulbtnCVT3_Click(object sender, EventArgs e)
- {
- if (txtCVT3.Text.Trim().Length == 0)
- {
- MessageBox.Show("3#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- if (ArrayIronRow4[0].Trim().Length > 0)
- {
- ArrayIronRow4[4] = txtCVT3.Text;
- ArrayIronRow4[5] = "CVT";
- SendIronToCvt();
- ArrayIronRow4[0] = "";
- ArrayIronRow4[1] = "";
- ArrayIronRow4[2] = "";
- ArrayIronRow4[3] = "";
- ArrayIronRow4[4] = "";
- ArrayIronRow4[5] = "";
- GetHtOutIronData();
- }
- else
- MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- private void ulbtnHMP1_Click(object sender, EventArgs e)
- {
- if (txtHMP1.Text.Trim().Length == 0)
- {
- MessageBox.Show("1#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- if (ArrayIronRow4[0].Trim().Length > 0)
- {
- ArrayIronRow4[4] = _strHmp1No;// txtHMP1.Text;
- ArrayIronRow4[5] = "HMP";
- SendIronToCvt();
- ArrayIronRow4[0] = "";
- ArrayIronRow4[1] = "";
- ArrayIronRow4[2] = "";
- ArrayIronRow4[3] = "";
- ArrayIronRow4[4] = "";
- ArrayIronRow4[5] = "";
- ArrayIronRow4[8] = "";
- GetHtOutIronData();
- }
- else
- MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- private void ulbtnHMP2_Click(object sender, EventArgs e)
- {
- if (txtHMP2.Text.Trim().Length == 0)
- {
- MessageBox.Show("2#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- if (ArrayIronRow4[0].Trim().Length > 0)
- {
- ArrayIronRow4[4] = _strHmp2No; //txtHMP2.Text;
- ArrayIronRow4[5] = "HMP";
- SendIronToCvt();
- ArrayIronRow4[0] = "";
- ArrayIronRow4[1] = "";
- ArrayIronRow4[2] = "";
- ArrayIronRow4[3] = "";
- ArrayIronRow4[4] = "";
- ArrayIronRow4[5] = "";
- ArrayIronRow4[8] = "";
- GetHtOutIronData();
- }
- else
- MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- #endregion
- /// <summary>
- /// 获取铁包包龄
- /// </summary>
- /// <param name="strIronwrapID"></param>
- /// <returns></returns>
- private int GetIronwrapAge(string strIronwrapID, out string strStatus)
- {
- string strErr = "";
- int intIronAge = 0;
- string _strStatus = "";
- object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
- // "Core.LgMes.Server.lgJobMgt.classIronJob",
- // "GetIronwrapAge", new object[] { "res_es_taphole", strIronwrapID }, out strErr);
- if (strErr == "")
- {
- DataSet ds = (DataSet)obj;
- if (ds.Tables.Count > 0)
- {
- if (ds.Tables[0].Rows.Count > 0)
- {
- intIronAge = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
- _strStatus = ds.Tables[0].Rows[0]["STATUS"].ToString();
- }
- }
- }
- strStatus = _strStatus;
- return intIronAge;
- }
- private void HeatNo_HudwId_Exist(string strID)
- {
- string strErr = "";
- string strGw = "";
- if (strID.Substring(0, 1) == "H")
- strGw = strID.Substring(0, 2);
- else
- strGw = strID.Substring(2, 1);
- string obj = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
- // "Core.LgMes.Server.lgJobMgt.classIronJob",
- // "HeatNo_HudwId_Exist", new object[] { strID }, out strErr);
- if (strErr == "")
- {
- switch (strGw)
- {
- case "H1":
- _strSendSucceededForHmp1 = obj;
- break;
- case "H2":
- _strSendSucceededForHmp2 = obj;
- break;
- case "1":
- _strSendSucceededForBof1 = obj;
- break;
- case "2":
- _strSendSucceededForBof2 = obj;
- break;
- case "3":
- _strSendSucceededForBof3 = obj;
- break;
- default:
- break;
- }
- }
- }
- private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if(e.Tab.Index==1)
- GetElementData();
- }
- }
- }
|