| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382 |
- using System;
- using System.IO;
- using System.Drawing;
- using System.Collections;
- using System.Diagnostics;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Data;
- using System.Threading;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinMaskedEdit;
- using Infragistics.Win.UltraWinGrid;
- using Infragistics.Win;
- using System.Collections.Generic;
- using Core.Mes.Client.Common;
- using Core.LgMes.Client.LgJobMgt;
- using Core.LgMes.Client.lgClassModel.LgChem;
- using Core.LgMes.Client.lgClassModel.SqModel;
- namespace Core.LgMes.Client.LgIntegrationQuery
- {
- /// <summary>
- /// ELEMENTS 的摘要说明。
- /// </summary>
- public class frmLgElements : Core.Mes.Client.Common.frmStyleBase
- {
- #region " Construct "
- private Infragistics.Win.Misc.UltraGroupBox ultraGroupBox1;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label2;
- private System.ComponentModel.IContainer components;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Panel panel1;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.TextBox txtPage;
- private System.Windows.Forms.Button btn_Up;
- private System.Windows.Forms.Button btn_Down;
- private System.Windows.Forms.Button button3;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.CheckBox chkRefresh;
- private System.Windows.Forms.Label label9;
- public string StrPost = "0";
- private Label label11;
- private Label label10;
- private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtBeginTime;
- private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor uldtEndTime;
- private UltraMaskedEdit ultraMaskedEdit2;
- private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter GridExcelExporter;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
- private UltraGrid EMGrid;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
- private string m_szEntry = "";
- private DataSet dataSet1;
- private DataTable dataTable1;
- private DataColumn dataColumn7;
- private DataColumn dataColumn8;
- private DataColumn dataColumn9;
- private DataColumn dataColumn84;
- private DataColumn dataColumn85;
- string[] strERow;
- private TextBox txtSteel;
- private CheckBox chkGasSample; //化学成份列名
- string[] strRowName = new string[] { "C", "Mn", "S", "P", "Si", "Als", "Alt", "N", "Ti", "Nb", "B", "V", "Asn", "Sn", "Cu", "Sb", "O", "H", "Bsol" };
- bool Isbool = false;
- private DataColumn dataColumn1;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor cmb_BZ;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor cboGW;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor comboBox2;
- private DataColumn dataColumn2;
- private DataColumn dataColumn3;
- private Infragistics.Win.UltraWinEditors.UltraPictureBox ultraPictureBox1;
- private DataColumn dataColumn4;
- private DataColumn dataColumn5;
- private DataColumn dataColumn6;
- private DataColumn dataColumn10;
- private DataColumn dataColumn11;
-
- private Button button1;
- private DataColumn dataColumn12;
- private DataColumn dataColumn13;
- private UltraMaskedEdit ultraMaskedEdit1;
- public frmLgElements(string szPost)
- {
- InitializeComponent();
- this._devPos = szPost;
- }
- public frmLgElements()
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- this._devPos = StrPost;
- InitSteel();
- }
- public frmLgElements(string szEntry, string szLH)
- {
- InitializeComponent();
- this._devPos = StrPost;
- this.m_szEntry = szEntry;
- this.ultraMaskedEdit1.Text = szLH;
- }
- /// <summary>
- /// 初始化Grind牌号
- /// </summary>
- private void InitSteel()
- {
- string strErr = "";
- EMGrid.DisplayLayout.ValueLists.Add("SteelCode");
- DataSet dsSteel = null;//hengxing (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(
- // "lgIntegrationQuery",
- // "Core.LgMes.Server.lgIntegrationQuery.LgGeneralInfo",
- // "GetSteelInfo", new object[] { "where largeflag='1' order by steelcode " }, out strErr);
- if (strErr == "" && dsSteel != null)
- {
- //初始经Grid牌号字段数据集
- for (int i = 0; i < dsSteel.Tables[0].Rows.Count; i++)
- {
- EMGrid.DisplayLayout.ValueLists["SteelCode"].ValueListItems.Add(dsSteel.Tables[0].Rows[i]["SteelCode"].ToString(), dsSteel.Tables[0].Rows[i]["Steel"].ToString());
- }
- //绑定单位
- EMGrid.DisplayLayout.Bands[0].Columns["计划牌号"].ValueList = EMGrid.DisplayLayout.ValueLists["SteelCode"];
- }
- }
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- protected override void Dispose(bool disposing)
- {
- try
- {
- if (_getDataThread != null)
- _getDataThread.Abort();
- }
- catch { }
- if (disposing)
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose(disposing);
- }
- #region Windows 窗体设计器生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- Infragistics.Win.UltraWinEditors.EditorButton editorButton1 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
- Infragistics.Win.UltraWinEditors.EditorButton editorButton2 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
- Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem3 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem4 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem30 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem31 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem5 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem6 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem7 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem8 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem9 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem28 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem29 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem10 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem11 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem12 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem13 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem14 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem15 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.UltraWinEditors.EditorButton editorButton3 = new Infragistics.Win.UltraWinEditors.EditorButton("edit");
- Infragistics.Win.UltraWinEditors.EditorButton editorButton4 = new Infragistics.Win.UltraWinEditors.EditorButton("clear");
- Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Table1", -1);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("序号");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("熔炼号");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("计划牌号");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("化验时间");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JHGZ");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("shiftcode", -1, 7905313);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Station");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn8 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SumTime");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn9 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_STL_GRD");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn10 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_RESULT");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn11 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("REG_ID");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn12 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("JUDGE_SEQ");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn13 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SIMN");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn14 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("CM");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn15 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SAMPLE_DATE1");
- Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueList valueList1 = new Infragistics.Win.ValueList(7905313);
- Infragistics.Win.ValueListItem valueListItem16 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem17 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem18 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem19 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem20 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem21 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem22 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem23 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem24 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem25 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem26 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem27 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("set");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("excel");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("SRow");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Close");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("set");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("excel");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("SRow");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("Close");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("FlushCeq");
- this.ultraGroupBox1 = new Infragistics.Win.Misc.UltraGroupBox();
- this.button1 = new System.Windows.Forms.Button();
- this.ultraMaskedEdit1 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
- this.comboBox2 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.cboGW = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.cmb_BZ = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.chkGasSample = new System.Windows.Forms.CheckBox();
- this.txtSteel = new System.Windows.Forms.TextBox();
- this.ultraMaskedEdit2 = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
- this.uldtEndTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
- this.uldtBeginTime = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
- this.label11 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.chkRefresh = new System.Windows.Forms.CheckBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label7 = new System.Windows.Forms.Label();
- this.button3 = new System.Windows.Forms.Button();
- this.btn_Down = new System.Windows.Forms.Button();
- this.btn_Up = new System.Windows.Forms.Button();
- this.txtPage = new System.Windows.Forms.TextBox();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.panel1 = new System.Windows.Forms.Panel();
- this.EMGrid = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.dataSet1 = new System.Data.DataSet();
- this.dataTable1 = new System.Data.DataTable();
- this.dataColumn7 = new System.Data.DataColumn();
- this.dataColumn8 = new System.Data.DataColumn();
- this.dataColumn9 = new System.Data.DataColumn();
- this.dataColumn84 = new System.Data.DataColumn();
- this.dataColumn85 = new System.Data.DataColumn();
- this.dataColumn1 = new System.Data.DataColumn();
- this.dataColumn2 = new System.Data.DataColumn();
- this.dataColumn3 = new System.Data.DataColumn();
- this.dataColumn4 = new System.Data.DataColumn();
- this.dataColumn5 = new System.Data.DataColumn();
- this.dataColumn6 = new System.Data.DataColumn();
- this.dataColumn10 = new System.Data.DataColumn();
- this.dataColumn11 = new System.Data.DataColumn();
- this.dataColumn12 = new System.Data.DataColumn();
- this.dataColumn13 = new System.Data.DataColumn();
- this.ultraPictureBox1 = new Infragistics.Win.UltraWinEditors.UltraPictureBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
- this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).BeginInit();
- this.ultraGroupBox1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboGW)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmb_BZ)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).BeginInit();
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.EMGrid)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
- this.SuspendLayout();
- //
- // ultraGroupBox1
- //
- this.ultraGroupBox1.Controls.Add(this.button1);
- this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit1);
- this.ultraGroupBox1.Controls.Add(this.comboBox2);
- this.ultraGroupBox1.Controls.Add(this.cboGW);
- this.ultraGroupBox1.Controls.Add(this.cmb_BZ);
- this.ultraGroupBox1.Controls.Add(this.chkGasSample);
- this.ultraGroupBox1.Controls.Add(this.txtSteel);
- this.ultraGroupBox1.Controls.Add(this.ultraMaskedEdit2);
- this.ultraGroupBox1.Controls.Add(this.uldtEndTime);
- this.ultraGroupBox1.Controls.Add(this.uldtBeginTime);
- this.ultraGroupBox1.Controls.Add(this.label11);
- this.ultraGroupBox1.Controls.Add(this.label10);
- this.ultraGroupBox1.Controls.Add(this.label9);
- this.ultraGroupBox1.Controls.Add(this.chkRefresh);
- this.ultraGroupBox1.Controls.Add(this.label8);
- this.ultraGroupBox1.Controls.Add(this.label7);
- this.ultraGroupBox1.Controls.Add(this.button3);
- this.ultraGroupBox1.Controls.Add(this.btn_Down);
- this.ultraGroupBox1.Controls.Add(this.btn_Up);
- this.ultraGroupBox1.Controls.Add(this.txtPage);
- this.ultraGroupBox1.Controls.Add(this.label6);
- this.ultraGroupBox1.Controls.Add(this.label5);
- this.ultraGroupBox1.Controls.Add(this.label4);
- this.ultraGroupBox1.Controls.Add(this.label1);
- this.ultraGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
- this.ultraGroupBox1.Location = new System.Drawing.Point(0, 28);
- this.ultraGroupBox1.Name = "ultraGroupBox1";
- this.ultraGroupBox1.Size = new System.Drawing.Size(1008, 71);
- this.ultraGroupBox1.TabIndex = 3;
- //
- // button1
- //
- this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
- this.button1.Location = new System.Drawing.Point(594, 9);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(70, 50);
- this.button1.TabIndex = 288;
- this.button1.Text = "生成复合元素";
- this.button1.UseVisualStyleBackColor = false;
- this.button1.Click += new System.EventHandler(this.button1_Click_1);
- //
- // ultraMaskedEdit1
- //
- this.ultraMaskedEdit1.BorderStyle = Infragistics.Win.UIElementBorderStyle.Inset;
- editorButton1.Key = "edit";
- editorButton1.Text = "";
- editorButton2.Key = "clear";
- this.ultraMaskedEdit1.ButtonsRight.Add(editorButton1);
- this.ultraMaskedEdit1.ButtonsRight.Add(editorButton2);
- this.ultraMaskedEdit1.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
- this.ultraMaskedEdit1.Location = new System.Drawing.Point(84, 40);
- this.ultraMaskedEdit1.Name = "ultraMaskedEdit1";
- this.ultraMaskedEdit1.PromptChar = ' ';
- this.ultraMaskedEdit1.Size = new System.Drawing.Size(97, 21);
- this.ultraMaskedEdit1.TabIndex = 287;
- this.ultraMaskedEdit1.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- this.ultraMaskedEdit1.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.EditorButtonClick);
- //
- // comboBox2
- //
- appearance1.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance1.BorderColor = System.Drawing.Color.Black;
- this.comboBox2.Appearance = appearance1;
- this.comboBox2.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.comboBox2.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.comboBox2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- valueListItem1.DataValue = "0";
- valueListItem1.DisplayText = "铁水";
- valueListItem2.DataValue = "1";
- valueListItem2.DisplayText = "转炉";
- valueListItem3.DataValue = "2";
- valueListItem3.DisplayText = "吹氩站";
- valueListItem4.DataValue = "3";
- valueListItem4.DisplayText = "精炼炉";
- valueListItem30.DataValue = "4";
- valueListItem30.DisplayText = "RH炉";
- valueListItem31.DataValue = "5";
- valueListItem31.DisplayText = "VD炉";
- valueListItem5.DataValue = "6";
- valueListItem5.DisplayText = "连铸";
- this.comboBox2.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem1,
- valueListItem2,
- valueListItem3,
- valueListItem4,
- valueListItem30,
- valueListItem31,
- valueListItem5});
- this.comboBox2.Location = new System.Drawing.Point(470, 9);
- this.comboBox2.Name = "comboBox2";
- this.comboBox2.Size = new System.Drawing.Size(118, 19);
- this.comboBox2.TabIndex = 286;
- this.comboBox2.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- //
- // cboGW
- //
- appearance2.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance2.BorderColor = System.Drawing.Color.Black;
- this.cboGW.Appearance = appearance2;
- this.cboGW.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.cboGW.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.cboGW.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- valueListItem6.DataValue = "0";
- valueListItem6.DisplayText = "铁水";
- valueListItem7.DataValue = "1";
- valueListItem7.DisplayText = "转炉";
- valueListItem8.DataValue = "2";
- valueListItem8.DisplayText = "吹氩站";
- valueListItem9.DataValue = "3";
- valueListItem9.DisplayText = "精炼炉";
- valueListItem28.DataValue = "4";
- valueListItem28.DisplayText = "RH炉";
- valueListItem29.DataValue = "5";
- valueListItem29.DisplayText = "VD炉";
- valueListItem10.DataValue = "6";
- valueListItem10.DisplayText = "连铸";
- this.cboGW.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem6,
- valueListItem7,
- valueListItem8,
- valueListItem9,
- valueListItem28,
- valueListItem29,
- valueListItem10});
- this.cboGW.Location = new System.Drawing.Point(405, 10);
- this.cboGW.Name = "cboGW";
- this.cboGW.Size = new System.Drawing.Size(56, 19);
- this.cboGW.TabIndex = 285;
- this.cboGW.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- this.cboGW.SelectionChanged += new System.EventHandler(this.cboGW_SelectionChanged);
- //
- // cmb_BZ
- //
- appearance3.BorderAlpha = Infragistics.Win.Alpha.UseAlphaLevel;
- appearance3.BorderColor = System.Drawing.Color.Black;
- this.cmb_BZ.Appearance = appearance3;
- this.cmb_BZ.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.cmb_BZ.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.cmb_BZ.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- valueListItem11.DataValue = "0";
- valueListItem11.DisplayText = "全部";
- valueListItem12.DataValue = "1";
- valueListItem12.DisplayText = "甲班";
- valueListItem13.DataValue = "2";
- valueListItem13.DisplayText = "乙班";
- valueListItem14.DataValue = "3";
- valueListItem14.DisplayText = "丙班";
- valueListItem15.DataValue = "4";
- valueListItem15.DisplayText = "丁班";
- this.cmb_BZ.Items.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem11,
- valueListItem12,
- valueListItem13,
- valueListItem14,
- valueListItem15});
- this.cmb_BZ.Location = new System.Drawing.Point(405, 41);
- this.cmb_BZ.Name = "cmb_BZ";
- this.cmb_BZ.Size = new System.Drawing.Size(56, 19);
- this.cmb_BZ.TabIndex = 284;
- this.cmb_BZ.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- //
- // chkGasSample
- //
- this.chkGasSample.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.chkGasSample.Location = new System.Drawing.Point(670, 38);
- this.chkGasSample.Name = "chkGasSample";
- this.chkGasSample.Size = new System.Drawing.Size(82, 24);
- this.chkGasSample.TabIndex = 85;
- this.chkGasSample.Text = "气体样";
- //
- // txtSteel
- //
- this.txtSteel.Location = new System.Drawing.Point(501, 40);
- this.txtSteel.Name = "txtSteel";
- this.txtSteel.Size = new System.Drawing.Size(87, 21);
- this.txtSteel.TabIndex = 84;
- //
- // ultraMaskedEdit2
- //
- this.ultraMaskedEdit2.BorderStyle = Infragistics.Win.UIElementBorderStyle.Inset;
- editorButton3.Key = "edit";
- editorButton3.Text = "";
- editorButton4.Key = "clear";
- this.ultraMaskedEdit2.ButtonsRight.Add(editorButton3);
- this.ultraMaskedEdit2.ButtonsRight.Add(editorButton4);
- this.ultraMaskedEdit2.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.String;
- this.ultraMaskedEdit2.Location = new System.Drawing.Point(214, 40);
- this.ultraMaskedEdit2.Name = "ultraMaskedEdit2";
- this.ultraMaskedEdit2.PromptChar = ' ';
- this.ultraMaskedEdit2.Size = new System.Drawing.Size(111, 21);
- this.ultraMaskedEdit2.TabIndex = 83;
- this.ultraMaskedEdit2.UseFlatMode = Infragistics.Win.DefaultableBoolean.True;
- this.ultraMaskedEdit2.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.EditorButtonClick);
- //
- // uldtEndTime
- //
- this.uldtEndTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
- this.uldtEndTime.FormatString = "yyyy-MM-dd HH:mm";
- this.uldtEndTime.Location = new System.Drawing.Point(214, 9);
- this.uldtEndTime.MaskInput = "yyyy-mm-dd hh:mm";
- this.uldtEndTime.Name = "uldtEndTime";
- this.uldtEndTime.Size = new System.Drawing.Size(111, 21);
- this.uldtEndTime.TabIndex = 80;
- //
- // uldtBeginTime
- //
- this.uldtBeginTime.FormatProvider = new System.Globalization.CultureInfo("en-US");
- this.uldtBeginTime.FormatString = "yyyy-MM-dd HH:mm";
- this.uldtBeginTime.Location = new System.Drawing.Point(84, 9);
- this.uldtBeginTime.MaskInput = "yyyy-mm-dd hh:mm";
- this.uldtBeginTime.Name = "uldtBeginTime";
- this.uldtBeginTime.Size = new System.Drawing.Size(97, 21);
- this.uldtBeginTime.TabIndex = 79;
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label11.Location = new System.Drawing.Point(189, 43);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(21, 14);
- this.label11.TabIndex = 78;
- this.label11.Text = "到";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label10.Location = new System.Drawing.Point(189, 12);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(21, 14);
- this.label10.TabIndex = 77;
- this.label10.Text = "到";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label9.Location = new System.Drawing.Point(466, 43);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(35, 14);
- this.label9.TabIndex = 72;
- this.label9.Text = "牌号";
- //
- // chkRefresh
- //
- this.chkRefresh.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.chkRefresh.Location = new System.Drawing.Point(670, 7);
- this.chkRefresh.Name = "chkRefresh";
- this.chkRefresh.Size = new System.Drawing.Size(82, 24);
- this.chkRefresh.TabIndex = 71;
- this.chkRefresh.Text = "自动刷新";
- this.chkRefresh.CheckedChanged += new System.EventHandler(this.chkRefresh_CheckedChanged);
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label8.Location = new System.Drawing.Point(335, 43);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(70, 14);
- this.label8.TabIndex = 70;
- this.label8.Text = "选择班组:";
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label7.Location = new System.Drawing.Point(335, 12);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(70, 14);
- this.label7.TabIndex = 68;
- this.label7.Text = "工序位置:";
- //
- // button3
- //
- this.button3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button3.Location = new System.Drawing.Point(914, 39);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(72, 23);
- this.button3.TabIndex = 58;
- this.button3.Text = "全部显示";
- this.button3.UseVisualStyleBackColor = false;
- this.button3.Click += new System.EventHandler(this.button3_Click);
- //
- // btn_Down
- //
- this.btn_Down.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_Down.Location = new System.Drawing.Point(866, 39);
- this.btn_Down.Name = "btn_Down";
- this.btn_Down.Size = new System.Drawing.Size(40, 23);
- this.btn_Down.TabIndex = 57;
- this.btn_Down.Text = ">>";
- this.btn_Down.Click += new System.EventHandler(this.btn_Down_Click);
- //
- // btn_Up
- //
- this.btn_Up.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btn_Up.Location = new System.Drawing.Point(762, 39);
- this.btn_Up.Name = "btn_Up";
- this.btn_Up.Size = new System.Drawing.Size(40, 23);
- this.btn_Up.TabIndex = 56;
- this.btn_Up.Text = "<<";
- this.btn_Up.Click += new System.EventHandler(this.btn_Up_Click);
- //
- // txtPage
- //
- this.txtPage.Location = new System.Drawing.Point(802, 40);
- this.txtPage.Name = "txtPage";
- this.txtPage.Size = new System.Drawing.Size(64, 21);
- this.txtPage.TabIndex = 55;
- this.txtPage.Text = "40";
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.ForeColor = System.Drawing.Color.Red;
- this.label6.Location = new System.Drawing.Point(856, 13);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(0, 12);
- this.label6.TabIndex = 54;
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label5.Location = new System.Drawing.Point(760, 12);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(98, 14);
- this.label5.TabIndex = 52;
- this.label5.Text = "当前数据显示:";
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label4.Location = new System.Drawing.Point(21, 43);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(63, 14);
- this.label4.TabIndex = 48;
- this.label4.Text = "熔炼号从";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label1.Location = new System.Drawing.Point(7, 12);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(77, 14);
- this.label1.TabIndex = 15;
- this.label1.Text = "化验时间从";
- //
- // panel1
- //
- this.panel1.Controls.Add(this.EMGrid);
- this.panel1.Controls.Add(this.ultraPictureBox1);
- this.panel1.Controls.Add(this.label3);
- this.panel1.Controls.Add(this.label2);
- this.panel1.Controls.Add(this.ultraGroupBox1);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel1.Location = new System.Drawing.Point(0, 0);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(1008, 653);
- this.panel1.TabIndex = 12;
- //
- // EMGrid
- //
- this.EMGrid.DataMember = "Table1";
- this.EMGrid.DataSource = this.dataSet1;
- ultraGridColumn1.Header.VisiblePosition = 0;
- ultraGridColumn1.Hidden = true;
- ultraGridColumn1.Width = 54;
- ultraGridColumn2.Header.Caption = "炉号";
- ultraGridColumn2.Header.VisiblePosition = 1;
- ultraGridColumn2.RowLayoutColumnInfo.OriginX = 0;
- ultraGridColumn2.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn2.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn2.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn2.Width = 179;
- ultraGridColumn3.Header.VisiblePosition = 6;
- ultraGridColumn3.RowLayoutColumnInfo.OriginX = 4;
- ultraGridColumn3.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn3.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn3.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn3.Width = 116;
- ultraGridColumn4.Header.VisiblePosition = 7;
- ultraGridColumn4.RowLayoutColumnInfo.OriginX = 5;
- ultraGridColumn4.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn4.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn4.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn4.Width = 160;
- ultraGridColumn5.Header.VisiblePosition = 4;
- ultraGridColumn5.Hidden = true;
- ultraGridColumn6.Header.VisiblePosition = 5;
- ultraGridColumn6.RowLayoutColumnInfo.OriginX = 3;
- ultraGridColumn6.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn6.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn6.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn6.Width = 53;
- ultraGridColumn7.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn7.Header.VisiblePosition = 2;
- ultraGridColumn7.RowLayoutColumnInfo.OriginX = 1;
- ultraGridColumn7.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn7.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn7.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn7.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDown;
- ultraGridColumn7.Width = 66;
- ultraGridColumn8.Header.VisiblePosition = 3;
- ultraGridColumn8.RowLayoutColumnInfo.OriginX = 2;
- ultraGridColumn8.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn8.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn8.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn8.Width = 40;
- ultraGridColumn9.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn9.Header.VisiblePosition = 8;
- ultraGridColumn9.RowLayoutColumnInfo.OriginX = 8;
- ultraGridColumn9.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn9.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn9.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn10.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn10.Header.VisiblePosition = 9;
- ultraGridColumn10.RowLayoutColumnInfo.OriginX = 9;
- ultraGridColumn10.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn10.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn10.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn11.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn11.Header.VisiblePosition = 10;
- ultraGridColumn11.RowLayoutColumnInfo.OriginX = 10;
- ultraGridColumn11.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn11.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn11.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn12.Header.VisiblePosition = 11;
- ultraGridColumn12.Hidden = true;
- ultraGridColumn13.Header.VisiblePosition = 12;
- ultraGridColumn13.RowLayoutColumnInfo.OriginX = 11;
- ultraGridColumn13.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn13.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(70, 0);
- ultraGridColumn13.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn13.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn14.Header.VisiblePosition = 13;
- ultraGridColumn14.RowLayoutColumnInfo.OriginX = 6;
- ultraGridColumn14.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn14.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(70, 0);
- ultraGridColumn14.RowLayoutColumnInfo.PreferredLabelSize = new System.Drawing.Size(30, 0);
- ultraGridColumn14.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn14.RowLayoutColumnInfo.SpanY = 1;
- ultraGridColumn15.Header.VisiblePosition = 14;
- ultraGridColumn15.RowLayoutColumnInfo.OriginX = 7;
- ultraGridColumn15.RowLayoutColumnInfo.OriginY = 0;
- ultraGridColumn15.RowLayoutColumnInfo.PreferredCellSize = new System.Drawing.Size(160, 0);
- ultraGridColumn15.RowLayoutColumnInfo.SpanX = 1;
- ultraGridColumn15.RowLayoutColumnInfo.SpanY = 1;
- ultraGridBand1.Columns.AddRange(new object[] {
- ultraGridColumn1,
- ultraGridColumn2,
- ultraGridColumn3,
- ultraGridColumn4,
- ultraGridColumn5,
- ultraGridColumn6,
- ultraGridColumn7,
- ultraGridColumn8,
- ultraGridColumn9,
- ultraGridColumn10,
- ultraGridColumn11,
- ultraGridColumn12,
- ultraGridColumn13,
- ultraGridColumn14,
- ultraGridColumn15});
- ultraGridBand1.RowLayoutStyle = Infragistics.Win.UltraWinGrid.RowLayoutStyle.ColumnLayout;
- this.EMGrid.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
- this.EMGrid.DisplayLayout.GroupByBox.Hidden = true;
- appearance6.FontData.BoldAsString = "True";
- appearance6.FontData.SizeInPoints = 10F;
- this.EMGrid.DisplayLayout.Override.CellAppearance = appearance6;
- appearance7.FontData.BoldAsString = "True";
- this.EMGrid.DisplayLayout.Override.HeaderAppearance = appearance7;
- this.EMGrid.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
- this.EMGrid.DisplayLayout.Override.WrapHeaderText = Infragistics.Win.DefaultableBoolean.True;
- valueListItem16.DataValue = "11";
- valueListItem16.DisplayText = "白-甲";
- valueListItem17.DataValue = "12";
- valueListItem17.DisplayText = "白-乙";
- valueListItem18.DataValue = "13";
- valueListItem18.DisplayText = "白-丙";
- valueListItem19.DataValue = "14";
- valueListItem19.DisplayText = "白-丁";
- valueListItem20.DataValue = "21";
- valueListItem20.DisplayText = "中-甲";
- valueListItem21.DataValue = "22";
- valueListItem21.DisplayText = "中-乙";
- valueListItem22.DataValue = "23";
- valueListItem22.DisplayText = "中-丙";
- valueListItem23.DataValue = "24";
- valueListItem23.DisplayText = "中-丁";
- valueListItem24.DataValue = "31";
- valueListItem24.DisplayText = "夜-甲";
- valueListItem25.DataValue = "32";
- valueListItem25.DisplayText = "夜-乙";
- valueListItem26.DataValue = "33";
- valueListItem26.DisplayText = "夜-丙";
- valueListItem27.DataValue = "34";
- valueListItem27.DisplayText = "夜-丁";
- valueList1.ValueListItems.AddRange(new Infragistics.Win.ValueListItem[] {
- valueListItem16,
- valueListItem17,
- valueListItem18,
- valueListItem19,
- valueListItem20,
- valueListItem21,
- valueListItem22,
- valueListItem23,
- valueListItem24,
- valueListItem25,
- valueListItem26,
- valueListItem27});
- this.EMGrid.DisplayLayout.ValueLists.AddRange(new Infragistics.Win.ValueList[] {
- valueList1});
- this.EMGrid.Dock = System.Windows.Forms.DockStyle.Fill;
- this.EMGrid.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.EMGrid.Location = new System.Drawing.Point(0, 99);
- this.EMGrid.Name = "EMGrid";
- this.EMGrid.Size = new System.Drawing.Size(1008, 554);
- this.EMGrid.TabIndex = 6;
- this.EMGrid.DoubleClickRow += new Infragistics.Win.UltraWinGrid.DoubleClickRowEventHandler(this.EMGrid_DoubleClickRow);
- this.EMGrid.Click += new System.EventHandler(this.EMGrid_Click);
- //
- // dataSet1
- //
- this.dataSet1.DataSetName = "NewDataSet";
- this.dataSet1.Locale = new System.Globalization.CultureInfo("zh-CN");
- this.dataSet1.Tables.AddRange(new System.Data.DataTable[] {
- this.dataTable1});
- //
- // dataTable1
- //
- this.dataTable1.Columns.AddRange(new System.Data.DataColumn[] {
- this.dataColumn7,
- this.dataColumn8,
- this.dataColumn9,
- this.dataColumn84,
- this.dataColumn85,
- this.dataColumn1,
- this.dataColumn2,
- this.dataColumn3,
- this.dataColumn4,
- this.dataColumn5,
- this.dataColumn6,
- this.dataColumn10,
- this.dataColumn11,
- this.dataColumn12,
- this.dataColumn13});
- this.dataTable1.TableName = "Table1";
- //
- // dataColumn7
- //
- this.dataColumn7.ColumnName = "序号";
- //
- // dataColumn8
- //
- this.dataColumn8.ColumnName = "熔炼号";
- //
- // dataColumn9
- //
- this.dataColumn9.ColumnName = "计划牌号";
- //
- // dataColumn84
- //
- this.dataColumn84.ColumnName = "化验时间";
- //
- // dataColumn85
- //
- this.dataColumn85.Caption = "牌号编码";
- this.dataColumn85.ColumnName = "JHGZ";
- //
- // dataColumn1
- //
- this.dataColumn1.Caption = "班别";
- this.dataColumn1.ColumnName = "shiftcode";
- //
- // dataColumn2
- //
- this.dataColumn2.Caption = "工序";
- this.dataColumn2.ColumnName = "Station";
- //
- // dataColumn3
- //
- this.dataColumn3.Caption = "次数";
- this.dataColumn3.ColumnName = "SumTime";
- //
- // dataColumn4
- //
- this.dataColumn4.Caption = "判定牌号";
- this.dataColumn4.ColumnName = "JUDGE_STL_GRD";
- //
- // dataColumn5
- //
- this.dataColumn5.Caption = "判定结果";
- this.dataColumn5.ColumnName = "JUDGE_RESULT";
- //
- // dataColumn6
- //
- this.dataColumn6.Caption = "判定人";
- this.dataColumn6.ColumnName = "REG_ID";
- //
- // dataColumn10
- //
- this.dataColumn10.Caption = "次数";
- this.dataColumn10.ColumnName = "JUDGE_SEQ";
- //
- // dataColumn11
- //
- this.dataColumn11.Caption = "MN/S";
- this.dataColumn11.ColumnName = "SIMN";
- //
- // dataColumn12
- //
- this.dataColumn12.Caption = "时间差(分钟)";
- this.dataColumn12.ColumnName = "CM";
- //
- // dataColumn13
- //
- this.dataColumn13.Caption = "送样时间";
- this.dataColumn13.ColumnName = "SAMPLE_DATE1";
- //
- // ultraPictureBox1
- //
- this.ultraPictureBox1.BorderShadowColor = System.Drawing.Color.Empty;
- this.ultraPictureBox1.Location = new System.Drawing.Point(339, 286);
- this.ultraPictureBox1.Name = "ultraPictureBox1";
- this.ultraPictureBox1.Size = new System.Drawing.Size(100, 50);
- this.ultraPictureBox1.TabIndex = 16;
- //
- // label3
- //
- this.label3.BackColor = System.Drawing.Color.Blue;
- this.label3.ForeColor = System.Drawing.SystemColors.ControlText;
- this.label3.Location = new System.Drawing.Point(564, 271);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(100, 23);
- this.label3.TabIndex = 11;
- this.label3.Text = "label3";
- this.label3.Visible = false;
- //
- // label2
- //
- this.label2.BackColor = System.Drawing.Color.Red;
- this.label2.Location = new System.Drawing.Point(458, 230);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(100, 23);
- this.label2.TabIndex = 6;
- this.label2.Text = "label2";
- this.label2.Visible = false;
- //
- // _panel1_Toolbars_Dock_Area_Left
- //
- this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
- this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
- this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 28);
- this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
- this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 625);
- this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // ultraToolbarsManager1
- //
- this.ultraToolbarsManager1.DesignerFlags = 1;
- this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
- this.ultraToolbarsManager1.LockToolbars = true;
- this.ultraToolbarsManager1.ShowFullMenusDelay = 500;
- this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
- this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
- ultraToolbar1.DockedColumn = 0;
- ultraToolbar1.DockedRow = 0;
- buttonTool1.InstanceProps.IsFirstInGroup = true;
- buttonTool2.InstanceProps.IsFirstInGroup = true;
- buttonTool4.InstanceProps.IsFirstInGroup = true;
- buttonTool5.InstanceProps.IsFirstInGroup = true;
- ultraToolbar1.NonInheritedTools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool1,
- buttonTool2,
- buttonTool3,
- buttonTool4,
- buttonTool5});
- ultraToolbar1.Text = "UltraToolbar1";
- this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
- ultraToolbar1});
- buttonTool6.SharedPropsInternal.Caption = "查询(&Q)";
- buttonTool6.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool7.SharedPropsInternal.Caption = "设置样点(&S)";
- buttonTool7.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool8.SharedPropsInternal.Caption = "导出(&P)";
- buttonTool8.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool9.SharedPropsInternal.Caption = "设置列(&R)";
- buttonTool9.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool10.SharedPropsInternal.Caption = "关闭(&C)";
- buttonTool10.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool12.SharedPropsInternal.Caption = "刷新复合元素";
- buttonTool12.SharedPropsInternal.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool6,
- buttonTool7,
- buttonTool8,
- buttonTool9,
- buttonTool10,
- buttonTool12});
- this.ultraToolbarsManager1.Visible = false;
- this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
- //
- // _panel1_Toolbars_Dock_Area_Right
- //
- this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
- this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
- this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1008, 28);
- this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
- this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 625);
- this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // _panel1_Toolbars_Dock_Area_Top
- //
- this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
- this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
- this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
- this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
- this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1008, 28);
- this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // _panel1_Toolbars_Dock_Area_Bottom
- //
- this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(229)))), ((int)(((byte)(215)))));
- this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
- this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 653);
- this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
- this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1008, 0);
- this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // frmLgElements
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.ClientSize = new System.Drawing.Size(1008, 653);
- this.Controls.Add(this.panel1);
- this.Name = "frmLgElements";
- this.Text = "化学成分查询";
- this.Load += new System.EventHandler(this.ELEMENTS_Load);
- ((System.ComponentModel.ISupportInitialize)(this.ultraGroupBox1)).EndInit();
- this.ultraGroupBox1.ResumeLayout(false);
- this.ultraGroupBox1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.comboBox2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cboGW)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.cmb_BZ)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtEndTime)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.uldtBeginTime)).EndInit();
- this.panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.EMGrid)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- #endregion
- public int sValue(string Svalue, string SCHvalue)
- {
- if (SCHvalue.Length < 1)
- {
- return 0;
- }
- if (Svalue.Length > 0)
- {
- string BValue = "-1";
- string EValue = "-1";
- if (Svalue.IndexOf("~") > 0)
- {
- BValue = Svalue.Substring(0, Svalue.IndexOf("~"));
- EValue = Svalue.Substring(Svalue.IndexOf("~") + 1, Svalue.Length - Svalue.IndexOf("~") - 1);
- if (double.Parse(SCHvalue) >= double.Parse(BValue) && double.Parse(SCHvalue) <= double.Parse(EValue))
- {
- return 0; //正确
- }
- else
- {
- return -1;
- }
- }
- else
- {
- if (Svalue.IndexOf("<=") > -1)
- {
- EValue = Svalue.Substring(Svalue.IndexOf("<=") + 2, Svalue.Length - Svalue.IndexOf("<=") - 2);
- if (double.Parse(SCHvalue) <= double.Parse(EValue))
- {
- return 0; //正确
- }
- else
- {
- return -1;
- }
- }
- else
- {
- if (Svalue.IndexOf("<") > -1 && Svalue.IndexOf("=") == -1)
- {
- EValue = Svalue.Substring(Svalue.IndexOf("<") + 1, Svalue.Length - Svalue.IndexOf("<") - 1);
- if (double.Parse(SCHvalue) < double.Parse(EValue))
- {
- return 0; //正确
- }
- else
- {
- return -1;
- }
- }
- else
- {
- if (Svalue.IndexOf(">=") > -1)
- {
- EValue = Svalue.Substring(Svalue.IndexOf(">=") + 1, Svalue.Length - Svalue.IndexOf(">=") - 1);
- if (double.Parse(SCHvalue) >= double.Parse(EValue))
- {
- return 0; //正确
- }
- else
- {
- return -1;
- }
- }
- else
- {
- if (Svalue.IndexOf(">") > -1 && Svalue.IndexOf("=") == -1)
- {
- EValue = Svalue.Substring(Svalue.IndexOf(">") + 1, Svalue.Length - Svalue.IndexOf(">") - 1);
- if (double.Parse(SCHvalue) > double.Parse(EValue))
- {
- return 0; //正确
- }
- else
- {
- return -1;
- }
- }
- else
- {
- EValue = Svalue;
- try
- {
- if (double.Parse(SCHvalue) == double.Parse(EValue))
- {
- return 0; //正确
- }
- }
- catch { }
- return -1;
- }
- }
- }
- }
- }
- }
- return 0;
- }
- public void GetTAM_StandardElement()/// 查询判定牌号成分
- {
- int intSelectedIndex = cboGW.SelectedIndex; //选择的岗位
- try
- {
- //
- string strForeSmeltingId = "", strSme = "";
- Color tmpC = c1;
- string szJHGZ = "", strErr = "", szWhere = "", szQJ = "", szJYH = "";
- object obj = null;
- DataSet ds = new DataSet();
- for (int j = 0; j < EMGrid.Rows.Count; j++)
- {
- for (int i = 0; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
- {
- EMGrid.Rows[j].Cells[i].Appearance.ForeColor = Color.Black;
- }
- if (j == 0)
- {
- EMGrid.Rows[j].Appearance.BackColor = tmpC;
- if (intSelectedIndex == 0)
- strForeSmeltingId = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, EMGrid.Rows[j].Cells[1].Value.ToString().IndexOf("-"));
- else
- {
- if (EMGrid.Rows[j].Cells[1].Value.ToString().Length >= 10)
- strForeSmeltingId = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, 10);
- }
- }
- else
- {
- if (intSelectedIndex == 0)
- strSme = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, EMGrid.Rows[j].Cells[1].Value.ToString().IndexOf("-"));
- else
- {
- if (EMGrid.Rows[j].Cells[1].Value.ToString().Length >= 10)
- strSme = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, 10);
- }
- if (strForeSmeltingId == strSme)
- {
- tmpC = SetRowBackColor(EMGrid.Rows[j], tmpC, true);
- }
- else
- {
- tmpC = SetRowBackColor(EMGrid.Rows[j], tmpC, false);
- strForeSmeltingId = strSme;
- }
- }
- if (intSelectedIndex == 0)
- continue;
- szJHGZ = EMGrid.Rows[j].Cells["JHGZ"].Value.ToString();
- szJYH = EMGrid.Rows[j].Cells[1].Value.ToString().Substring(0, 10);
- strErr = "";
- string[] ArrayId = new string[strERow.Length + 100]; // 后面加复合元素后,原有的会报错,加100
- szWhere = szJYH; //条件
- string szEleStd = "";
- string szCrfStd = "('L02001','L02005') ";
- int id = 0;
- for (int i = 6; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
- {
- if (EMGrid.Rows[j].Cells[i].Appearance.ForeColor == Color.Red || EMGrid.Rows[j].Cells[i].Appearance.ForeColor == Color.FromArgb(204, 153, 0))
- EMGrid.Rows[j].Cells[i].Appearance.ForeColor = Color.Black;
- }
- //铁样与转炉样不判定
- if (EMGrid.Rows[j].Cells["Station"].Value.ToString().Contains("转炉") == false)
- {
- //设置要获取的化学成分标准,此处i的值必须与(SetGridRowHidden)要显示的列数一样,否则将无法实现相同炉号显示不同颜色
- for (int i = 11; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
- {
- if (EMGrid.DisplayLayout.Bands[0].Columns[i].Hidden == false)
- {
- szEleStd = szEleStd + "','" + EMGrid.DisplayLayout.Bands[0].Columns[i].Header.Caption;
- ArrayId[id] = EMGrid.DisplayLayout.Bands[0].Columns[i].Header.Caption;
- id++;
- }
- }
- if (!string.IsNullOrEmpty(szEleStd))
- {
- szEleStd = "('" + szEleStd.Substring(3, szEleStd.Length - 3) + "')";
- ArrayList arry = new ArrayList();
- arry.Add("ChemStandardInfo.select");
- arry.Add(EMGrid.Rows[j].Cells["熔炼号"].Value.ToString());
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- }
- else
- continue;
- if (strErr != "")
- {
- continue;
- }
- else if (ds.Tables[0].Rows.Count > 0)
- {
- //ArrayList ar = ds as ArrayList;
- //DataSet dsStandard = (ar[0] as DataSet);
- if (ds.Tables[0].Rows.Count == 0)
- {
- for (int i = 3; i < 18; i++)
- {
- if (EMGrid.Rows[j].Cells[i].Appearance.ForeColor == Color.Red)
- EMGrid.Rows[j].Cells[i].Appearance.ForeColor = Color.Black;
- }
- continue;
- }
- foreach (DataRow Drow in ds.Tables[0].Rows)
- {
- for (int i = 0; i < ArrayId.Length; i++)
- {
- if (dataSet1.Tables[0].Columns.Contains(Drow["ITEMCODE"].ToString()))
- {
- if (EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Value.ToString().Length > 0)
- {
- if (Drow["ITEMCODE"].ToString() == ArrayId[i])
- {
- int reP = 0;
- try
- {
- if (reP == 0)
- {
- if (Drow["STDMIN"].ToString() != "" && Drow["STDMAX"].ToString() != "")
- szQJ = Drow["STDMIN"].ToString() + "~" + Drow["STDMAX"].ToString();
- else if (Drow["STDMIN"].ToString() != "" && Drow["STDMAX"].ToString() == "")
- szQJ = "> " + Drow["STDMIN"].ToString();
- else if (Drow["STDMIN"].ToString() == "" && Drow["STDMAX"].ToString() != "")
- szQJ = "<= " + Drow["STDMAX"].ToString();
- reP = sValue(szQJ, EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Value.ToString());
- }
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- if (reP == -1 && Drow["STDSTYLE"].ToString() == "1")
- {
- EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.FromArgb(204, 153, 0);// Color.Yellow;
- }
- else if (reP == -1 && Drow["STDSTYLE"].ToString() == "2" && EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor == Color.FromArgb(204, 153, 0))
- {
- EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.Violet;
- }
- else if (reP == -1 && Drow["STDSTYLE"].ToString() == "3" && EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor == Color.Violet)
- {
- EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.Red;
- }
- else if (EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor != Color.FromArgb(204, 153, 0))
- {
- EMGrid.Rows[j].Cells[Drow["ITEMCODE"].ToString()].Appearance.ForeColor = Color.Black;
- }
- break;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- catch(Exception ex)
- {
-
- }
- }
- public void GetId(int RowId, Infragistics.Win.UltraWinGrid.UltraGrid GRID)
- {
- int i = RowId;
- if (GRID.Rows[i].Cells[1].Value.ToString().Length > 0)
- {
- if (GRID.Rows[i].Cells[0].Value.ToString().IndexOf("√") < 0)
- {
- GRID.Rows[i].Cells[0].Value = GRID.Rows[i].Cells[0].Value + "√";
- }
- else
- {
- GRID.Rows[i].Cells[0].Value = GRID.Rows[i].Cells[0].Value.ToString().Substring(0, GRID.Rows[i].Cells[0].Value.ToString().IndexOf("√"));
- }
- }
- }
- private string ReturnSteelCodeByHeatNoFromUltraGrid(string heatNo)
- {
- string strSteelCode = "";
-
- foreach (UltraGridRow ugr in this.EMGrid.Rows)
- {
- if (ugr.Cells["熔炼号"].Value.ToString() == heatNo)
- {
- if (ugr.Cells["JUDGE_STL_GRD"].Value.ToString().Length > 0 && ugr.Cells["熔炼号"].Value.ToString() != ugr.Cells["JUDGE_STL_GRD"].Value.ToString())
- return ugr.Cells["JUDGE_STL_GRD"].Value.ToString();
- }
-
- }
- return strSteelCode;
- }
- private void EMGrid_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- GetId(e.Row.Index, EMGrid);
- if (EMGrid.Rows[e.Row.Index].Cells[0].Value.ToString().IndexOf("√") > 0)
- {
- frmLgEleDetail.StrT = "02";
- frmLgEleDetail.StrHic = EMGrid.Rows[e.Row.Index].Cells[1].Text.Trim().ToString();
- string szLH = EMGrid.Rows[e.Row.Index].Cells["熔炼号"].Value.ToString();
- string strJudjeCode = ReturnSteelCodeByHeatNoFromUltraGrid(szLH);
-
- //string[] szAr = szLH.Split('-');
- //szLH = szAr[0];// + szAr[1];
- if (szLH.Length < 8)
- return;
- // 如果判定牌号有变化,弹出框中显示判定牌号信息
- frmLgEleDetail.strSteelCode = EMGrid.Rows[e.Row.Index].Cells["计划牌号"].Text.Trim();
- frmLgEleDetail.strSteelCodeGrd = strJudjeCode;
- string szJYH = EMGrid.ActiveRow.Cells[1].Value.ToString();
- string szEleStd = "";
- //设置要获取的化学成分标准
- for (int i = 5; i < EMGrid.DisplayLayout.Bands[0].Columns.Count; i++)
- {
- if (EMGrid.DisplayLayout.Bands[0].Columns[i].Hidden == false)
- {
- szEleStd = szEleStd + "','" + EMGrid.DisplayLayout.Bands[0].Columns[i].Header.Caption;
- }
- }
- frmLgEleDetail.szEleStd = szEleStd;
- frmLgEleDetail Azhupi = new frmLgEleDetail(frmLgEleDetail.StrHic, frmLgEleDetail.strSteelCode, szJYH.Substring(9, 1), ob);
- Azhupi.ultrgridRow = EMGrid.ActiveRow;
- Azhupi.ShowDialog(this);
- }
- }
- private void EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- UltraMaskedEdit ume = (UltraMaskedEdit)sender;
- switch (e.Button.Key)
- {
- case "edit":
- frmNumberWriter frm = new frmNumberWriter();
- frm._strText = ume.Text.Trim();
- frm.Location = GetChildWindowLocation(frm.Size);
- frm.ShowDialog();
- ume.Text = frm._strText;
- break;
- case "clear":
- if (ume.Text.Trim().Length > 0)
- {
- ume.Tag = ume.Text.Trim();
- ume.Text = "";
- }
- else
- {
- if (ume.Tag != null)
- ume.Text = ume.Tag.ToString();
- }
- break;
- }
- }
- /// <summary>
- /// 获取子窗体弹出的位置坐标
- /// </summary>
- /// <param name="ChildWindowSize"></param>
- /// <returns></returns>
- private Point GetChildWindowLocation(Size ChildWindowSize)
- {
- int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
- int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
- if (width > 0)
- width = Cursor.Position.X - width;
- else
- width = Cursor.Position.X;
- if (height > 0)
- height = Cursor.Position.Y - height + 10;
- else
- height = Cursor.Position.Y + 10;
- return new Point(width, height);
- }
- #region " Main Code "
- //增加分页显示功能
- private DataSet _dsAll = new DataSet();
- private DataSet _dsSet;
- private int _intBegin = 0;
- private int _intEnd = 40;
- private string _strDuty = "0";
- private string _dvRowFilter = "";
- private string _strWhere1 = "";
- private string _strWhere2 = "";
- private string _szTableName = "";
- public string _devPos = "";
- private Color c1 = Color.PaleGreen;
- private Color c2 = Color.White;
- private void btn_Up_Click(object sender, System.EventArgs e)
- {
- int step = 40;
- try
- {
- step = Convert.ToInt32(this.txtPage.Text.Trim());
- if (step < 1)
- throw new Exception();
- }
- catch
- {
- MessageBox.Show("请输入正确的显示行数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- this.Cursor = Cursors.WaitCursor;
- dataTable1.Clear();
- if (_dsAll.Tables.Count <= 0)
- return;
- int count = _dsAll.Tables[0].DefaultView.Count;
- if (_intBegin < step)
- {
- _intEnd = _intBegin;
- _intBegin = 0;
- }
- else
- {
- _intEnd = _intBegin;
- _intBegin -= step;
- }
- if (_intBegin > 0) this.btn_Up.Enabled = true;
- else btn_Up.Enabled = false;
- if (_intEnd < count) this.btn_Down.Enabled = true;
- else btn_Down.Enabled = false;
- this.label6.Text = String.Format("第 {0} 行到第 {1} 行, 共 {2} 行", _intBegin + 1, _intEnd, count);
- SetEachRowData();
- //数据获取启动线程。执行完后关闭
- Thread t = new Thread(new ThreadStart(DoStandFetchReady));
- t.IsBackground = true;
- t.Start();
- }
- private void DoStandFetchReady()
- {
- GetTAM_StandardElement();
- try
- {
- this.Cursor = Cursors.Default;
- }
- catch { }
- //关闭正在取数据的对话框
- // Invoke(new UpdateUIDelegate(UpdateUI), new object[] { true });
- }
- private void btn_Down_Click(object sender, System.EventArgs e)
- {
- int step = 40;
- try
- {
- step = Convert.ToInt32(this.txtPage.Text.Trim());
- if (step < 1)
- throw new Exception();
- }
- catch
- {
- MessageBox.Show("请输入正确的显示行数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- this.Cursor = Cursors.WaitCursor;
- dataTable1.Clear();
- if (_dsAll.Tables.Count <= 0)
- return;
- int count = _dsAll.Tables[0].DefaultView.Count;
- this._intBegin = this._intEnd;
- this._intEnd += step;
- if (_intEnd > count) _intEnd = count;
- if (_intBegin > 0) this.btn_Up.Enabled = true;
- else btn_Up.Enabled = false;
- if (_intEnd < count) this.btn_Down.Enabled = true;
- else btn_Down.Enabled = false;
- this.label6.Text = String.Format("第 {0} 行到第 {1} 行, 共 {2} 行", _intBegin + 1, _intEnd, count);
- SetEachRowData();
- //数据获取启动线程。执行完后关闭
- Thread t = new Thread(new ThreadStart(DoStandFetchReady));
- t.IsBackground = true;
- t.Start();
- this.Cursor = Cursors.Default;
- }
- private void button3_Click(object sender, System.EventArgs e)
- {
- try
- {
- if (_dsAll == null || _dsAll.Tables.Count <= 0)
- return;
- int count = _dsAll.Tables[0].DefaultView.Count;
- if (this.button3.Text == "全部显示")
- {
- this._intBegin = 0;
- this.button3.Text = "分页显示";
- this.btn_Up.Enabled = false;
- this.btn_Down.Enabled = false;
- if (_intEnd == count)
- return;
- else
- this._intEnd = count;
- }
- else
- {
- int step = 40;
- try
- {
- step = Convert.ToInt32(this.txtPage.Text.Trim());
- if (step < 1)
- throw new Exception();
- }
- catch
- {
- MessageBox.Show("请输入正确的显示行数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- this._intBegin = 0;
- if (step < count)
- {
- this._intEnd = step;
- this.btn_Up.Enabled = false;
- this.btn_Down.Enabled = true;
- }
- else
- {
- this._intEnd = count;
- this.btn_Up.Enabled = false;
- this.btn_Down.Enabled = false;
- this.button3.Text = "全部显示";
- return;
- }
- this.button3.Text = "全部显示";
- }
- this.Cursor = Cursors.WaitCursor;
- if (count == 0)
- {
- this.label6.Text = "无数据";
- this.Cursor = Cursors.Default;
- return;
- }
- else
- this.label6.Text = String.Format("第 {0} 行到第 {1} 行, 共 {2} 行", _intBegin, _intEnd, count);
- button3.Enabled = false;
- SetEachRowData();
- button3.Enabled = true;
- //数据获取启动线程。执行完后关闭
- Thread t = new Thread(new ThreadStart(DoStandFetchReady));
- t.IsBackground = true;
- t.Start();
- }
- catch
- {
- button3.Enabled = true;
- }
- }
- #region " Init "
- // 获取所有复合成分元素列表,并大写
- ArrayList ceqChemList = null;
- private void ELEMENTS_Load(object sender, System.EventArgs e)
- {
-
- try
- {
- ceqChemList = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.GetAllCeqChemByUpperChar(new ClientParamWithSqlConditionAndOpenBase("", this.ob));
-
- }
- catch
- {
- }
- this.EMGrid.DisplayLayout.Bands[0].Columns[1].Width = 95;
- this.EMGrid.DisplayLayout.Bands[0].Columns[2].Width = 90;
- this.EMGrid.DisplayLayout.Bands[0].Columns[8].Width = 90;
- this.EMGrid.DisplayLayout.Bands[0].Columns[9].Width = 65;
- this.EMGrid.DisplayLayout.Bands[0].Columns[10].Width = 65;
- label6.Visible = false;
- EMGrid.Font = new System.Drawing.Font("Tahoma", 9F);
- string strErr = "";
- //获取所有化学成份列名
- ArrayList arry = new ArrayList();
- arry.Add("FrmLgElements.select");//此ID为XML文件ID
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet dsElements = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- if (strErr == "" && dsElements != null)
- {
- foreach (DataRow dr in dsElements.Tables[0].Rows)
- {
- dataTable1.Columns.Add(dr["BaseName"].ToString(), typeof(System.Decimal)); //添加列
- }
- }
-
- string strElementsRow = ElementsConfig.GetElementsRow(); //调用函数获取要显示的列名
- strERow = strElementsRow.Split('*');
- _strDuty = Core.LgMes.Client.LgJobMgt.CStaticMethod.GetCurrentClass(this.ob).Substring(1, 1);
- GetCurrDuty();
- uldtBeginTime.Value = DateTime.Today.ToString("yyyy-MM-dd") + " 00:00";
- uldtEndTime.Value = DateTime.Today.ToString("yyyy-MM-dd") + " 23:59";
- if (_devPos == "0")
- {
- this.cboGW.SelectedIndex = 1;
- }
- else
- {
- int intIndex = 1;
- switch (_devPos.Substring(0, 3))
- {
- case "HMP":
- intIndex = 0;
- break;
- case "BOF":
- intIndex = 1;
- break;
- case "CAS":
- intIndex = 2;
- break;
- case "LFS":
- intIndex = 3;
- break;
- case "RHS":
- intIndex = 4;
- break;
- case "VDS":
- intIndex = 5;
- break;
- case "CCM":
- intIndex = 6;
- break;
- default:
- break;
- }
- cboGW.SelectedIndex = intIndex;
- }
- this.SetDuty();
- GetDataFromAll();
- StartGetDataThread();
- }
- public delegate void UpdateUIDelegate(bool IsDataLoaded);
- public void GetQualityInfo(string szLH)
- {
- try
- {
- this.ultraMaskedEdit1.Text = szLH;
- _strWhere1 = String.Format(" where lh like '%{0}%' ", this.ultraMaskedEdit1.Text.Trim());
- object obj = null;
- _dsAll = obj as DataSet;
- _dsAll.Tables[0].DefaultView.RowFilter = _dvRowFilter;
- SetDataToGrid();
- }
- catch (Exception ex)
- {
- string Msg = ex.Message;
- }
- }
- /// <summary>
- /// 将数据装载到DATASET
- /// </summary>
- private void SetEachRowData()
- {
- int XH = 0;
- try
- {
- ArrayList deleteCol = new ArrayList();
- foreach (DataColumn dc in dataTable1.Columns)
- {
- if (!_dsAll.Tables[0].Columns.Contains(dc.ColumnName.ToUpper()) && ceqChemList.Contains(dc.ColumnName.ToUpper()))
- {
-
- deleteCol.Add(dc.ColumnName.ToUpper());
- }
- }
- // 没有的元素需要删除
- foreach (string s in deleteCol)
- {
- dataTable1.Columns.Remove(s);
- }
- DataRow newRow = dataTable1.NewRow();
- DataRow Drow = null;
- dataTable1.Clear();
-
- int RowId = this._intBegin + 1;
- for (int i = this._intBegin; i < this._intEnd; i++)
- {
- newRow = dataTable1.NewRow();
- Drow = _dsAll.Tables[0].DefaultView[i].Row;
- newRow[0] = RowId++;
- newRow[1] = Drow["HEATNO"].ToString();
-
- newRow[6] = CStaticMethod.ChemelementPath(Drow["ASSAYTYPECODE"].ToString());
- string strAs = Drow["ASSAYTYPECODE"].ToString();
- newRow[7] = strAs.Substring(strAs.Length - 1, 1); //次数
- newRow[2] = Drow["gzbm"].ToString();
- if (Drow["ASSAYDATE"].ToString() != "")
- newRow[3] = Convert.ToDateTime(Drow["ASSAYDATE"]).ToString("yyyy-MM-dd HH:mm:ss");
- newRow[5] = Drow["shiftcode"].ToString();
- newRow[11] = Drow["SIMN"].ToString();//20120109 新增
- foreach (DataRow dr in dtSamplesignal.Tables[0].Rows)//20150401新增
- {
-
- string Strpos =analysChineseName((dr["STRPOS"].ToString().Substring(0,3)));
-
- if (dr["HEATNO"].ToString().Contains(Drow["HEATNO"].ToString()) && Strpos.Equals(newRow[6]))
- {
- if (Math.Abs(Convert.ToDouble((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["UPDATE_TIME"])).TotalMinutes)) < 2)
- {
- double aaa=(Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes;
- if ((Math.Round((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes,0)) > 0)
- //(Math.Round((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes, 0)) < 20)
- {
- newRow[13] = Math.Round((Convert.ToDateTime(Drow["ASSAYDATE"]) - Convert.ToDateTime(dr["SAMPLE_DATE1"])).TotalMinutes,2).ToString();//Math.Round(
- newRow[14] = Convert.ToDateTime(dr["SAMPLE_DATE1"]).ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- }
- }
- try
- {
- foreach (DataColumn dc in _dsAll.Tables[0].Columns)
- {
- foreach (DataColumn dc1 in dataTable1.Columns)
- {
- if (dc1.ColumnName.ToUpper() == dc.ColumnName.ToUpper())
- {
- if (Drow[dc].ToString() != "")
- newRow[dc1] = Drow[dc].ToString();
- if (!Isbool)
- if (newRow[7] != "" && Drow["JUDGE_SEQ"].ToString() != "")
- {
- if (strAs.Substring(0, 1) == "G" && Convert.ToInt32(newRow[7]) == Convert.ToInt32(Drow["JUDGE_SEQ"].ToString()))
- {
- newRow[8] = Drow["JUDGE_STL_GRD"].ToString();
- newRow[9] = Drow["JUDGE_RESULT"].ToString() == "1" ? "合格" : "不合格";
- newRow[10] = Drow["REG_ID"].ToString();
- }
- else
- {
- newRow[8] = null;
- newRow[9] = null;
- newRow[10] = null;
- }
- }
- break;
- }
-
- }
- }
- }
- catch(Exception ex)
- {
- // MessageBox.Show(ex.Message);
- }
- dataTable1.Rows.Add(newRow);
- SetGridRowHidden();
-
- }
- /*
- * 修改描述:计算连铸和前工序的成份偏差
- * 作者:在datatable 数据填充后再计算
- * 修改日期:20131203
- */
- try
- {
- calculateChemelentDifference();
- }
- catch (Exception ex)
- {
- throw ex;
- }
-
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 根据设置隐藏不要显示的列
- /// </summary>
- private void SetGridRowHidden()
- {
-
- try
- {
- //新增列时,相继修改J的值(新增n列时,j=j+n),否则将不会在界面显示
- for (int j = 15; j < EMGrid.DisplayLayout.Bands[0].Columns.Count; j++)
- {
- if (ceqChemList.Contains(EMGrid.DisplayLayout.Bands[0].Columns[j].Header.Caption.ToUpper()))
- {
- EMGrid.DisplayLayout.Bands[0].Columns[j].Width = 60;
- EMGrid.DisplayLayout.Bands[0].Columns[j].CellActivation = Activation.NoEdit;
- continue;
- }
-
- EMGrid.DisplayLayout.Bands[0].Columns[j].Hidden = true;
- EMGrid.DisplayLayout.Bands[0].Columns[j].Width = 60;
- EMGrid.DisplayLayout.Bands[0].Columns[j].CellActivation = Activation.NoEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[0].CellActivation = Activation.AllowEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[1].CellActivation = Activation.AllowEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[2].CellActivation = Activation.NoEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[3].CellActivation = Activation.NoEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[4].CellActivation = Activation.NoEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[5].CellActivation = Activation.NoEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[6].CellActivation = Activation.NoEdit;
- EMGrid.DisplayLayout.Bands[0].Columns[7].CellActivation = Activation.NoEdit;
-
- }
- for (int i = 0; i < strERow.Length; i++)
- {
- if (!string.IsNullOrEmpty(strERow[i]))
- EMGrid.DisplayLayout.Bands[0].Columns[strERow[i]].Hidden = false;
- }
- for (int j = 0; j < strRowName.Length; j++)
- {
- EMGrid.DisplayLayout.Bands[0].Columns[strRowName[j]].Header.VisiblePosition = j + 8;
- }
- EMGrid.DisplayLayout.Bands[0].Columns[5].Header.VisiblePosition = EMGrid.DisplayLayout.Bands[0].Columns.Count;
- EMGrid.DisplayLayout.Bands[0].Columns[3].Header.VisiblePosition = EMGrid.DisplayLayout.Bands[0].Columns.Count;
- EMGrid.DisplayLayout.Bands[0].Columns[6].Header.VisiblePosition = 2;
- EMGrid.DisplayLayout.Bands[0].Columns[7].Header.VisiblePosition = 3;
- EMGrid.DisplayLayout.Bands[0].Columns[2].Header.VisiblePosition = 4;
- EMGrid.DisplayLayout.Bands[0].Columns[8].Header.VisiblePosition = 5;
- EMGrid.DisplayLayout.Bands[0].Columns[9].Header.VisiblePosition = 6;
- EMGrid.DisplayLayout.Bands[0].Columns[10].Header.VisiblePosition = 7;
- EMGrid.DisplayLayout.Bands[0].Columns[12].Header.VisiblePosition = 8;
- EMGrid.DisplayLayout.Bands[0].Columns[1].Header.Fixed = true;
- EMGrid.DisplayLayout.Bands[0].Columns[2].Header.Fixed = true;
- EMGrid.DisplayLayout.Bands[0].Columns[6].Header.Fixed = true;
- EMGrid.DisplayLayout.Bands[0].Columns[7].Header.Fixed = true;
-
- }
- catch
- {
- }
- }
- private void TestDs()
- {
- ClientParamWithSqlConditionAndOpenBase param = new ClientParamWithSqlConditionAndOpenBase();
- param.sqlCondition = "J41-04504A_C102_S";
- param.ob = this.ob;
- //DataSet ds = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.ReturnCeqChemByCheckNo(param);
- }
- private void SetDataToGrid()
- {
- this._intBegin = 0;
- //this._intEnd = Convert.ToInt32(this.txtPage.Text);
- if (_dsAll != null)
- {
- int count = _dsAll.Tables[0].Rows.Count;
- if (count <= _intEnd)
- {
- //_intEnd = count;
- this.btn_Up.Enabled = false;
- this.btn_Down.Enabled = false;
- this.button3.Enabled = false;
- }
- else
- {
- this.btn_Up.Enabled = false;
- this.btn_Down.Enabled = true;
- this.button3.Enabled = true;
- }
- if (count == 0)
- {
- this.label6.Text = "无数据";
- this.EMGrid.Cursor = System.Windows.Forms.Cursors.Arrow;
- }
- else
- this.label6.Text = String.Format("第 1 行到第 {0} 行, 共 {1} 行", _intEnd, count);
- try
- {
- SetEachRowData();
- }
- catch
- {
- }
-
- GetTAM_StandardElement(); // 取成分割标准对比
- }
- else
- {
- this.label6.Text = "无数据";
- }
- this.EMGrid.Cursor = System.Windows.Forms.Cursors.Arrow;
- }
- #endregion
- #region " ToolBar Event "
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "Query":
- this.GetDataFromAll();
- break;
- case "SetSampling": //设置样点
- SetSampling();
- break;
- case "SetRowName": //设置化学成份字段显示
- SetRowName();
- break;
- case "Export":
- if (EMGrid.Rows.Count > 0)
- {
- ExportExcel();
- }
- else
- MessageBox.Show("没有化学成分信息。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- break;
- case "Exit":
- this.Close();
- break;
- default:
- break;
- }
- base.ToolBar_Click(sender, ToolbarKey);
- }
- /// <summary>
- /// 设置化学成份列名
- /// </summary>
- private void SetRowName()
- {
- DataSet dsElements = new DataSet();
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- arry.Add("FrmSetRowName.select");
- //调用服务端方法
- CoreClientParam CCP_Sampling = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_Sampling.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_Sampling.MethodName = "doSimpleQuery";
- CCP_Sampling.ServerParams = new object[] { arry };
- CCP_Sampling.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(CCP_Sampling, CoreInvokeType.Internal);
- if (dt != null)
- {
- if (dt.Rows.Count > 0)
- {
- dt.Rows[0].Table.Columns.Add(new DataColumn("选择", typeof(System.Boolean)));
- foreach (DataRow dr in dt.Rows)
- {
- dr["选择"] = false;
- }
- frmConfigElementsRow frm = new frmConfigElementsRow();
- frm.StartPosition = FormStartPosition.CenterScreen;
- frm.WindowState = FormWindowState.Normal;
- dsElements.Tables.Add(dt);
- frm._dsSet = dsElements;
- frm.ShowDialog();
- // 判断是否有设置
- if (frm._setFlag)
- {
- string strElementsRow = ElementsConfig.GetElementsRow(); //调用函数获取要显示的列名
- strERow = strElementsRow.Split('*');
- GetDataFromAll();
- }
- }
- else
- MessageBox.Show("查询失败!!!", "提示");
- }
- }
- /// <summary>
- /// 显示样点
- /// </summary>
- private void SetSampling()
- {
- DataTable dt = new DataTable();
- if (dataSet1 != null)
- {
- _dsSet = new DataSet();
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- arry.Add("FrmSetSamplin.select");//此ID为XML文件ID
- //调用服务端方法
- CoreClientParam CCP_Sampling = new CoreClientParam();
- CCP_Sampling.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_Sampling.MethodName = "doSimpleQuery";
- CCP_Sampling.ServerParams = new object[] { arry };
- CCP_Sampling.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(CCP_Sampling, CoreInvokeType.Internal);
- dt.Rows[0].Table.Columns.Add(new DataColumn("工序名", typeof(System.String)));
- dt.Rows[0].Table.Columns.Add(new DataColumn("选择", typeof(System.Boolean)));
- foreach (DataRow dr in dt.Rows)
- {
- string SetColumn = dr["ASSAYTYPECODE"].ToString().Substring(0, 2);
- dr["ASSAYTYPECODE"] = dr["ASSAYTYPECODE"].ToString();
- dr["工序名"] = analysPath(SetColumn, dr["ASSAYTYPECODE"].ToString());
- dr["选择"] = true;
- }
- }
- _dsSet.Tables.Add(dt);
- frmSetSampling frm = new frmSetSampling();
- frm._dsSet = _dsSet;
- frm.ShowDialog();
- if (frm._setFlag)
- {
- _dsSet = frm._dsSet;
- _dsSet.AcceptChanges();
- _dvRowFilter = "";
- foreach (DataRow dr in _dsSet.Tables[0].Rows)
- {
- if (Convert.ToBoolean(dr["选择"]) == true)
- {
- _dvRowFilter += string.Format("or assaytypecode = '{0}' ", dr[0].ToString());
- }
- }
- if (_dvRowFilter.Length > 0)
- {
- _dvRowFilter = _dvRowFilter.Substring(2, _dvRowFilter.Length - 2);
- }
- GetDataFromAll();
- }
- }
- private void ExportExcel()
- {
- try
- {
- string StrfileName = System.Windows.Forms.Application.StartupPath + "\\Report\\成分明细.xls";
- this.GridExcelExporter.Export(this.EMGrid, StrfileName);
- ProcessStartInfo p = new ProcessStartInfo(StrfileName);
- p.WindowStyle = System.Diagnostics.ProcessWindowStyle.Maximized;
- p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
- Process.Start(p);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message + "\n处理方法:查看(" + System.Windows.Forms.Application.StartupPath + ")目录下是否有[ Report文件夹 ],如果没有请手动创建!");
- }
- }
- #endregion
- private void HiddCeqColumn()
- {
- bool flag = false;
- try
- {
- foreach (UltraGridColumn col in this.EMGrid.DisplayLayout.Bands[0].Columns)
- {
- flag = false;
- if (!this.ceqChemList.Contains(col.Header.Caption.ToUpper()))
- {
- continue;
- }
- foreach (UltraGridRow ugr in this.EMGrid.Rows)
- {
- if (ugr.Cells[col.Header.Caption].Value.ToString().Length > 0)
- {
- flag = true;
- break;
- }
- }
- this.EMGrid.DisplayLayout.Bands[0].Columns[col.Header.Caption].Hidden = (flag) ? false : true;
- }
- }
- catch
- {
- }
- }
- private void AddCeqToDataTable(ref DataTable dt)
- {
- Hashtable hsCeq = null;
- Hashtable tb = null;
- ClientParamWithSqlConditionAndOpenBase param = new ClientParamWithSqlConditionAndOpenBase();
- param.ob = this.ob;
- if (dt == null || dt.Rows.Count == 0)
- return;
- // 先获取所有的复合成分,减少后续扫描数据库的循环
- DataSet dsChemCeqByHeatno =
- Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.GetCeqChem(new ClientParamWithSqlConditionAndOpenBase(string.Format(" and ASSAYDATE >= '{0}' ", this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")), this.ob));
- if (dsChemCeqByHeatno == null || dsChemCeqByHeatno.Tables[0].Rows.Count == 0)
- return;
- foreach (DataRow dr in dt.Rows)
- {
-
- // g根据炉号和化验时间过滤复合元素,唯一的
- DataView dv = dsChemCeqByHeatno.Tables[0].DefaultView;
- dv.RowFilter = string.Format("HEATNO = '{0}' and ASSAYDATE = '{1}'", dr["HEATNO"].ToString(), dr["ASSAYDATE"].ToString());
- if (dv.Count == 0)
- continue;
- param.param = null;
- param.param = new Object[] { dr["HEATNO"].ToString(), dr["ASSAYDATE"].ToString(),dv.ToTable() };
- tb = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.ReturnCeqChemByHeatNoAndAssDate(param);
- if (tb == null || tb.Count == 0)
- continue;
- // 获取该记录的复合成分列表
- hsCeq = tb[dr["HEATNO"].ToString() + dr["ASSAYDATE"].ToString()] as Hashtable;
- if (hsCeq != null && hsCeq.Count > 0)
- {
- foreach (string s in hsCeq.Keys)
- {
- // 表没有复合成分名称,新增
- if (!dt.Columns.Contains(s))
- {
- dt.Columns.Add(new DataColumn(s, System.Type.GetType("System.String")));
-
- }
- try
- {
- // 同步新增显示数据的表结构
- if (!this.dataTable1.Columns.Contains(s))
- {
- this.dataTable1.Columns.Add(new DataColumn(s, System.Type.GetType("System.String")));
- }
- }
- catch
- {
- }
- // 赋值
- dr[s] = hsCeq[s].ToString();
- }
- }
- }
- }
- #region " 直接打开界面 或 查询 "
- public void GetDataFromAll()
- {
- List<TBB01_SEQ_INGR> listIngr = null;
- try
- {
- listIngr = Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.GetTbb01SeqIngrAll(new ClientParamWithSqlConditionAndOpenBase("",this.ob));
- }
- catch
- {
- }
- string strFindName = "";
- for (int i = 0; i < strERow.Length; i++)
- {
- if (!string.IsNullOrEmpty(strERow[i]))
- strFindName = strFindName + "," + strERow[i];
- }
- try
- {
- if (Convert.ToDateTime(uldtEndTime.Value) < Convert.ToDateTime(uldtBeginTime.Value))
- {
- MessageBox.Show("结束时间必须大于等于开始时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- GetPost();
- GetDuty();
- if (this.ultraMaskedEdit1.Text.Trim().Length > 0 || this.ultraMaskedEdit2.Text.Trim().Length > 0)
- BuildSQLWithID();
- else
- BuildSQLWithOutID();
- _dsAll = new DataSet();
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- ArrayList sqlList = new ArrayList();
- if (Isbool)
- {
- arry.Add("FrmHMPElements_Query.select");
- }
- else
- {
- arry.Add("FrmLgElements_Query.select");
- }
- sqlList.Add(strFindName);
- //sqlList.Add(_strWhere1);
- //sqlList.Add(_strWhere1);
- sqlList.Add(_szTableName);//表名
- sqlList.Add("J#" + _szTableName);//表名
- sqlList.Add("and ASSAYDATE between to_date('" + this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
- + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
- + "','yyyy-mm-dd hh24:mi:ss')");//时间
- sqlList.Add("and ASSAYDATE between to_date('" + this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
- + "', 'yyyy-mm-dd hh24:mi:ss') and to_date('" + this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")
- + "','yyyy-mm-dd hh24:mi:ss')");
- sqlList.Add(_strWhere2);
- //调用服务端方法
- CoreClientParam CCP_LgEts = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_LgEts.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_LgEts.MethodName = "doQuery";
- CCP_LgEts.ServerParams = new object[] { arry, sqlList };
- CCP_LgEts.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(CCP_LgEts, CoreInvokeType.Internal);
- DataTable dtTemp = dt.Copy();
- //获取炉号
- dtSamplesignal = this.ObtainSamplesignal(dtTemp);
- // 增加复合元素
- try
- {
- AddCeqToDataTable(ref dt);
- }
- catch
- {
- dt = dtTemp;
- }
-
- _dsAll.Tables.Add(dt);
- _dsAll.Tables[0].DefaultView.RowFilter = _dvRowFilter;
- DataRow[] row = _dsAll.Tables[0].Select(_dvRowFilter);
-
- int currrow = row.Length;
- if (currrow < 40)
- {
- this._intEnd = currrow;
- }
- else
- { _intEnd = Convert.ToInt32(this.txtPage.Text.Trim()); }
- // _intEnd = 4000;
- SetDataToGrid();
-
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex.Message);
- }
- }
- #endregion
- #region " 从作业管理打开界面 "
- public void GetDataFromCurr()
- {
- try
- {
- GetCurrDuty();
- _dsAll = null;
- //定义一个ArrayList集合存储变量[参数]值
- ArrayList arry = new ArrayList();
- arry.Add("frmSysteLog.select");
- //调用服务端方法
- CoreClientParam CCP_SysLog = new CoreClientParam();
- DataTable dt = new DataTable();
- CCP_SysLog.ServerName = "Core.LgMes.Server.Common.ComDBQuery";
- CCP_SysLog.MethodName = "doSimpleQuery";
- CCP_SysLog.ServerParams = new object[] { arry };
- CCP_SysLog.SourceDataTable = dt;
- this.ExecuteQueryToDataTable(CCP_SysLog, CoreInvokeType.Internal);
- _dsAll.Tables[0].DefaultView.RowFilter = _dvRowFilter;
- SetPost();
- SetDuty();
- SetDataToGrid();
- }
- catch { }
- }
- private void GetCurrDuty()
- {
- try
- {
- string strErr = "";
- string strDuty = "";
- ArrayList arry = new ArrayList();
- arry.Add("GetClassCode.query");
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- DataSet ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBQuery",
- "doSimpleQuery", arry, out strErr);
- strDuty = ds.Tables[0].Rows[0]["mes"].ToString();
- _strDuty = strDuty.Substring(1, 1);
- return;
- }
- catch { }
- _strDuty = "0";
- }
- #endregion
- #region " SQL "
- private void BuildSQLWithOutID()
- {
- string begTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- string endTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- string strStartTime = "";
- string strEndTime = "";
- if (Convert.ToDateTime(uldtBeginTime.Text.Trim()) > Convert.ToDateTime(uldtEndTime.Text.Trim()))
- {
- MessageBox.Show("选择的开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- else
- {
- strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- }
- if (_devPos.Substring(0, 3) == "HMP" || _devPos.Substring(0, 4) == "SYGW")// 铁水 或者 所有岗位
- {
- _strWhere2 = " where a.hudwid = b.heatno and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH:mm:ss') between '" + strStartTime + "' and '" + strEndTime + "' ";
- Isbool = true;
- }
- else
- {
- _strWhere2 = " where b.HEATNO = a.HEATNO and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH:mm:ss') between '" + strStartTime + "' and '" + strEndTime + "' ";
- Isbool = false;
- }
- string str = this._devPos.Substring(0, 3), szWZ = this._devPos.Substring(3, 2);
- if (this._strDuty != "0" && str != "HMP")
- _strWhere2 += string.Format(" and substr(a.SHIFTCODE,2,1) = '{0}' ", this._strDuty);
- if (str != "HMP" && szWZ != "00" && str != "SYG")
- _strWhere2 += string.Format(" and a.stationcode = '{0}'", szWZ);
- if (txtSteel.Text.Trim() != "")
- str = txtSteel.Text.ToString();
- else
- str = "";
- if (str != "")
- {
- string strSteeAll = "";
- string[] strSteel = str.Split(',');
- for (int i = 0; i < strSteel.Length; i++)
- {
- if (!string.IsNullOrEmpty(strSteel[i]))
- strSteeAll = strSteeAll + "'" + strSteel[i] + "',";
- }
- str = strSteeAll.Substring(0, strSteeAll.Length - 1);
- _strWhere2 += string.Format(" and a.plansteel in ({0})", str);
- }
- //气体样
- if (chkGasSample.Checked)
- {
- _strWhere2 += " and (N>0 or H>0 or O>0) ";
- }
- }
- private void BuildSQLWithID()
- {
- string begTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- string endTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- string strStartTime = "";
- string strEndTime = "";
- if (Convert.ToDateTime(uldtBeginTime.Text.Trim()) > Convert.ToDateTime(uldtEndTime.Text.Trim()))
- {
- MessageBox.Show("选择的开始时间不能大于结束时间!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- return;
- }
- else
- {
- strStartTime = this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- strEndTime = this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss");
- }
- //熔炼号从
- if (this.ultraMaskedEdit1.Text.Length == 0)
- {
- _strWhere2 = String.Format(" where a.HEATNO like '%{0}%' ", this.ultraMaskedEdit2.Text.Trim());
- }
- else
- {
- if (this.ultraMaskedEdit2.Text.Length == 0)
- {
- _strWhere2 = String.Format(" where a.HEATNO like '%{0}%' ", this.ultraMaskedEdit1.Text.Trim());
- }
- else
- {
- _strWhere2 = String.Format(" where a.HEATNO between '{0}' and '{1}' ", this.ultraMaskedEdit1.Text.Trim(), this.ultraMaskedEdit2.Text.Trim());
- }
- }
- if (_devPos.Substring(0, 3) == "HMP" || _devPos.Substring(0, 4) == "SYGW")
- {
- _strWhere2 += " ";
- Isbool = true;
- }
- else
- {
- Isbool = false;
- _strWhere2 += " and b.HEATNO = a.HEATNO and to_char(b.ASSAYDATE, 'yyyy-MM-dd HH:mm:ss') between '" + strStartTime + "' and '" + strEndTime + "'";
- }
- string str = this._devPos.Substring(0, 3), szWZ = this._devPos.Substring(4, 1);
- if (this._strDuty != "0" && str != "HMP")
- _strWhere2 += string.Format(" and substr(a.SHIFTCODE,2,1) = '{0}' ", this._strDuty);
- if (txtSteel.Text.Trim() != "")
- str = txtSteel.Text.ToString();
- else
- str = "";
- if (str != "")
- {
- string strSteeAll = "";
- string[] strSteel = str.Split(',');
- for (int i = 0; i < strSteel.Length; i++)
- {
- if (!string.IsNullOrEmpty(strSteel[i]))
- strSteeAll = strSteeAll + "'" + strSteel[i] + "',";
- }
- str = strSteeAll.Substring(0, strSteeAll.Length - 1);
- _strWhere2 += string.Format(" and a.plansteel in ({0})", str);
- }
- //气体样
- if (chkGasSample.Checked)
- {
- _strWhere2 += " and (N>0 or H>0 or O>0) ";
- }
- }
- #endregion
- #region " ComboBox Event "
- private object[] GetComboBox2Items(int index)
- {
- switch (index)
- {
- case 1:
- return new object[] { "所有", "1#转炉", "2#转炉", "3#转炉" };
- case 2:
- return new object[] { "所有", "1#吹氩站", "2#吹氩站", "3#吹氩站" };
- case 3:
- return new object[] { "所有", "1#精炼炉", "2#精炼炉" };
- case 4:
- return new object[] { "所有", "1#RH炉" };
- case 5:
- return new object[] { "所有", "1#连铸", "2#连铸", "3#连铸", "4#连铸" };
- default:
- return new object[] { "所有铁水" };
- }
- }
- #endregion
- #region " Common Event "
- private Color SetRowBackColor(UltraGridRow ugr, Color frc, bool ifSame)
- {
- Color c;
- if (ifSame)
- {
- c = frc;
- }
- else
- {
- if (frc == c1)
- c = c2;
- else
- c = c1;
- }
- ugr.Appearance.BackColor = c;
- return c;
- }
- private void SetMaskText()
- {
- try
- {
- this.ultraMaskedEdit1.Text = "";
- this.ultraMaskedEdit2.Text = "";
- if (this._devPos.Substring(0, 3) == "BOF" || this._devPos.Substring(0, 3) == "CAS")
- {
- int count = _dsAll.Tables[0].Rows.Count;
- if (count > 1)
- {
- this.ultraMaskedEdit1.Text = _dsAll.Tables[0].Rows[count - 1]["LH"].ToString();
- this.ultraMaskedEdit2.Text = _dsAll.Tables[0].Rows[0]["LH"].ToString();
- }
- else if (count == 1)
- {
- this.ultraMaskedEdit1.Text = _dsAll.Tables[0].Rows[count - 1]["LH"].ToString();
- }
- }
- }
- catch { }
- }
- private void GetPost()
- {
- this._devPos = "";
- switch (this.cboGW.SelectedIndex)
- {
- case 0:
- this._devPos = "HMP0";
- this._szTableName = "STL_HMP_OPTINFO";
- break;
- case 1:
- this._devPos = "BOF0";
- this._szTableName = "STL_BOF_OPTINFO";
- break;
- case 2:
- this._devPos = "CAS0";
- this._szTableName = "STL_CAS_OPTINFO";
- break;
- case 3:
- this._devPos = "LFS0";
- this._szTableName = "STL_LFS_OPTINFO";
- break;
- case 4:
- this._devPos = "RHS0";
- this._szTableName = "STL_RHS_OPTINFO";
- break;
- case 5:
- this._devPos = "VDS0";
- this._szTableName = "STL_VDS_OPTINFO";
- break;
- case 6:
- this._devPos = "CCM0";
- this._szTableName = "STL_CCM_OPTINFO";
- break;
- default:
- this._devPos = "SYGW"; // 所有岗位
- this._szTableName = "";
- break;
- }
- this._devPos += this.comboBox2.Value.ToString();
- }
- private string GetTableName()
- {
- string szTableName = "";
- switch (_devPos.Substring(0, 3))
- {
- case "HMP":
- szTableName = "STL_HMP_OPTINFO";
- break;
- case "BOF":
- szTableName = "STL_BOF_OPTINFO";
- break;
- case "CAS":
- szTableName = "STL_CAS_OPTINFO";
- break;
- case "LFS":
- szTableName = "STL_LFS_OPTINFO";
- break;
- case "CCM":
- szTableName = "STL_CCM_OPTINFO";
- break;
- default:
- break;
- }
- return szTableName;
- }
- /// <summary>
- /// 设置设备选择框
- /// </summary>
- private void SetPost()
- {
- this._devPos = CurrectDevPos(this._devPos);
- if (_devPos.Length < 5) return;
- switch (_devPos.Substring(0, 3))
- {
- case "HMP":
- this.cboGW.SelectedIndex = 0;
- break;
- case "BOF":
- this.cboGW.SelectedIndex = 1;
- break;
- case "CAS":
- this.cboGW.SelectedIndex = 2;
- break;
- case "LFS":
- this.cboGW.SelectedIndex = 3;
- break;
- case "RHS":
- this.cboGW.SelectedIndex = 4;
- break;
- case "CCM":
- this.cboGW.SelectedIndex = 5;
- break;
- }
- this.comboBox2.SelectedIndex = Convert.ToInt32(_devPos.Substring(4, 1));
- }
- private void GetDuty()
- {
- this._strDuty = this.cmb_BZ.SelectedIndex.ToString();
- }
- /// <summary>
- /// 设置班组下拉框
- /// </summary>
- private void SetDuty()
- {
- try
- {
- this.cmb_BZ.SelectedIndex = Convert.ToInt32(this._strDuty);
- }
- catch { }
- }
- private string CurrectDevPos(string devPos)
- {
- if (devPos.Length < 5) return "";
- if (devPos.Substring(0, 3) == "BOF")
- {
- switch (devPos.Substring(4, 1))
- {
- case "7":
- devPos = devPos.Replace("7", "1");
- break;
- case "8":
- devPos = devPos.Replace("8", "2");
- break;
- case "9":
- devPos = devPos.Replace("9", "3");
- break;
- }
- }
- return devPos;
- }
- #endregion
- #region " Auto Refresh "
- private Thread _getDataThread;
- private bool On_Off_GetDataThread = false;
- private delegate void getDataFromAllDelegate();
- private void StartGetDataThread()
- {
- try
- {
- ThreadStart ts = new ThreadStart(GetDataThread);
- _getDataThread = new Thread(ts);
- _getDataThread.Name = "GetDataThread ";
- _getDataThread.Start();
- }
- catch { }
- }
- private void GetDataThread()
- {
- ReStartGetDataThread:
- while (true)
- {
- if (!this.On_Off_Thread || !On_Off_GetDataThread)
- {
- System.Threading.Thread.Sleep(500);
- continue;
- }
- try
- {
- this.Invoke(new getDataFromAllDelegate(GetDataFromAll));
- System.Threading.Thread.Sleep(3000);
- }
- catch
- { }
- }
- goto ReStartGetDataThread;
- }
- private void chkRefresh_CheckedChanged(object sender, EventArgs e)
- {
- On_Off_GetDataThread = this.chkRefresh.Checked;
- }
- #endregion
- private int nRow = -1;
- private Color c3 = Color.White;
- private bool bColor = false;
- private void EMGrid_Click(object sender, System.EventArgs e)
- {
- if (this.EMGrid.ActiveRow != null)
- {
- foreach (Infragistics.Win.UltraWinGrid.UltraGridRow rw in this.EMGrid.Rows)
- {
- if (rw.Appearance.BackColor == Color.LightBlue)
- rw.Appearance.BackColor = Color.White;
- }
- if (bColor)
- {
- if (nRow < EMGrid.Rows.Count)
- this.EMGrid.Rows[nRow].Appearance.BackColor = c3;
- }
- else
- {
- bColor = true;
- }
- c3 = this.EMGrid.ActiveRow.Appearance.BackColor;
- nRow = this.EMGrid.ActiveRow.Index;
- this.EMGrid.ActiveRow.Appearance.BackColor = Color.LightBlue;
- }
- }
- #endregion
- private void cboGW_SelectionChanged(object sender, EventArgs e)
- {
- comboBox2.Items.Clear();
- int index;
- index = cboGW.SelectedIndex;
- switch (index)
- {
- case 1:
- comboBox2.Items.Add(0, "所有");
- comboBox2.Items.Add(1, "1#转炉");
- comboBox2.Items.Add(2, "2#转炉");
- break;
- case 2:
- comboBox2.Items.Add(0, "所有");
- comboBox2.Items.Add(1, "1#吹氩站");
- comboBox2.Items.Add(2, "2#吹氩站");
- break;
- case 3:
- comboBox2.Items.Add(0, "所有");
- comboBox2.Items.Add(1, "1#精炼炉");
- comboBox2.Items.Add(2, "2#精炼炉");
- break;
- case 4:
- comboBox2.Items.Add(0, "所有");
- comboBox2.Items.Add(1, "RH炉");
- break;
- case 5:
- comboBox2.Items.Add(0, "所有");
- comboBox2.Items.Add(1, "VD炉");
- break;
- case 6:
- comboBox2.Items.Add(0, "所有");
- comboBox2.Items.Add(1, "1#连铸");
- comboBox2.Items.Add(2, "2#连铸");
- comboBox2.Items.Add(3, "3#连铸");
- break;
- default:
- comboBox2.Items.Add(0, "所有铁水");
- break;
- }
- comboBox2.SelectedIndex = 0;
- }
- /// <summary>
- /// 解析作业路线
- /// </summary>
- /// <param name="craftPath">路线代码</param>
- /// <returns></returns>
- public string analysPath(string craftPath, string strPath)
- {
- string path = "", strcPath = "";
- strcPath = strPath;
- try
- {
- string StationCode = craftPath.Substring(0, 2);
- string strCS = "";
- if (strPath.Length < 5)
- {
- strCS = strcPath.Substring(2, 2);
- }
- else if (strPath.Length > 5 && strcPath.Length < 7)
- {
- strCS = strcPath.Substring(2, 4);
- }
- else
- strCS = strcPath.Substring(2, 3);
- switch (StationCode)
- {
- case "B0":
- path = "脱硫" + Convert.ToInt32(strCS) + "次样";
- break;
- case "B1":
- path = "1#脱硫" + Convert.ToInt32(strCS) + "次样";
- break;
- case "B2":
- path = "2#脱硫" + Convert.ToInt32(strCS) + "次样";
- break;
- case "C0":
- path = "转炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "C1":
- path = "1#转炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "C2":
- path = "2#转炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "D0":
- path = "吹氩" + Convert.ToInt32(strCS) + "次样";
- break;
- case "D1":
- path = "1#吹氩" + Convert.ToInt32(strCS) + "次样";
- break;
- case "D2":
- path = "2#吹氩" + Convert.ToInt32(strCS) + "次样";
- break;
- case "DQ":
- path = "CAS前" + Convert.ToInt32(strCS) + "次样";
- break;
- case "DH":
- path = "CAS后" + Convert.ToInt32(strCS) + "次样";
- break;
- case "E0":
- path = "LF炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "E1":
- path = "1#LF炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "E2":
- path = "2#LF炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "F0":
- path = "RH炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "F1":
- path = "RH炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "I0":
- path = "VD炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "I1":
- path = "VD炉" + Convert.ToInt32(strCS) + "次样";
- break;
- case "GP":
- path = "连铸" + Convert.ToInt32(strCS) + "次样"; ;
- break;
- }
- }
- catch
- {
- }
- return path;
- }
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- }
- /// <summary>
- /// </summary>
- /// <param> </param>
- /// <seealso cref="String">
- /// 计算成份偏差主体</seealso>
- ///
- private void doInitChemelentDifference( string vHeatNo)
- {
- try
- {
- DataTable dt = this.dataTable1;
- DataView dv = new DataView(dt);
- dv.RowFilter = string.Format(" 熔炼号 = '{0}'", vHeatNo);
- DataRow drTemp = null;
- DataRow drSource = null;
- DataRow dr = dt.NewRow();
- if (dv != null && dv.Table.Rows.Count > 0)
- {
- dv.Sort = "化验时间 desc";
- }
- if (dv.ToTable().Rows[0]["Station"].ToString().Contains("连铸") && dv.ToTable().Rows.Count >= 2)
- {
- drSource = dv.ToTable().Rows[0];
- drTemp = dv.ToTable().Rows[1];
- if (drTemp["Station"].ToString().Contains("连铸") && dv.ToTable().Rows.Count >= 3)
- {
- drTemp = dv.ToTable().Rows[2];
- }
- }
- else
- return;
- for (int i = 0; i < drSource.Table.Columns.Count; i++)
- {
- try
- {
- if (Convert.ToDouble(drSource[i].ToString()) > 0)
- {
- dr[i] = Math.Round(Convert.ToDouble(drSource[i].ToString()) - Convert.ToDouble(drTemp[i].ToString()), 4);
- }
- }
- catch
- {
- dr[i] = drSource[i];
- }
- }
- dr["Station"] = "成分偏差";
- dr["SumTime"] = 1;
- dr["shiftcode"] = drSource["shiftcode"];
- //20150401
- dr["CM"] = "";
- dr["SAMPLE_DATE1"] = "";
- System.DateTime dtime = Convert.ToDateTime(dr["化验时间"].ToString());
- dtime.AddMinutes(1);
- dr["化验时间"] = dtime.ToString();
- dt.Rows.Add(dr);
- dt.AcceptChanges();
- }
- catch(Exception ex)
- {
- }
-
-
-
- }
- /// <summary>
- /// </summary>
- /// <param> </param>
- /// <seealso cref="String">
- /// 获取带有连铸信息的所有炉号</seealso>
- /// 返回list
-
- private ArrayList getHeatNo()
- {
- ArrayList list = new ArrayList();
- foreach (DataRow dr in dataTable1.Rows)
- {
- if (!list.Contains(dr["熔炼号"].ToString()) && dr["Station"].ToString().Contains("连铸"))
- {
- list.Add(dr["熔炼号"].ToString());
- }
-
- }
- return list;
- }
- /// <summary>
- /// </summary>
- /// <param> </param>
- /// <seealso cref="String">
- /// 计算连铸工序和前道工序的成份偏差</seealso>
- private void calculateChemelentDifference()
- {
- ArrayList list = this.getHeatNo();
- foreach (string s in list)
- {
- this.doInitChemelentDifference(s);
- }
- DataTable tbTemp = new DataTable();
- tbTemp.Merge(this.dataTable1);
- DataView dv = new DataView(tbTemp);
- dv.Sort = "熔炼号 desc,化验时间 asc";
- this.dataTable1.Clear();
- this.dataTable1.Merge(dv.ToTable());
-
-
-
- }
- private void button1_Click(object sender, EventArgs e)
- {
-
- }
- private void button1_Click_1(object sender, EventArgs e)
- {
- try
- {
-
- ClientParamWithSqlConditionAndOpenBase param = new ClientParamWithSqlConditionAndOpenBase();
- param.param = new object[] { this.uldtBeginTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss") , this.uldtEndTime.DateTime.ToString("yyyy-MM-dd HH:mm:ss")};
- param.ob = this.ob;
- Core.LgMes.Client.lgBll.LgChemeLementMgt.LgChemeLementMgt.Insert_StlChemelementCeq(param);
- }
- catch
- { }
- }
- #region 20150401 新增送样时间,化验时间差
- private DataSet ObtainSamplesignal(DataTable dtTemp)
- {
-
-
- List<string> heatNoList =removeDuplicate( GetColumnStringValueFromDataSourceByColumnName(dtTemp,"HEATNO"));
- string sqlCondition = GetSqlConditionFromHeatNoList(heatNoList);
- DataSet dt= MethodCallService(sqlCondition);
- return dt;
-
- }
- public DataSet MethodCallService(string sqlCondition)
- {
- DataSet ds = new DataSet();
- string strErr="";
- string strSql = string.Format(@"select * from (select * from stl_air_samplesignal where {0} union all select * from J#stl_Air_Samplesignal where {0}) order by SAMPLE_DATE1", sqlCondition);
- CommonClientToServer cctos = new CommonClientToServer();
- cctos.ob = this.ob;
- ds = cctos.ExecuteQueryFunctions("Core.LgMes.Server.Common.ComDBExecute",
- "doSimpleQuery", strSql, out strErr);
-
- return ds;
-
- }
- public List<String> GetColumnStringValueFromDataSourceByColumnName(DataTable dsSource, string columnName)
- {
- List<String> list = new List<string>();
- if (dsSource == null || dsSource.Rows.Count == 0 || columnName.Length == 0)
- return list;
- if (!dsSource.Columns.Contains(columnName.ToUpper()))
- return list;
- try
- {
- foreach (DataRow dr in dsSource.Rows)
- {
- try
- {
- list.Add(dr[columnName.ToUpper()].ToString());
- }
- catch
- {
- break;
- }
- }
- }
- catch
- {
- }
- return list;
- }
- private List<string> removeDuplicate(List<string> lists)
- {
- for (int i = 0; i < lists.Count; i++)
- {
- for (int j = lists.Count - 1; j >= 0; j--)
- {
- if (i != j)
- {
- if (lists[i] == lists[j])
- {
- lists.Remove(lists[j]);
- }
- }
- }
- }
- return lists;
- }
- /// <summary>
- /// 拼接查询条件
- /// </summary>
- /// <param name="heatNoList"></param>
- /// <returns></returns>
- private string GetSqlConditionFromHeatNoList(List<string> heatNoList)
- {
- string strSqlHeatno = "";
- string strsqlwhere = "";
- string strsql = "";
- foreach (string heatno in heatNoList)
- {
- strSqlHeatno = "heatno = '" + heatno + "' or ";
- strsqlwhere += strSqlHeatno;
- }
- strsql = strsqlwhere +" 1 = 2";
- return strsql;
- }
- public int Count(DataSet ds)
- {
- try
- {
- return ds.Tables[0].Rows.Count;
- }
- catch
- {
- }
- return 0;
- }
-
- /// <summary>
- /// 根据岗位号获取工序中文名
- /// </summary>
- /// <param name="_DEVICE_POSITION">岗位编码</param>
- /// <returns>工序中文名</returns>
- public string analysChineseName(string _DEVICE_POSITION)
- {
- string strChineseName = ""; //工序代码
- if (!string.IsNullOrEmpty(_DEVICE_POSITION))
- {
- switch (_DEVICE_POSITION.Substring(0, 3))
- {
- case "HMP":
- strChineseName = "脱硫站";
- break;
- case "BOF":
- strChineseName = "转炉";
- break;
- case "CAS":
- strChineseName = "吹氩站";
- break;
- case "LFS":
- strChineseName = "LF炉";
- break;
- case "RHS":
- strChineseName = "RH炉";
- break;
- case "VDS":
- strChineseName = "VD炉";
- break;
- case "CCM":
- strChineseName = "连铸";
- break;
- default:
- break;
- }
- }
- return strChineseName;
- }
- DataSet dtSamplesignal = null;
- #endregion
- }
- }
|