| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752 |
- 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 frmMixmIron : CoreFS.CA06.FrmBase
- {
- private Thread _getDataThread; // 取数据线程
- private bool _bIfGetData = true; // 控制取数据线程循环的标志
- private string[] ArrayIronRow = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存铁运进铁数据
- private string[] ArrayIronRow2 = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存混铁炉进铁数据
- private string[] ArrayIronRow3 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存混铁炉出铁数据
- private string[] ArrayIronRow4 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存发送到转炉铁水数据
-
- 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;
- #region formload
- public frmMixmIron()
- {
- InitializeComponent();
- CheckForIllegalCrossThreadCalls = false;
- }
- private void frmMixmIron_Load(object sender, EventArgs e)
- {
- try
- {
- User = this.UserInfo.GetUserName();//操作人;
- lblTyjt.Text = "T" + this.Text.Substring(0, 1);
- lblHtjt.Text = "J" + this.Text.Substring(0, 1);
- lblHtct.Text = "C" + this.Text.Substring(0, 1);
- SetUserControlDelegate();
- ultraDataSource1.Rows.Add(new object[] { "", "", "", "", "", "", "", "", null });
- timer1_Tick(null, new EventArgs());
- this.timer1.Start();
- GetInIronData();
- StartUpThread();
- setbutton("1");
- setucInIron("1");
- SetColumnModeShift(ucInIron1.ultraGrid1);
- SetColumnModeGroup(ucInIron1.ultraGrid1);
- SetColumnModequxiang();
- setucHtInIron("1");
- setbutton2("1");
- SetColumnModeShift(ucHtInIron1.ultraGrid1);
- SetColumnModeGroup(ucHtInIron1.ultraGrid1);
- GetHtInIronData();
- ultHtInIronGrid_AfterRowActivate(null, null);
-
- setucHtInIron3("1");
- setbutton3("1");
- SetColumnModeShift(ucHtOutIron1.ultraGrid1);
- SetColumnModeGroup(ucHtOutIron1.ultraGrid1);
- SetColumnModeOutquxiang();
- GetHtOutIronData();
- ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Hidden = true;
- GetElementData();
- }
- catch
- { }
- }
- #endregion
- #region Thread Handle
- /// <summary>
- /// 启动线程主程序
- /// </summary>
- private void StartUpThread()
- {
- ThreadStart ts = new ThreadStart(GetDataThread);
- _getDataThread = new Thread(ts);
- _getDataThread.Name = "GetDataThread ";
- _getDataThread.Start();
- }
- private string User ="";
- /// <summary>
- /// 取数据线程程序
- /// </summary>
- private void GetDataThread()
- {
- while (_bIfGetData)
- {
- if (!this.On_Off_Thread)//this.On_Off_Thread
- {
- System.Threading.Thread.Sleep(5000);
- continue;
- }
- try
- {
- //GetInIronData();
- GetRealData();
- GetCVTHeatno();
- Thread.Sleep(10000);
- }
- catch { }
- }
- }
- #endregion
- #region dataevent
- 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);
- }
- }
- /// <summary>
- /// 混铁炉进铁数据 utrHtInIronGrid
- ///
- /// </summary>
- private void GetHtInIronData()
- {
- string err = "";
- string htWhere = "";
- string Wsid = this.Text.Substring(0, 1);
- htWhere = " where to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') and WSID='" + Wsid + "'";
- try
- {
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "SelectHtInIronData";
- //par.args = new object[] { htWhere };
- //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- ultraDataSource3.Rows.Clear();
- if (ds.Tables.Count > 0)
- {
- foreach (DataRow dr in ds.Tables[0].Rows)
- {
- ultraDataSource3.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["Memo"].ToString()
- });
- }
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- /// <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 = "SelectInIronData";
- //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())
- });
- }
- }
- }
- catch
- { }
- }
- /// <summary>
- /// 获取出铁详细列表
- /// </summary>
- 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
- {
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "SelectHtOutIronData";
- //par.args = new object[] { htWhere };
- //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- 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["CHECKNO"].ToString()
- });
- }
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- private void GetElementData()
- {
- string err = "";
- string htWhere = "";
- string Wsid = this.Text.Substring(0, 1);
- htWhere = " where STATIONCODE='M0" + Wsid + "'";
- try
- {
- //hengxing
- //CallingMessage par = new CallingMessage();
- //par.ServerName = "lgJobMgt";
- //par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
- //par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
- //par.MethodName = "SelectHtElementData";
- //par.args = new object[] { htWhere };
- //object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
- 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["STATIONCODE"].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 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 = 8;
- if (this.rdoFNo9.Checked) nFurnaceNo = 9;
- 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 SaveIronData()
- {
- GetGridData();
- string strError = "";
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpTest", new object[] { ArrayIronRow }, out strError);
- // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateIronData", new object[] { ArrayIronRow }, out strError);
- if (strError == "")
- MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- else
- MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- 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", "InsertIronData", 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", "UpdateIronData", new object[] { ArrayIronRow }, out strError);
- if (strError == "")
- {
- //MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- else
- MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- private void InsertData2()
- {
- GetGridData2();
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动")
- {
- string strError = "";
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertHtIronData", new object[] { ArrayIronRow2 }, out strError);
- if (strError != "")
- MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- else
- {
- string strError = "";
- // Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateHtInIronData", new object[] { ArrayIronRow2 }, out strError);
- if (strError != "")
- MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- /// <summary>
- /// 插入出铁记录
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void InsertData3()
- {
- GetGridData3();
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动")
- {
- string strError = "";
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertHtOutIronData", new object[] { ArrayIronRow3 }, out strError);
- if (strError == "")
- {
- //MessageBox.Show("插入记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
- }
- else
- MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- else
- {
- string strError = "";
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateHtOutIronData", new object[] { ArrayIronRow3 }, out strError);
- if (strError == "")
- {
- //MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
- }
- else
- MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- /// <summary>
- /// 获取冶炼炉号
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- ///
- private void GetCVTHeatno()
- {
- try
- {
- 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 == "" || _strSendSucceededForBof2 == "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 == "" || _strSendSucceededForBof3 == "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")
- {
- _strHmp1No = ds.Tables[0].Rows[i]["objectid"].ToString();
- if (_strSendSucceededForHmp1 == "" || _strSendSucceededForHmp1 == "N") HeatNo_HudwId_Exist(v_LH);
- 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";
- }
- }
- catch (Exception EE)
- {
- }
- }
- private void SendIronToCvt()
- {
- string strError = "";
- string strWz = "";
- //Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "SendIronToCVT", 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);
- }
- #endregion
- #region gridevent
- 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["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 ultHtInIronGrid_AfterRowActivate(object sender, EventArgs e)
- {
- }
- 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 (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
- //try
- //{
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- // // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
- //}
- //catch { }
- }
- private void ultHtOutIronGrid_Click(object sender, EventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
- // Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
- 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["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
- ArrayIronRow4[9] = aRow.Cells["LDWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDWeight"].Text : "0";
- ArrayIronRow4[10] = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
- try
- {
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["CHECKNO"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
- }
- catch { }
- //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["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
- //ArrayIronRow4[9] = aRow.Cells["LDWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDWeight"].Text : "0";
- }
- private void ultHtElementIron_AfterRowActivate(object sender, EventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtElementIron.ActiveRow;
- if (aRow == null) return;
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text != "自动") return;
- try
- {
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
- }
- catch
- {
- }
- }
- /// <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["IronQuxiang"].Value = this.Text.Substring(0, 1);
- }
- /// <summary>
- /// 混铁炉进铁设置初始数据
- /// </summary>
- private void SetGridNewIronData2()
- {
- ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = "";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = "";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
- ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
- ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = "";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Memo"].Value = "";
- }
- /// <summary>
- /// 设置出铁初始数据
- /// </summary>
- private void SetGridNewIronData3()
- {
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "自动";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = "1#转炉";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = DateTime.Now;
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = "正常出铁";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
- }
- /// <summary>
- /// EDITBUTTON事件
- /// </summary>
- /// <param name="flag"></param>
- /// <param name="shift"></param>
- /// <returns></returns>
- private void ucHtInIron1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- switch (e.Cell.Column.Key)
- {
- case "IronLaiyuan":
- {
- 弹出窗体.frmMixInIronNo frmMixInSource_1 = new 弹出窗体.frmMixInIronNo();
- frmMixInSource_1.strMisNo = this.Text.Substring(0, 1);
- using (frmMixInSource_1)
- {
- if (frmMixInSource_1.ShowDialog(this) == DialogResult.OK)
- {
- ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = frmMixInSource_1.C;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = frmMixInSource_1.Si;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = frmMixInSource_1.Mn;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = frmMixInSource_1.P;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = frmMixInSource_1.S;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = frmMixInSource_1.V;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = frmMixInSource_1.SourceID;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = frmMixInSource_1.BlastStoveNo;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = frmMixInSource_1.Temperature;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = frmMixInSource_1.CanWeight;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = frmMixInSource_1.GrossWeight;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = frmMixInSource_1.NetWeight;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = frmMixInSource_1.PotNo;
- }
- }
- break;
- }
- default:
- break;
- }
- }
- 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);
- }
- 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);
- }
- 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);
- }
- catch { }
- break;
- }
- }
- }
- private void ucHtOutIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- float flPZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
- float flMZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
- float flJZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
- switch (e.Cell.Column.Key)
- {
- case "LdMaoWeight":
- {
- try
- {
- if (flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- else if (flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
- else if (flPZ > 0 && flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- }
- catch { }
- break;
- }
- case "LdKongWeight":
- {
- try
- {
- if (flMZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- else if (flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
- else if (flMZ > 0 && flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- }
- catch { }
- break;
- }
- case "IronWeight":
- {
- try
- {
- if (flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
- else if (flMZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
- else if (flMZ > 0 && flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
- }
- catch { }
- break;
- }
- case "ZhuanluLdNo":
- {
- try
- {
- string strStatus = "";
- int intAge = 0;
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.ToString().Length > 0)
- {
- intAge= GetIronwrapAge(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text, out strStatus);
- if (strStatus == "备用")
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = intAge + 1;
- else
- {
- //MessageBox.Show("当前铁包状态【" + strStatus + "】不能使用!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "";
- //ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
- }
- }
- else
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
- }
- catch
- { }
- break;
- }
- }
- }
- private void ucHtInIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- float flPZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
- float flMZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
- float flJZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
- switch (e.Cell.Column.Key)
- {
- case "LdMaoWeight":
- {
- try
- {
- if (flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- else if (flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
- else if (flPZ > 0 && flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- }
- catch { }
- break;
- }
- case "LdKongWeight":
- {
- try
- {
- if (flMZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- else if (flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
- else if (flMZ > 0 && flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
- }
- catch { }
- break;
- }
- case "IronWeight":
- {
- try
- {
- if (flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
- else if (flMZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
- else if (flMZ > 0 && flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
- }
- catch { }
- break;
- }
- }
- //switch (e.Cell.Column.Key)
- //{
- // case "LdKongWeight":
- // {
- // try
- // {
- // float a = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
- // float b = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
- // ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(b - a);
- // }
- // catch { }
- // break;
- // }
- // case "LdMaoWeight":
- // {
- // try
- // {
- // float a = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
- // float b = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
- // ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(b - a);
- // }
- // catch { }
- // break;
- // }
- //}
- }
- /// <summary>
- /// editbutton事件的委托
- /// </summary>
- private void SetUserControlDelegate()
- {
- ucHtInIron1.ultraGrid1.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtInIron1_ClickCellButton);
- ucHtInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtInIron1_CellChange);
- ucInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucInIron1_CellChange);
- ucHtOutIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtOutIron1_CellChange);
- }
- #endregion
- #region function
- private string ConvertShift(string flag, string shift)
- {
- string StrReturn = "";
- if (flag == "1" & shift != "" & shift != null)
- {
- switch (shift.Substring(0, 1))
- {
- case "1":
- StrReturn = "白";
- break;
- case "2":
- StrReturn = "中";
- break;
- case "3":
- StrReturn = "夜";
- break;
- }
- }
- else if (flag == "2" & shift.Length > 1)
- {
- 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;
- }
- private string getshift()
- {
- string err = "";
- //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>
- /// <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);
- //Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCellEdit("IronQuxiang", 0, "铁水去向", 100, ucHtOutIron1.ultraGrid1, dt, "BCBM", "BCNA");
- }
- /// <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 SetMisnoNoEdite2()
- {
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- }
- /// <summary>
- /// 序号栏锁定
- /// </summary>
- private void SetMisnoNoEdite3()
- {
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- RefreshHighheatNo();
- // GetCVTHeatno();
- }
- /// <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>
- /// 设置混铁炉进铁按钮状态
- /// </summary>
- /// <param name="flag"></param>
- private void setbutton2(string flag)
- {
- switch (flag)
- {
- case "1":
- ulbtnAdd2.Enabled = true;
- ulbtnEdit2.Enabled = true;
- ulbtnDelete2.Enabled = true;
- ulbtnSave2.Enabled = false;
- ulbtnCancel2.Enabled = false;
- ulbtnRef2.Enabled = true;
- ulbtnHisRequir2.Enabled = true;
- break;
- case "2":
- ulbtnAdd2.Enabled = false;
- ulbtnEdit2.Enabled = false;
- ulbtnDelete2.Enabled = false;
- ulbtnSave2.Enabled = true;
- ulbtnCancel2.Enabled = true;
- ulbtnRef2.Enabled = true;
- ulbtnHisRequir2.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;
- }
- }
- /// <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.Override.CellAppearance.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.Override.CellAppearance.BackColor = Color.LightBlue;
- break;
- }
- }
- /// <summary>
- /// 设置 ucHtInIron Grid的读写状态
- /// 1:NoEDIT 2:ALLOWEDIT
- /// </summary>
- /// <param name="flag"></param>
- private void setucHtInIron(string flag)
- {
- switch (flag)
- {
- case "1":
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- break;
- case "2":
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
- break;
- }
- }
- /// <summary>
- /// 设置出铁GRID
- /// </summary>
- /// <param name="AValue"></param>
- /// <returns></returns>
- private void setucHtInIron3(string flag)
- {
- switch (flag)
- {
- case "1":
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- break;
- case "2":
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
- ucHtOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
- break;
- }
- }
- private static bool IsDouble(string AValue)
- {
- try
- {
- Convert.ToDouble(AValue);
- return true;
- }
- catch
- {
- return false;
- }
- }
- /// <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 bool CheckData2()
- {
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
- ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
- //if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
- //{
- // return false;
- //}
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
- {
- return false;
- }
- return true;
- }
- private bool CheckData3()
- {
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
- if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text))
- {
- return false;
- }
- if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text))
- {
- return false;
- }
- return true;
- }
- /// <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;
- }
- catch { }
- }
- /// <summary>
- /// 取混铁炉进铁的数据 到数组
- /// </summary>
- private void GetGridData2()
- {
- try
- {
- ArrayIronRow2[0] = ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text;
- ArrayIronRow2[1] = ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
- ArrayIronRow2[2] = ConvertShift("3", ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucHtInIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
- ArrayIronRow2[3] = ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Text;
- ArrayIronRow2[4] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
- ArrayIronRow2[5] = ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Text;
- ArrayIronRow2[6] = ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
- ArrayIronRow2[7] = ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
- ArrayIronRow2[8] = ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
- ArrayIronRow2[9] = ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text;
- ArrayIronRow2[10] = ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text;
- ArrayIronRow2[11] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
- ArrayIronRow2[12] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
- ArrayIronRow2[13] = ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text;
- ArrayIronRow2[14] = ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text;
- ArrayIronRow2[15] = ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text;
- ArrayIronRow2[16] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Ironlaiyuan"].Text;
- ArrayIronRow2[17] = ucHtInIron1.ultraGrid1.Rows[0].Cells["memo"].Text;
- ArrayIronRow2[18] = User;
- }
- catch { }
- }
- /// <summary>
- /// 取得出铁GRID数据
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void GetGridData3()
- {
- try
- {
- ArrayIronRow3[0] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text;
- ArrayIronRow3[1] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Text; //混铁炉状态
- ArrayIronRow3[2] = ConvertShift("3", ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucHtOutIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
- ArrayIronRow3[3] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Text;
- ArrayIronRow3[4] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
- ArrayIronRow3[5] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLDno"].Text;
- ArrayIronRow3[6] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
- ArrayIronRow3[7] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
- ArrayIronRow3[8] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
- ArrayIronRow3[9] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text;
- ArrayIronRow3[10] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text;
- ArrayIronRow3[11] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
- ArrayIronRow3[12] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
- ArrayIronRow3[13] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text;
- ArrayIronRow3[14] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text;
- ArrayIronRow3[15] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text;
- ArrayIronRow3[16] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
- ArrayIronRow3[17] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Text;
- ArrayIronRow3[18] = User;
- ArrayIronRow3[19] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text;
- ArrayIronRow3[20] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Text;//出铁类型
- ArrayIronRow3[21] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text;
- ArrayIronRow3[22] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Text; //成分检验码
- }
- catch { }
- }
- #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", "DeleteIronData", 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)
- {
- frmRequryInIron frm1 = new frmRequryInIron();
- frm1.MdiParent = this.MdiParent;
- // frm3.RemotingHelp = this.RemotingHelp;
- frm1.Show();
- }
- private void ulbtnRef2_Click(object sender, EventArgs e)
- {
- GetHtInIronData();
- }
- private void ulbtnAdd2_Click(object sender, EventArgs e)
- {
- setbutton2("2");
- setucHtInIron("2");
- SetMisnoNoEdite2();
- SetGridNewIronData2();
- }
- private void ulbtnEdit2_Click(object sender, EventArgs e)
- {
- setbutton2("2");
- setucHtInIron("2");
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
- }
- private void ulbtnDelete2_Click(object sender, EventArgs e)
- {
- if (ultHtInIronGrid.ActiveRow == null || ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
- GetGridData2(); //初始化进铁记录
- if (string.IsNullOrEmpty(ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text.Trim()))
- {
- MessageBox.Show("进铁序号不能为空,请选择进铁信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
- MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
- string strWhere = "where MISID='" + ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text + "'";
- try
- {
- string strError = "";
- //hengxing
- //ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
- // "Core.LgMes.Server.lgJobMgt.classIronJob",
- // "DeleteHtIronData",
- // new object[] { strWhere,
- // ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text,
- // Convert.ToDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text),
- // ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Text,ArrayIronRow2}, out strError);
- if (strError == "")
- MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- else
- MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- catch (Exception ee)
- {
- string s = ee.Message;
- }
- GetHtInIronData();
- }
- private void ulbtnSave2_Click(object sender, EventArgs e)
- {
- if (CheckData2() == false)
- {
- MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- InsertData2();
- GetHtInIronData();
- }
- private void ulbtnCancel2_Click(object sender, EventArgs e)
- {
- setbutton2("1");
- setucHtInIron("1");
- ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "";
- ultHtInIronGrid_AfterRowActivate_1(null, null);
- }
- private void ulbtnHisRequir2_Click(object sender, EventArgs e)
- {
- frmRequryhtInIron frm2 = new frmRequryhtInIron();
- frm2.MdiParent = this.MdiParent;
- // frm3.RemotingHelp = this.RemotingHelp;
- frm2.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 || ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
- if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
- MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
- string strWhere = "where MISID='" + ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text + "'";
- try
- {
- string strError = "";
- //hengxing
- //ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
- // "Core.LgMes.Server.lgJobMgt.classIronJob",
- // "DeleteHtOutIronData",
- // new object[] { strWhere,
- // ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text,
- // Convert.ToDouble(ucHtOutIron1.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();
- }
- private void ulbtnCancel3_Click(object sender, EventArgs e)
- {
- setbutton3("1");
- setucHtInIron3("1");
- ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "";
- ultHtOutIronGrid_Click(null, null);
- }
- private void ulbtnRef3_Click(object sender, EventArgs e)
- {
- GetHtOutIronData();
- GetElementData();
- }
- private void ulbtnHisRequir3_Click(object sender, EventArgs e)
- {
- frmRequryhtoutIron frm3 = new frmRequryhtoutIron();
- frm3.MdiParent = this.MdiParent;
- frm3.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] = "";
- ArrayIronRow4[6] = "";
- ArrayIronRow4[7] = "";
- 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] = "";
- ArrayIronRow4[6] = "";
- ArrayIronRow4[7] = "";
- 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] = "";
- ArrayIronRow4[6] = "";
- ArrayIronRow4[7] = "";
- 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[6] = "";
- ArrayIronRow4[7] = "";
- ArrayIronRow4[8] = "";
- ArrayIronRow4[9] = "";
- ArrayIronRow4[10] = "";
- 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[6] = "";
- ArrayIronRow4[7] = "";
- ArrayIronRow4[8] = "";
- ArrayIronRow4[9] = "";
- ArrayIronRow4[10] = "";
- 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_mis_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 ultraGrid4_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode != Keys.Enter)
- return;
- ultraGrid4.UpdateData();
- string keyStr = ultraGrid4.ActiveCell.Column.Key;
- double valueStr = 0;
- string strFindName = "";
- string strErr = "";
- if (keyStr == "AllInrion" || keyStr == "OutIronAll" || keyStr == "ZhiDuiAll")
- {
- if (keyStr == "AllInrion") strFindName = "IMPORTIRONTOTAL";
- if (keyStr == "OutIronAll") strFindName = "EXPORTIRONTOTAL";
- if (keyStr == "ZhiDuiAll") strFindName = "SKIPIRONTOTAL";
- try
- {
- if (ultraGrid4.ActiveCell.Value.ToString() != "")
- {
- valueStr = Convert.ToDouble(ultraGrid4.ActiveCell.Value);
- object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
- // "Core.LgMes.Server.lgJobMgt.classIronJob",
- // "StatIronWeight", new object[] { this.Text.Substring(0, 1), strFindName, 0, valueStr, 2 }, out strErr);
- if (strErr == "")
- ultraGrid4.ActiveCell.Value = valueStr;
- else
- MessageBox.Show("修改数据失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- }
- catch (Exception ex)
- {
- string Msg = ex.Message;
- MessageBox.Show("输入数据格式错误,请改正!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- }
- }
- 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 ultHtInIronGrid_AfterRowActivate_1(object sender, EventArgs e)
- {
- Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtInIronGrid.ActiveRow;
- // Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
- if (aRow == null) return;
- if (ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
- try
- {
- ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = aRow.Cells["InIronNo"].Text;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = aRow.Cells["HighNo"].Value != System.DBNull.Value ? aRow.Cells["HighNo"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value != System.DBNull.Value ? aRow.Cells["Tempture"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = aRow.Cells["InTime"].Text;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = aRow.Cells["QuXiang"].Text;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Memo"].Value = aRow.Cells["Memo"].Text;
- ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
- ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
- }
- catch { }
- }
- private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
- {
- if (e.Tab.Index == 1)
- GetElementData();
- }
- }
- }
|