| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Control;
- using com.steering.mes.zgmil.entity;
- using Infragistics.Win.UltraWinGrid;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.ZGMil.Entity;
- using Core.StlMes.Client.ZGMil.NodeResultQuery;
- using System.Net;
- using Core.StlMes.Client.ZGMil.Popup;
- using Core.StlMes.Client.ZGMil.ResultConrtrol;
- using Core.StlMes.Client.ZGMil.Common;
- using CoreFS.SA06;
- using System.Collections;
- namespace Core.StlMes.Client.ZGMil.Result
- {
- public partial class FrmHotSimple : FrmBase
- {
- #region 初始化
- MilPlan QueryMainPlan = new MilPlan();
- MilPlan MainPlan = new MilPlan();
- UltraGridRow actugr = null;
- private Infragistics.Win.UltraWinGrid.UltraGrid _grid = null;
- string PLineCode = "";//产线代码
- string PlanStatusQuery = "99"; //查询结炉实绩结炉状态
- string PlanStartStatusQuery = "01"; //查询结炉实绩起始状态
- string ActiveJUDGE_STOVE_NO = string.Empty;//主计划活动行的判定炉号
- string ActiveResultNo = string.Empty;//主计划活动行的判定炉号
- private string proPlanId = null;//轧管订单编号
- private string gxPlanNo = null;//工序排产序号
- private string ActiveStatus = null;//主计划活动行的状态
- MilSizingResultEntity tempsizingresult = new MilSizingResultEntity();
- MilHotCheckEntity HotCheckEntity = new MilHotCheckEntity();
- MilHotCheckDetailEntity HotCheckDetailEntity = new MilHotCheckDetailEntity();
- string Shift = "";
- string Group = "";
- private string Departm = "";//部门
- private string PlineCod = "";//产线
- private int _MouseLocX = 0; //鼠标横坐标
- private int _MouseLocY = 0; //鼠标纵坐标
- private string _UserName = "";
- private string _UserID = "";
- private int ShowMessageFlag = 0; //显示提示Flag 0-显示 1-不显示
- int HotFlag = 0;
- private string CutHeadBefore = "";
- private string CutTrailBefore = "";
- private string CutOrderBefore = "";
- int CopyFlag = 0;
- // MilHotCheckDetailEntity HotCheckCopyEntity = new MilHotCheckDetailEntity(); //用于复制
- MilHotCheckResultEntity MilHotCheckSave = new com.steering.mes.zgmil.entity.MilHotCheckResultEntity();
- string CutHead = "";
- string CutOrder = "";
- string CutTrail = "";
- Infragistics.Win.ValueList valueList = new Infragistics.Win.ValueList();
- public Infragistics.Win.UltraWinGrid.UltraGrid Grid
- {
- get { return _grid; }
- }
- public FrmHotSimple()
- {
- InitializeComponent();
- InitControl();
- Shift = UserInfo.GetUserOrder();
- Group = UserInfo.GetUserGroup();
- //获取鼠标坐标
- Point formPoint = this.PointToClient(Control.MousePosition);
- _MouseLocX = Convert.ToInt32(formPoint.X);
- _MouseLocY = Convert.ToInt32(formPoint.Y);
- valueList.ValueListItems.Add("0", "管头");
- valueList.ValueListItems.Add("1", "管体");
- valueList.ValueListItems.Add("2", "管尾");
- valueList.SelectedIndex = 0;
- ultraGrid1.DisplayLayout.Bands[0].Columns["pipe_location"].ValueList = valueList;
- ultraGrid1.DisplayLayout.Bands[0].Columns["pipe_location"].CellActivation = Activation.NoEdit;
- }
- /// <summary>
- /// 定时器事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void timer1_Tick(object sender, EventArgs e)
- {
- int MouseLocX = 0;
- int MouseLocY = 0;
- //获取当前鼠标坐标
- //获取鼠标坐标
- Point formPoint = this.PointToClient(Control.MousePosition);
- MouseLocX = Convert.ToInt32(formPoint.X);
- MouseLocY = Convert.ToInt32(formPoint.Y);
- if (MouseLocX == _MouseLocX && MouseLocY == _MouseLocY)
- {
- ShowMessageFlag = 1;
- PlanQuery();
- ShowMessageFlag = 0;
- }
- else
- {
- _MouseLocX = MouseLocX;
- _MouseLocY = MouseLocY;
- }
- }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- ultraGridPlan.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- rollingInfomation1.UltraGrid4.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- rollingCard1.UltraGrid4.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- colHotCheck1.UltraGrid2.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- ultraGrid1.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
- splitContainer2.SplitterDistance = 180;
- foreach (UltraGridColumn ugc in ultraGridPlan.DisplayLayout.Bands[0].Columns)
- {
- ugc.SortIndicator = SortIndicator.Disabled;
- }
- timer1.Tick += new EventHandler(timer1_Tick);
- //ultraGrid1.DisplayLayout.Override.AllowAddNew = AllowAddNew.TemplateOnBottom;
- //ultraGrid1.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.True;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_HEAD_P"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_TRAIL_P"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER_P"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CHECK_DATE"].CellActivation = Activation.AllowEdit;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_SHIFT_D"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_GROUP_D"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_USER"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_INFO"].Hidden = true;
- //switch (PLineCode)
- //{
- //}
- }
- /// <summary>
- /// 页面开启事件
- /// </summary>
- /// <param name="e"></param>
- protected override void OnShown(EventArgs e)
- {
- base.OnShown(e);
- string hostname = Dns.GetHostName();
- NativeMethodNew na = new NativeMethodNew(this.ob);
- Departm = UserInfo.GetDepartment();
- PLineCode = na.GetPCode(Departm);
- PlineCod = na.GetPCode(Departm);//获取 用户 对应的产线
- if (PlineCod.Equals("C009") || PlineCod.Equals("C012") || PlineCod.Equals("C017") || PlineCod.Equals("C072"))
- {
- this.rollingCard1.ChangCard();
- }
- switch (PLineCode)
- {
- case "C008":
- ultraGrid1.DisplayLayout.Bands[0].Columns["d3"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d4"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d1"].Header.Caption = "Dmin";
- ultraGrid1.DisplayLayout.Bands[0].Columns["d2"].Header.Caption = "Dmax";
- ultraGrid1.DisplayLayout.Bands[0].Columns["DIAMETER"].RowLayoutColumnInfo.SpanX = 2;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].Header.Appearance.BackColor = Color.Gray;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].Header.Appearance.BackColor = Color.Gray;
- break;
- case "C009":
- ultraGrid1.DisplayLayout.Bands[0].Columns["d3"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d4"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d1"].Header.Caption = "Dmin";
- ultraGrid1.DisplayLayout.Bands[0].Columns["d2"].Header.Caption = "Dmax";
- ultraGrid1.DisplayLayout.Bands[0].Columns["DIAMETER"].RowLayoutColumnInfo.SpanX = 2;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].Header.Appearance.BackColor = Color.Gray;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].Header.Appearance.BackColor = Color.Gray;
- break;
- case "C010":
- ultraGrid1.DisplayLayout.Bands[0].Columns["d3"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d4"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d1"].Header.Caption = "Dmin";
- ultraGrid1.DisplayLayout.Bands[0].Columns["d2"].Header.Caption = "Dmax";
- ultraGrid1.DisplayLayout.Bands[0].Columns["DIAMETER"].RowLayoutColumnInfo.SpanX = 2;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER"].Header.Caption = "实际长度";
-
- break;
- case "C012":
- ultraGrid1.DisplayLayout.Bands[0].Columns["d3"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d4"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d1"].Header.Caption = "Dmin";
- ultraGrid1.DisplayLayout.Bands[0].Columns["d2"].Header.Caption = "Dmax";
- ultraGrid1.DisplayLayout.Bands[0].Columns["DIAMETER"].RowLayoutColumnInfo.SpanX = 2;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].CellActivation = Activation.NoEdit;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].Header.Appearance.BackColor = Color.Gray;
- colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].Header.Appearance.BackColor = Color.Gray;
- break;
- case "C017":
- ultraGrid1.DisplayLayout.Bands[0].Columns["d3"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d4"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["d1"].Header.Caption = "Dmin";
- ultraGrid1.DisplayLayout.Bands[0].Columns["d2"].Header.Caption = "Dmax";
- ultraGrid1.DisplayLayout.Bands[0].Columns["DIAMETER"].RowLayoutColumnInfo.SpanX = 2;
- //colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].CellActivation = Activation.NoEdit;
- //colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].CellActivation = Activation.NoEdit;
- //colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["PASS_SERIES4"].Header.Appearance.BackColor = Color.Gray;
- //colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["DOUBLE_B4"].Header.Appearance.BackColor = Color.Gray;
- break;
- }
- Sign();
- PlanQuery();
- }
- /// <summary>
- /// 签名
- /// </summary>
- private void Sign()
- {
- ColUserName col = new ColUserName();
- col.StationId = "10";
- col.PlineCode = PLineCode;
- col.ColGroup = Group;
- col.Ob = this.ob;
- col.ShowDialog();
- _UserID = col.getUserId();
- _UserName = col.getUserName();
- }
- /// <summary>
- /// 初始化控件
- /// </summary>
- public void InitControl()
- {
- if (chkLotNo.Checked)
- {
- txtLOT_NO.Enabled = true;
- }
- else
- {
- txtLOT_NO.Enabled = false;
- }
- if (chkHeatNo.Checked)
- {
- txtJudgeStoveNo.Enabled = true;
- }
- else
- {
- txtJudgeStoveNo.Enabled = false;
- }
- }
- #endregion
- #region 控制赋值 方法
- /// <summary>
- /// 刷新
- /// </summary>
- public void ReFresh()
- {
- ChangeGridColor();
- PlanQuery();
- }
- /// <summary>
- /// 更改剔除坯料行颜色
- /// </summary>
- public void ChangeGridColor()
- {
- if (ultraGridPlan.Rows.Count > 0)
- {
- foreach (UltraGridRow ugr in ultraGridPlan.Rows)
- {
- if (ugr.Cells["HOT_CHECK_FLAG"].Value.ToString() == "已完成抽检")
- {
- ugr.Appearance.BackColor = Color.YellowGreen;
- }
- }
- }
- }
- /// <summary>
- /// 复制(把上一炉的实绩信息带到下一炉)
- /// </summary>
- private void DoStart()
- {
- if (MilHotCheckSave != null)
- {
-
- //colHotCheck1.SizingDataSource1.Rows[0]["INSPECTOR"] = MilHotCheckSave.Inspector;
- //colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B1"] = MilHotCheckSave.DoubleB1;
- //colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B2"] = MilHotCheckSave.DoubleB2;
- //colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B3"] = MilHotCheckSave.DoubleB3;
- //colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B4"] = MilHotCheckSave.DoubleB4;
- //colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES1"] = MilHotCheckSave.PassSeries1;
- //colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES2"] = MilHotCheckSave.PassSeries2;
- //colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES3"] = MilHotCheckSave.PassSeries3;
- //colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES4"] = MilHotCheckSave.PassSeries4;
- //colHotCheck1.SizingDataSource1.Rows[0]["START_TEMP"] = MilHotCheckSave.Standard;
- //colHotCheck1.SizingDataSource1.Rows[0]["END_TEMP"] = MilHotCheckSave.EndTemp;
- //this.colHotCheck1.Value.Inspector = MilHotCheckSave.Inspector;
- this.colHotCheck1.Value.DoubleB1 = MilHotCheckSave.DoubleB1;
- this.colHotCheck1.Value.DoubleB2 = MilHotCheckSave.DoubleB2;
- this.colHotCheck1.Value.DoubleB3 = MilHotCheckSave.DoubleB3;
- //this.colHotCheck1.Value.DoubleB4 = MilHotCheckSave.DoubleB4;
- this.colHotCheck1.Value.PassSeries1 = MilHotCheckSave.PassSeries1;
- this.colHotCheck1.Value.PassSeries2 = MilHotCheckSave.PassSeries2;
- this.colHotCheck1.Value.PassSeries3 = MilHotCheckSave.PassSeries3;
- this.colHotCheck1.Value.Outdiameter = MilHotCheckSave.Outdiameter;
- this.colHotCheck1.Value.Wallthick = MilHotCheckSave.Wallthick;
- //this.colHotCheck1.Value.PassSeries4 = MilHotCheckSave.PassSeries4;
- //this.colHotCheck1.Value.Standard = MilHotCheckSave.Standard;
- //this.colHotCheck1.Value.EndTemp = MilHotCheckSave.EndTemp;
- this.colHotCheck1.Value.StartTemp = MilHotCheckSave.StartTemp;
- this.colHotCheck1.Value.EndTemp = MilHotCheckSave.EndTemp;
- this.colHotCheck1.Value.Remark = MilHotCheckSave.Remark;
- if (PLineCode.Equals("C010"))
- {
- this.colHotCheck1.Value.DoubleB4 = MilHotCheckSave.DoubleB4;
- this.colHotCheck1.Value.PassSeries4 = MilHotCheckSave.PassSeries4;
- }
- switch (PLineCode)
- {
- case "C008": //250
- case "C010": //168
-
- case "C017": //460
- this.colHotCheck1.Value.CutHead = CutHead;
- this.colHotCheck1.Value.CutTrail = CutTrail;
- this.colHotCheck1.Value.CutOrder = CutOrder;
- break;
- }
- }
- colHotCheck1.UpdateDate();
- }
- /// <summary>
- /// 查询流通卡信息
- /// </summary>
- public void GetRollingCard()
- {
- UltraGridRow ugr = ultraGridPlan.ActiveRow;
- if (ugr != null)
- {
- string JudgeStoveNo = ugr.Cells["JUDGE_STOVE_NO"].Value.ToString();
- DataTable dt = new DataTable();
- if (PlineCod.Equals("C009") || PlineCod.Equals("C012") || PlineCod.Equals("C017"))
- {
- dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FeedSawResult.getRollingCard1", new object[] { JudgeStoveNo, proPlanId, gxPlanNo }, this.ob);
- }
- else
- {
- dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FeedSawResult.getRollingCard", new object[] { JudgeStoveNo, proPlanId, gxPlanNo }, this.ob);
- }
- RollingCardEditGrid(dt, JudgeStoveNo);
- }
- }
- #endregion
- #region L
- /// <summary>
- /// ToolBar按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="ToolbarKey"></param>
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- switch (ToolbarKey)
- {
- case "DoQuery":
- PlanQuery();
- break;
- case "DoStart":
- DoStart();
- break;
- case "DoSave":
- ResultSave();
- break;
- case "DoAdd":
- ResultAdd();
- break;
- case "DoDelete":
- ResultDelete();
- break;
- case "DoNodeBack":
- NodeBack();
- break;
- case "DoNode":
- Node();
- break;
- case "DoPrint":
- PrintResult();
- break;
- case "DoSign":
- Sign();
- break;
- //case "DoQueryBefore":
- // QueryBefore();
- // break;
- case "Close":
- this.Dispose();
- this.Close();
- break;
- }
- }
- /// <summary>
- /// checkbox点击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void chkDate_CheckedChanged(object sender, EventArgs e)
- {
- if (chkLotNo.Checked)
- {
- txtLOT_NO.Enabled = true;
- }
- else
- {
- txtLOT_NO.Enabled = false;
- }
- if (chkHeatNo.Checked)
- {
- txtJudgeStoveNo.Enabled = true;
- }
- else
- {
- txtJudgeStoveNo.Enabled = false;
- }
- if (chkStatusQuery.Checked)
- {
- HotFlag = 1;
- }
- else
- {
- HotFlag = 0;
- }
- if (chkAutoRefresh.Checked)
- {
- timer1.Enabled = true;
- }
- else
- {
- timer1.Enabled = false;
- }
- }
- /// <summary>
- /// 计划查询
- /// </summary>
- public void PlanQuery()
- {
- string PrimaKey = "";
- UltraGridRow ugr = this.ultraGridPlan.ActiveRow;
- if (ugr != null)
- {
- PrimaKey = ugr.Cells["JUDGE_STOVE_NO"].Value.ToString();
- }
- if (chkHeatNo.Checked == true)
- {
- if (string.IsNullOrEmpty(this.txtJudgeStoveNo.Text))
- {
- MessageBox.Show("请输入判定炉号后再执行查询操作!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- QueryMainPlan.JudgeStoveNo = this.txtJudgeStoveNo.Text;
- }
- else
- {
- QueryMainPlan.JudgeStoveNo = "";
- }
- if (chkLotNo.Checked == true)
- {
- if (string.IsNullOrEmpty(this.txtLOT_NO.Text))
- {
- MessageBox.Show("请输入生产批号后再执行查询操作!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- QueryMainPlan.LotNo = this.txtLOT_NO.Text;
- }
- else
- {
- QueryMainPlan.LotNo = "";
- }
- dtHotCheck.Clear();
- dtPlan.Clear();
- QueryMainPlan.PlineCode = PlineCod;
- QueryMainPlan.Status = PlanStatusQuery;
- QueryMainPlan.StartStatus = PlanStartStatusQuery;
- //查询计划记录
- DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.getSingleMainPlan", new object[] { QueryMainPlan, 6, HotFlag }, this.ob);
- if (dt.Rows.Count == 0)
- {
- if (ShowMessageFlag == 0)
- {
- MessageBox.Show("未查询到匹配的数据,请重新查询!", "提示:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- return;
- }
- GridHelper.CopyDataToDatatable(ref dt, ref dtPlan, true);
- if (ugr != null)
- {
- foreach (UltraGridRow ugr1 in ultraGridPlan.Rows)
- {
- //ugr1.Cells["JUDGE_NO"].Value = BaseMethod.getJudgeStoveNo(ugr1.Cells["JUDGE_STOVE_NO"].Value.ToString());
- if (ugr1.Cells["JUDGE_STOVE_NO"].Value.ToString() == PrimaKey)
- {
- ugr1.Activated = true;
- }
- }
- }
- ChangeGridColor();
- }
- /// <summary>
- /// 查询结果Gird单击事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGridPlan_AfterRowActivate(object sender, EventArgs e)
- {
- dtMatSeq.Clear();
- dtHotCheck.Clear();
- if (this.dtPlan.Rows.Count > 0)
- {
- actugr = ultraGridPlan.ActiveRow;
- UltraGridRow ugr = ultraGridPlan.ActiveRow;
- if (ugr != null)
- {
- //查询主计划信息
- dtMatSeq.Clear();
- string JudgeStoveNo = ugr.Cells["JUDGE_STOVE_NO"].Value.ToString();
- ActiveJUDGE_STOVE_NO = JudgeStoveNo;
- ActiveResultNo = ugr.Cells["ID"].Value.ToString();
- proPlanId = ugr.Cells["PRO_PLAN_ID"].Value.ToString();
- gxPlanNo = ugr.Cells["GX_PLAN_NO"].Value.ToString();
- MainPlan.JudgeStoveNo = JudgeStoveNo;
- MainPlan.ProPlanId = proPlanId;
- MainPlan.GxPlanNo = gxPlanNo;
- string Status = ugr.Cells["HOT_CHECK_FLAG"].Value.ToString();
- ActiveStatus = Status;
- string ColShift = "";
- string ColGroup = "";
- // PLineCode = ugr.Cells["Pline_Code"].Value.ToString();
- DataTable dtMP = ServerHelper.GetData("com.steering.mes.zgmil.coup.FeedSawResult.getSingleMainPlanForHeatNo", new object[] { MainPlan }, this.ob);
- if (dtMP.Rows.Count > 0)
- {
- PLineCode = dtMP.Rows[0]["PLINE_CODE"].ToString();
- GridEdit(dtMP); //轧制计划信息
- //查询流通卡信息
- DataTable dtRollingCard = new DataTable();
- if (PlineCod.Equals("C009") || PlineCod.Equals("C012") || PlineCod.Equals("C017"))
- {
- dtRollingCard = ServerHelper.GetData("com.steering.mes.zgmil.coup.FeedSawResult.getRollingCard1", new object[] { JudgeStoveNo, proPlanId, gxPlanNo }, this.ob);
- }
- else
- {
- dtRollingCard = ServerHelper.GetData("com.steering.mes.zgmil.coup.FeedSawResult.getRollingCard", new object[] { JudgeStoveNo, proPlanId, gxPlanNo }, this.ob);
- }
- if (dtRollingCard.Rows.Count > 0)
- {
- RollingCardEditGrid(dtRollingCard, JudgeStoveNo);
- }
- else
- {
- //清空流通卡值
- rollingCard1.Value.Clear();
- GridHelper.InitCardGrid(rollingCard1.RollCardDataSource1, rollingCard1.UltraGrid4);
- }
- //查询热取样实绩信息
- if (!chkStatusQuery.Checked)
- {
- ColShift = Shift;
- ColGroup = Group;
- }
- DataTable dtHotResult = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.CheckHotCheckDetail", new object[] { JudgeStoveNo, ActiveResultNo, ColShift, ColGroup }, this.ob);
- if (dtHotResult.Rows.Count > 0)
- {
- GridHelper.CopyDataToDatatable(ref dtHotResult, ref dtHotCheck, true);
- }
- else
- {
- }
- //查询主实绩区实绩
- DataTable dtMainResult = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.GetHotCheckMainResult", new object[] { JudgeStoveNo, ActiveResultNo }, this.ob);
- if (dtMainResult.Rows.Count > 0)
- {
- HotCheckMainResultEdit(dtMainResult);
- }
- else
- {
- }
- if (dtHotCheck.Rows.Count == 0)
- {
- AddHotCheckDetailInfo();
- }
- SetResultGray();
- ChangeGridColor();
- }
- }
- }
- }
- private void AddHotCheckDetailInfo()
- {
- DataRow newRow;
- DataRow newRow1;
- DataRow newRow2;
- newRow = dtHotCheck.NewRow();
- newRow1 = dtHotCheck.NewRow();
- newRow2 = dtHotCheck.NewRow();
- newRow["pipe_location"] = "管头";
- newRow1["pipe_location"] = "管体";
- newRow2["pipe_location"] = "管尾";
- dtHotCheck.Rows.Add(newRow);
- dtHotCheck.Rows.Add(newRow1);
- dtHotCheck.Rows.Add(newRow2);
- }
- /// <summary>
- /// 新增一组热取样详细数据
- /// </summary>
- private void ResultAdd()
- {
- if (actugr.Cells["HOT_CHECK_FLAG"].Value.ToString() == "已完成抽检")
- {
- MessageBox.Show("炉号【" + actugr.Cells["JUDGE_NO"].Value.ToString() + "】已取样完成不能新增");
- return;
- }
- AddHotCheckDetailInfo();
- ShowMessageFlag = 1;
- ResultSave();
- ShowMessageFlag = 0;
- PlanQuery();
- }
- /// <summary>
- /// 删除最后一组热取样数据
- /// </summary>
- private void ResultDelete()
- {
- if (actugr.Cells["HOT_CHECK_FLAG"].Value.ToString() == "已完成抽检")
- {
- MessageBox.Show("炉号【" + actugr.Cells["JUDGE_NO"].Value.ToString() + "】已取样完成不能删除");
- return;
- }
- if (dtHotCheck.Rows.Count > 3)
- {
- dtHotCheck.Rows.RemoveAt(dtHotCheck.Rows.Count - 1);
- dtHotCheck.Rows.RemoveAt(dtHotCheck.Rows.Count - 2);
- dtHotCheck.Rows.RemoveAt(dtHotCheck.Rows.Count - 3);
- }
- ShowMessageFlag = 1;
- ResultSave();
- ShowMessageFlag = 0;
- PlanQuery();
- }
- /// <summary>
- /// 保存
- /// </summary>
- public void ResultSave()
- {
-
- colHotCheck1.UltraGrid2.UpdateData();
- ultraGrid1.UpdateData();
- try
- {
- colHotCheck1.UltraGrid2.UpdateData();
- }
- catch (Exception e)
- {
- MessageBox.Show("请输入正确的时间。");
- return;
- }
- if (this.ultraGridPlan.ActiveRow == null)
- {
- return;
- }
- //保存主实绩信息
- MilHotCheckSave.Inspector = colHotCheck1.SizingDataSource1.Rows[0]["INSPECTOR"].ToString();
- MilHotCheckSave.DoubleB1 = colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B1"].ToString();
- MilHotCheckSave.DoubleB2 = colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B2"].ToString();
- MilHotCheckSave.DoubleB3 = colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B3"].ToString();
- MilHotCheckSave.DoubleB4 = colHotCheck1.SizingDataSource1.Rows[0]["DOUBLE_B4"].ToString();
- MilHotCheckSave.PassSeries1 = colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES1"].ToString();
- MilHotCheckSave.PassSeries2 = colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES2"].ToString();
- MilHotCheckSave.PassSeries3 = colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES3"].ToString();
- MilHotCheckSave.PassSeries4 = colHotCheck1.SizingDataSource1.Rows[0]["PASS_SERIES4"].ToString();
- MilHotCheckSave.StartTemp = colHotCheck1.SizingDataSource1.Rows[0]["START_TEMP"].ToString();
- MilHotCheckSave.EndTemp = colHotCheck1.SizingDataSource1.Rows[0]["END_TEMP"].ToString();
- MilHotCheckSave.Wallthick = colHotCheck1.SizingDataSource1.Rows[0]["WALLTHICK"].ToString();
- MilHotCheckSave.Outdiameter = colHotCheck1.SizingDataSource1.Rows[0]["OUTDIAMETER"].ToString();
- CutHead = colHotCheck1.SizingDataSource1.Rows[0]["CUT_HEAD"].ToString();
- CutOrder = colHotCheck1.SizingDataSource1.Rows[0]["CUT_ORDER"].ToString();
- CutTrail = colHotCheck1.SizingDataSource1.Rows[0]["CUT_TRAIL"].ToString();
- MilHotCheckSave.CheckDate = "sysdate";
- if (!string.IsNullOrEmpty(colHotCheck1.SizingDataSource1.Rows[0]["CHECK_DATE"].ToString()))
- {
- MilHotCheckSave.CheckDate = colHotCheck1.SizingDataSource1.Rows[0]["CHECK_DATE"].ToString();
- }
- MilHotCheckSave.Remark = colHotCheck1.SizingDataSource1.Rows[0]["REMARK"].ToString();
- MilHotCheckSave.ColGroup = UserInfo.GetUserGroup();
- MilHotCheckSave.ColShift = UserInfo.GetUserOrder();
- MilHotCheckSave.JudgeStoveNo = ActiveJUDGE_STOVE_NO;
- MilHotCheckSave.PlineCode = PLineCode;
- MilHotCheckSave.ResultNo = ActiveResultNo;
- int count = ServerHelper.SetData("com.steering.mes.zgmil.coup.FrmHotCheck.saveHotCheck", new object[] { MilHotCheckSave, CutHead, CutTrail, CutOrder }, this.ob);
- ArrayList ListEntity = new ArrayList();
- //保存抽检详细信息
- if (ultraGrid1.Rows.Count > 0)
- {
- for (int i = 0; i < ultraGrid1.Rows.Count; i++)
- {
- if (string.IsNullOrEmpty(ultraGrid1.Rows[i].Cells["pipe_location"].Value.ToString()))
- {
- MessageBox.Show("请选择管位置。");
- return;
- }
- MilHotCheckDetailEntity CheckDetailSave = new MilHotCheckDetailEntity();
- CheckDetailSave.JudgeStoveNo = ActiveJUDGE_STOVE_NO;
- CheckDetailSave.PassSeries = ultraGrid1.Rows[i].Cells["PASS_SERIES"].Value.ToString();
- CheckDetailSave.DoubleB = ultraGrid1.Rows[i].Cells["DOUBLE_B"].Value.ToString();
- CheckDetailSave.D1 = ultraGrid1.Rows[i].Cells["d1"].Value.ToString();
- CheckDetailSave.D2 = ultraGrid1.Rows[i].Cells["d2"].Value.ToString();
- CheckDetailSave.D3 = ultraGrid1.Rows[i].Cells["d3"].Value.ToString();
- CheckDetailSave.D4 = ultraGrid1.Rows[i].Cells["d4"].Value.ToString();
- CheckDetailSave.S1 = ultraGrid1.Rows[i].Cells["s1"].Value.ToString();
- CheckDetailSave.S2 = ultraGrid1.Rows[i].Cells["s2"].Value.ToString();
- CheckDetailSave.S3 = ultraGrid1.Rows[i].Cells["s3"].Value.ToString();
- CheckDetailSave.S4 = ultraGrid1.Rows[i].Cells["s4"].Value.ToString();
- CheckDetailSave.S5 = ultraGrid1.Rows[i].Cells["s5"].Value.ToString();
- CheckDetailSave.S6 = ultraGrid1.Rows[i].Cells["s6"].Value.ToString();
- CheckDetailSave.S7 = ultraGrid1.Rows[i].Cells["s7"].Value.ToString();
- CheckDetailSave.S8 = ultraGrid1.Rows[i].Cells["s8"].Value.ToString();
- CheckDetailSave.ColShift = Shift;
- CheckDetailSave.ColGroup = Group;
- CheckDetailSave.ColUser = _UserName;
- CheckDetailSave.ColTime = "sysdate";
- if (!string.IsNullOrEmpty(ultraGrid1.Rows[i].Cells["COL_TIME"].Value.ToString()))
- {
- CheckDetailSave.ColTime = ultraGrid1.Rows[i].Cells["COL_TIME"].Value.ToString();
-
- }
- string PipeLocation = "";
- if (ultraGrid1.Rows[i].Cells["pipe_location"].Value.ToString() == "1")
- {
- PipeLocation = "1";
- }
- else if (ultraGrid1.Rows[i].Cells["pipe_location"].Value.ToString() == "2")
- {
- PipeLocation = "2";
- }
- else if (ultraGrid1.Rows[i].Cells["pipe_location"].Value.ToString() == "0")
- {
- PipeLocation = "0";
- }
- else
- {
- switch (ultraGrid1.Rows[i].Cells["pipe_location"].Value.ToString())
- {
- case "管头":
- PipeLocation = "0";
- break;
- case "管体":
- PipeLocation = "1";
- break;
- case "管尾":
- PipeLocation = "2";
- break;
- }
- }
- CheckDetailSave.PipeLocation = PipeLocation;
- CheckDetailSave.ResultNo = ActiveResultNo;
- ListEntity.Add(CheckDetailSave);
- }
- }
- int count1 = ServerHelper.SetData("com.steering.mes.zgmil.coup.FrmHotCheck.saveHotCheckDetail", new object[] { ListEntity, ActiveJUDGE_STOVE_NO, ActiveResultNo,Shift,Group }, this.ob);
- if (ShowMessageFlag == 0)
- {
- MessageBox.Show("实绩保存成功");
- }
- CutHeadBefore = CutHead;
- CutOrderBefore = CutOrder;
- CutTrailBefore = CutTrail;
- ReFresh();
- }
- /// <summary>
- /// 取样判定完成
- /// </summary>
- private void Node()
- {
- ShowMessageFlag = 1;
- ResultSave();
- ShowMessageFlag = 0;
- if (ActiveJUDGE_STOVE_NO == null)
- {
- MessageBox.Show("请选择需要热取样炉计划");
- return;
- }
- if (actugr.Cells["HOT_CHECK_FLAG"].Value.ToString() == "已完成抽检")
- {
- MessageBox.Show("炉号【" + actugr.Cells["JUDGE_NO"].Value.ToString() + "】已取样完成不能再次判定完成");
- return;
- }
- //查询是否存在该炉计划的取样实绩
- //DataTable dtHotResult = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.CheckHotCheckDetail", new object[] { ActiveJUDGE_STOVE_NO, ActiveResultNo }, this.ob);
- if (ultraGrid1.Rows.Count < 3)
- {
- MessageBox.Show("热取样实绩未录入完整,请完善后判定完成。");
- return;
- }
- int count = ServerHelper.SetData("com.steering.mes.zgmil.coup.FrmHotCheck.updateCheckFlag", new object[] { ActiveJUDGE_STOVE_NO, ActiveResultNo, "1" }, this.ob);
- MessageBox.Show("热取样完成");
- ReFresh();
- }
- /// <summary>
- /// 取样判定回退
- /// </summary>
- private void NodeBack()
- {
- if (ActiveJUDGE_STOVE_NO == null)
- {
- MessageBox.Show("请选择需要回退的热取样炉计划");
- return;
- }
- if (actugr.Cells["HOT_CHECK_FLAG"].Value.ToString() == "未完成抽检")
- {
- MessageBox.Show("炉号【" + actugr.Cells["JUDGE_NO"].Value.ToString() + "】未取样完成不能回退");
- return;
- }
- int count = ServerHelper.SetData("com.steering.mes.zgmil.coup.FrmHotCheck.updateCheckFlag", new object[] { ActiveJUDGE_STOVE_NO, ActiveResultNo, "0" }, this.ob);
- MessageBox.Show("热取样回退成功");
- ReFresh();
- }
- /// <summary>
- /// 点击添加热取样实绩
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGrid1_AfterRowInsert(object sender, RowEventArgs e)
- {
- valueList.SelectedIndex = 0;
- }
- /// <summary>
- /// 置灰切头、切尾、定尺录入
- /// </summary>
- private void SetResultGray()
- {
- //查询分切是否已经开始切头操作
- //DataTable dtPlan = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.getSawCutIsStart", new object[] { ActiveJUDGE_STOVE_NO, ActiveResultNo }, this.ob);
- //if (dtPlan.Rows.Count > 0)
- //{
- // if (!string.IsNullOrEmpty(dtPlan.Rows[0]["CUT_HEAD_LENGTH"].ToString()))
- // {
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_HEAD"].CellActivation = Activation.NoEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_TRAIL"].CellActivation = Activation.NoEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER"].CellActivation = Activation.NoEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_HEAD"].Header.Appearance.BackColor = Color.Gray;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_TRAIL"].Header.Appearance.BackColor = Color.Gray;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER"].Header.Appearance.BackColor = Color.Gray;
- // }
- // else
- // {
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_HEAD"].CellActivation = Activation.AllowEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_TRAIL"].CellActivation = Activation.AllowEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER"].CellActivation = Activation.NoEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_HEAD"].Header.Appearance.BackColor = Color.FromArgb(202, 222, 247);
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_TRAIL"].Header.Appearance.BackColor = Color.FromArgb(202, 222, 247);
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER"].Header.Appearance.BackColor = Color.Gray;
- // }
- //}
- //else
- //{
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_HEAD"].CellActivation = Activation.AllowEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_TRAIL"].CellActivation = Activation.AllowEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER"].CellActivation = Activation.AllowEdit;
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_HEAD"].Header.Appearance.BackColor = Color.FromArgb(202, 222, 247);
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_TRAIL"].Header.Appearance.BackColor = Color.FromArgb(202, 222, 247);
- // colHotCheck1.UltraGrid2.DisplayLayout.Bands[0].Columns["CUT_ORDER"].Header.Appearance.BackColor = Color.FromArgb(202, 222, 247);
- //}
- //已判定完成的炉次显示班次班组操作人
- if (actugr.Cells["HOT_CHECK_FLAG"].Value.ToString() == "已完成抽检")
- {
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_SHIFT_D"].Hidden = false;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_GROUP_D"].Hidden = false;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_USER"].Hidden = false;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_INFO"].Hidden = false;
- }
- else
- {
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_SHIFT_D"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_GROUP_D"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_USER"].Hidden = true;
- ultraGrid1.DisplayLayout.Bands[0].Columns["COL_INFO"].Hidden = true;
- }
- }
- #endregion
- #region 卡片赋值
- /// <summary>
- /// 轧制信息Grid赋值
- /// </summary>
- /// <param name="dt">轧制计划信息datatable</param>
- public void GridEdit(DataTable dt)
- {
- if (dt.Rows.Count > 0)
- {
- DataRow row1 = dt.Rows[0];
- //熔炼炉号
- this.rollingInfomation1.Value.StoveNo = row1["stove_no"].ToString();
- //炉号
- this.rollingInfomation1.Value.JudgeStoveNo = BaseMethod.getJudgeStoveNo(row1["judge_stove_no"].ToString());
- //生产批号
- this.rollingInfomation1.Value.LotNo = row1["lot_no"].ToString();
- //工序合同号
- this.rollingInfomation1.Value.ContractNo = row1["contract_no"].ToString();
- //执行工艺号
- this.rollingInfomation1.Value.ImpProcess = row1["imp_process"].ToString();
- //执行工艺号路径
- this.rollingInfomation1.Value.ImpProcessPath = row1["imp_process_path"].ToString();
- //产线代码
- this.rollingInfomation1.Value.PlineCode = row1["pline_code"].ToString();
- //状态
- this.rollingInfomation1.Value.Status = row1["STATUS"].ToString();
- //监制
- this.rollingInfomation1.Value.Producer = row1["producer"].ToString();
- //工艺状态
- this.rollingInfomation1.Value.ProcessStatus = row1["process_status"].ToString();
- //单倍长
- this.rollingInfomation1.Value.DbLength = row1["db_length"].ToString();
- //单倍重
- this.rollingInfomation1.Value.DbHeight = row1["db_height"].ToString();
- //轧制长度
- this.rollingInfomation1.Value.RollLength = row1["roll_length"].ToString();
- //分切数
- this.rollingInfomation1.Value.SawNum = row1["saw_num"].ToString();
- //目标长度
- this.rollingInfomation1.Value.TargetLength = row1["target_length"].ToString();
- //最终用户
- this.rollingInfomation1.Value.FinishUser = row1["finish_user"].ToString();
- //目标库
- this.rollingInfomation1.Value.TargetLiabrary = row1["target_liabrary"].ToString();
- //品种
- this.rollingInfomation1.Value.Varieties = row1["varieties"].ToString();
- //成品规格
- this.rollingInfomation1.Value.PipeSize = row1["pipe_size"].ToString();
- //扣型
- this.rollingInfomation1.Value.BuckleType = row1["buckle_type"].ToString();
- //长度范围
- this.rollingInfomation1.Value.LengthRange = row1["length_range"].ToString();
- //轧管判定标准
- this.rollingInfomation1.Value.RollStandrad = row1["roll_standrad"].ToString();
- //断面
- this.rollingInfomation1.Value.PipeSection = row1["pipe_section"].ToString();
- //钢种代码
- this.rollingInfomation1.Value.SteelCode = row1["steelcode"].ToString();
- //钢种名称
- this.rollingInfomation1.Value.SteelName = row1["steelname"].ToString();
- //钢级代码
- this.rollingInfomation1.Value.GradeCode = row1["gradecode"].ToString();
- //钢级名称
- this.rollingInfomation1.Value.GradeName = row1["gradename"].ToString();
- //炼钢判定标准
- this.rollingInfomation1.Value.SteelStandrad = row1["steel_standrad"].ToString();
- //去向
- this.rollingInfomation1.Value.Target = row1["target"].ToString();
- //支
- this.rollingInfomation1.Value.PlanNum = row1["BRANCH"].ToString();
- //吨
- this.rollingInfomation1.Value.PlanTon = row1["TON"].ToString();
- //切损去向
- this.rollingInfomation1.Value.CutTarget = row1["cut_target"].ToString();
- //切损长度
- this.rollingInfomation1.Value.CutLength = row1["cut_length"].ToString();
- //切损重量
- this.rollingInfomation1.Value.CutHeight = row1["CUT_WEIGHT"].ToString();
- //倍尺数
- this.rollingInfomation1.Value.DbNum = row1["DB_NUM"].ToString();
- //标准类别代码
- this.rollingInfomation1.Value.StdStyle = row1["STD_STYLE"].ToString();
- //标准类别描述
- this.rollingInfomation1.Value.StdStyleDesc = row1["STD_STYLE_DESC"].ToString();
- //成品备注
- this.rollingInfomation1.Value.ReMark = row1["ReMark"].ToString();
- this.rollingInfomation1.UpdateData();
- }
- }
- /// <summary>
- /// 流通卡赋值
- /// </summary>
- /// <param name="dt"></param>
- public void RollingCardEditGrid(DataTable dt, string heatno)
- {
- if (dt.Rows.Count > 0)
- {
- //上料切前剔除支数
- this.rollingCard1.Value.FeedScrapNum = dt.Rows[0]["SCRAP_FEED"].ToString();
- //上料切前合格支数
- this.rollingCard1.Value.FeedQualifiedNum = dt.Rows[0]["QUALIFIED_FEED"].ToString();
- //上料剔除支数
- this.rollingCard1.Value.FeedScrapDBNum = dt.Rows[0]["SCRAP_DBFEED"].ToString();
- //上料合格支数
- this.rollingCard1.Value.FeedQualifiedDBNum = dt.Rows[0]["QUALIFIED_DBFEED"].ToString();
- //加热炉剔除支数
- this.rollingCard1.Value.FurScrapNum = dt.Rows[0]["SCRAP_FUR"].ToString();
- //加热炉合格支数
- this.rollingCard1.Value.FurQualifiedNum = dt.Rows[0]["QUALIFIED_FUR"].ToString();
- //穿孔剔除支数
- this.rollingCard1.Value.PerScrapNum = dt.Rows[0]["SCRAP_PER"].ToString();
- //穿孔合格支数
- this.rollingCard1.Value.PerQualifiedNum = dt.Rows[0]["QUALIFIED_PER"].ToString();
- //连轧剔除支数
- this.rollingCard1.Value.RollingScrapNum = dt.Rows[0]["SCRAP_ROLLING"].ToString();
- //连轧合格支数
- this.rollingCard1.Value.RollingQualifiedNum = dt.Rows[0]["QUALIFIED_ROLLING"].ToString();
- //再加热炉剔除支数
- this.rollingCard1.Value.RefurScrapNum = dt.Rows[0]["SCRAP_REFUR"].ToString();
- //再加热炉合格支数
- this.rollingCard1.Value.RefurQualifiedNum = dt.Rows[0]["QUALIFIED_REFUR"].ToString();
- //定径剔除支数
- this.rollingCard1.Value.SizingScrapNum = dt.Rows[0]["SCRAP_SIZING"].ToString();
- //定径合格支数
- this.rollingCard1.Value.SizingQualifiedNum = dt.Rows[0]["QUALIFIED_SIZING"].ToString();
- //分切前剔除支数
- this.rollingCard1.Value.SawScrapNumBE = dt.Rows[0]["SCRAP_SAW_BE"].ToString();
- //分切前合格支数
- this.rollingCard1.Value.SawQualifiedNumBE = dt.Rows[0]["QUALIFIED_SAW_BE"].ToString();
- //分切剔除支数
- this.rollingCard1.Value.SawScrapNum = dt.Rows[0]["SCRAP_SAW"].ToString();
- //分切合格支数
- this.rollingCard1.Value.SawQualifiedNum = dt.Rows[0]["QUALIFIED_SAW"].ToString();
- //矫直剔除支数
- this.rollingCard1.Value.StraightScrapNum = dt.Rows[0]["SCRAP_STRAIGHT"].ToString();
- //矫直合格支数
- this.rollingCard1.Value.StraightQualifiedNum = dt.Rows[0]["QUALIFIED_STRAIGHT"].ToString();
- //矫直下线支数
- this.rollingCard1.Value.OfflineStraight = dt.Rows[0]["OFFLINE_STRAIGHT"].ToString();
- //探伤剔除支数
- this.rollingCard1.Value.TestingScrapNum = dt.Rows[0]["SCRAP_TESTING"].ToString();
- //探伤合格支数
- this.rollingCard1.Value.TestingQualifiedNum = dt.Rows[0]["QUALIFIED_TESTING"].ToString();
- NativeMethodNew na = new NativeMethodNew(this.ob);
- if (na.isBegineNode(heatno, 8) || na.isBegineNode(heatno, 9) || na.isBegineNode(heatno, 10))
- {
- //探伤下线支数
- this.rollingCard1.Value.OfflineTesting = dt.Rows[0]["OFFLINE_TESTING"].ToString();
- }
- else
- {
- if (dt.Rows[0]["OFFLINE_TESTING"].ToString() == "0")
- {
- this.rollingCard1.Value.OfflineTesting = "";
- }
- else
- {
- //探伤下线支数
- this.rollingCard1.Value.OfflineTesting = dt.Rows[0]["OFFLINE_TESTING"].ToString();
- }
- }
- //表检合格支数
- this.rollingCard1.Value.SurfaceQualifiedNum = dt.Rows[0]["QUALIFIED_BRANCH"].ToString();
- //表检废品支数
- this.rollingCard1.Value.SurfaceScrapNum = dt.Rows[0]["WASTE_QUANTITY"].ToString();
- //表检下线支数
- this.rollingCard1.Value.OfflineSurface = dt.Rows[0]["OFFLINE_QUANTITY"].ToString();
- //表检返线支数
- //this.rollingCard1.Value.SurfaceBackLineNum= dt.Rows[0]["OFFLINE_TESTING"].ToString();
- this.rollingCard1.UpdateData();
- }
- else
- {
- this.rollingCard1.ClearData();
- }
- }
- /// <summary>
- /// 热取样实绩赋值
- /// </summary>
- public void HotCheckMainResultEdit(DataTable dt)
- {
- if (dt.Rows.Count > 0)
- {
- DataRow row1 = dt.Rows[0];
- //抽检人
- this.colHotCheck1.Value.Inspector = row1["INSPECTOR"].ToString();
- //孔型系列1
- this.colHotCheck1.Value.PassSeries1 = row1["PASS_SERIES1"].ToString();
- //孔型系列2
- this.colHotCheck1.Value.PassSeries2 = row1["PASS_SERIES2"].ToString();
- //孔型系列3
- this.colHotCheck1.Value.PassSeries3 = row1["PASS_SERIES3"].ToString();
- //孔型系列4
- this.colHotCheck1.Value.PassSeries4 = row1["PASS_SERIES4"].ToString();
- //2B值1
- this.colHotCheck1.Value.DoubleB1 = row1["DOUBLE_B1"].ToString();
- //2B值2
- this.colHotCheck1.Value.DoubleB2 = row1["DOUBLE_B2"].ToString();
- //2B值3
- this.colHotCheck1.Value.DoubleB3 = row1["DOUBLE_B3"].ToString();
- //2B值4
- this.colHotCheck1.Value.DoubleB4 = row1["DOUBLE_B4"].ToString();
- //开轧温度
- this.colHotCheck1.Value.StartTemp = row1["START_TEMP"].ToString();
- //终轧温度
- this.colHotCheck1.Value.EndTemp = row1["END_TEMP"].ToString();
- //外径
- this.colHotCheck1.Value.Outdiameter = row1["OUTDIAMETER"].ToString();
- //壁厚
- this.colHotCheck1.Value.Wallthick = row1["WALLTHICK"].ToString();
- //抽检时间
- this.colHotCheck1.Value.CheckDate = row1["CHECK_DATE"].ToString();
- //计划切头长度
- this.colHotCheck1.Value.CutHeadP = row1["CUT_HEAD_LENGTHP"].ToString();
- //计划切尾长度
- this.colHotCheck1.Value.CutTrailP = row1["CUT_TRAIL_LENGTHP"].ToString();
- //计划切定尺长度
- this.colHotCheck1.Value.CutOrderP = row1["TARGET_LENGTH"].ToString();
- DataTable dtPlan = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.getSingleMainPlanNodeStatus", new object[] { ActiveJUDGE_STOVE_NO, ActiveResultNo }, this.ob);
- if (dtPlan.Rows.Count > 0)
- {
- if (int.Parse(dtPlan.Rows[0]["NODE_STATUS"].ToString()) < 61)
- {
- //切头长度
- if (!string.IsNullOrEmpty(row1["CUT_HEAD_LENGTHA"].ToString()))
- {
- this.colHotCheck1.Value.CutHead = row1["CUT_HEAD_LENGTHA"].ToString();
- }
- else
- {
- this.colHotCheck1.Value.CutHead = CutHeadBefore;
- }
- //切尾长度
- if (!string.IsNullOrEmpty(row1["CUT_TRAIL_LENGTHA"].ToString()))
- {
- this.colHotCheck1.Value.CutTrail = row1["CUT_TRAIL_LENGTHA"].ToString();
- }
- else
- {
- this.colHotCheck1.Value.CutTrail = CutTrailBefore;
- }
- //切定尺长度
- if (!string.IsNullOrEmpty(row1["ORDER_LENGTHA"].ToString()))
- {
- this.colHotCheck1.Value.CutOrder = row1["ORDER_LENGTHA"].ToString();
- }
- else
- {
- this.colHotCheck1.Value.CutOrder = CutOrderBefore;
- }
- }
- else
- {
- this.colHotCheck1.Value.CutHead = row1["CUT_HEAD_LENGTHA"].ToString();
- this.colHotCheck1.Value.CutTrail = row1["CUT_TRAIL_LENGTHA"].ToString();
- this.colHotCheck1.Value.CutOrder = row1["ORDER_LENGTHA"].ToString();
- }
- }
- //抽检员
- string Inspector = "";
- if (!string.IsNullOrEmpty(row1["INSPECTOR"].ToString()))
- {
- Inspector = row1["INSPECTOR"].ToString();
- }
- else
- {
- Inspector = _UserName;
- }
- this.colHotCheck1.Value.Inspector = Inspector;
- //备注
- this.colHotCheck1.Value.Remark = row1["REMARK"].ToString();
- this.colHotCheck1.UpdateDate();
- }
- }
- #endregion
- private void ultraGrid1_CellChange(object sender, CellEventArgs e)
- {
- if (e.Cell.Column.Key == "pipe_location")
- {
- //e.Cell.Row.Index
- ultraGrid1.UpdateData();
- IQueryable<UltraGridRow> urows = ultraGrid1.Rows.AsQueryable().Where(a => !a.Equals(e.Cell.Row));
- foreach (UltraGridRow ugr in urows)
- {
- if (ugr.Cells["pipe_location"].Text.ToString() == e.Cell.Text.ToString())
- {
- string PipeLocation = e.Cell.Value.ToString();
- switch (e.Cell.Value.ToString())
- {
- case "0":
- PipeLocation = "管头";
- break;
- case "1":
- PipeLocation = "管体";
- break;
- case "2":
- PipeLocation = "管尾";
- break;
- }
- MessageBox.Show("管位置【" + PipeLocation + "】已添加不能重复添加。");
- dtHotCheck.Rows.RemoveAt(e.Cell.Row.Index);
- return;
- }
- }
- }
- }
- /// <summary>
- /// 打印报表
- /// </summary>
- private void PrintResult()
- {
- Group = UserInfo.GetUserGroup();
- Shift = UserInfo.GetUserOrder();
- DateTime SeverTime = NativeMethod.GetSeverTime(this.ob);
- string Time = SeverTime.ToLongTimeString();
- string StartTime = ""; // 开始时间 用于报表查询
- string EndTime = ""; // 结束时间 用于报表查询
- string strurl = "";
- //晚班
- Time = Time.Replace(":", "");
- if (Shift == "3")
- {
- //查询晚班前一天20点40后到当天07点20前所有记录
- if (int.Parse(Time) < 072000)
- {
- StartTime = SeverTime.AddDays(-1).ToShortDateString() + " 20:40:00";
- EndTime = SeverTime.ToShortDateString() + " 07:20:00";
- //string Date2 = SeverTime.ToString("yyyy-MM-dd");
- }
- //查询当天晚班的所有数据
- else if (int.Parse(Time) > 204000)
- {
- StartTime = SeverTime.ToShortDateString() + " 20:40:00";
- EndTime = SeverTime.AddDays(1).ToShortDateString() + " 07:20:00";
- }
- }
- //白班 中班
- else
- {
- StartTime = SeverTime.ToShortDateString() + " 00:00:00";
- EndTime = SeverTime.AddDays(1).ToShortDateString() + " 00:00:00";
- }
- switch (PLineCode)
- {
- case "C008": //250
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality250.cpt&format=pdf&SHIFT=" + Shift + "&GROUP=" + Group + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + _UserID;
- break;
- case "C009": //258
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality258.cpt&format=pdf&SHIFT=" + Shift + "&GROUP=" + Group + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + _UserID;
- break;
- case "C010": //168
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality168.cpt&format=pdf&SHIFT=" + Shift + "&GROUP=" + Group + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + _UserID;
- break;
- case "C012": //Arssel
- break;
- case "C017": //460
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality460.cpt&format=pdf&SHIFT=" + Shift + "&GROUP=" + Group + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + _UserID;
- break;
- }
- FrmRepExcel fre = new FrmRepExcel(ob, strurl);
- fre.AutoSize = true;
- fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fre.WindowState = FormWindowState.Maximized;
- fre.Show();
- }
- /// <summary>
- /// 查询上个班原始记录
- /// </summary>
- private void QueryBefore()
- {
- HOTMethod hm = new HOTMethod(this.ob);
- DateTime SeverTime = NativeMethod.GetSeverTime(this.ob);
- string Time = SeverTime.ToLongTimeString();
- string Date = "";
- if (Shift == "3")
- {
- Time = Time.Replace(":", "");
- if (int.Parse(Time) < 122000)
- {
- Date = SeverTime.AddDays(-1).ToString("yyyyMMdd");
- }
- else
- {
- Date = SeverTime.ToString("yyyyMMdd");
- }
- }
- if (Shift == "1" || Shift == "0")
- {
- Date = SeverTime.AddDays(-1).ToString("yyyyMMdd");
- }
- else
- {
- Date = SeverTime.ToString("yyyyMMdd");
- }
- string StartTime = ""; // 开始时间 用于报表查询
- string EndTime = ""; // 结束时间 用于报表查询
- string StartTimeU = ""; // 开始时间 用于得到上班UserID
- string EndTimeU = ""; // 结束时间 用于得到上班UserID
- string strurl = "";
- string ShitGroupBefore = HOTMethod.GetShiftBefore(Shift, Group, Date, PLineCode);
- //if (PlineCode.Equals("C072"))
- //{
- // ShitGroupBefore = HOTMethod.GetShiftBefore(Shift, Group, Date);
- //}
- //else
- //{
- // ShitGroupBefore = HOTMethod.GetShiftBefore(Shift, Group);
- //}
- string UserIDBefore = "";
- //晚班
- Time = Time.Replace(":", "");
- if (Shift == "3")
- {
- //查询晚班前一天中班所有记录
- if (int.Parse(Time) < 122000)
- {
- StartTime = SeverTime.AddDays(-1).ToShortDateString() + " 13:40:00";
- EndTime = SeverTime.ToShortDateString() + " 00:00:00";
- //string Date2 = SeverTime.ToString("yyyy-MM-dd");
- StartTimeU = SeverTime.AddDays(-1).ToShortDateString() + " 13:40:00";
- EndTimeU = SeverTime.ToShortDateString() + " 00:00:00";
- UserIDBefore = hm.GetUserIDBefore(StartTimeU, EndTimeU, ShitGroupBefore.Substring(0, 1), ShitGroupBefore.Substring(1, 1), 10, PLineCode);
- //strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilPerforation.cpt&SHIFT=" + ShitGroupBefore.Substring(0, 1) + "&GROUP=" + ShitGroupBefore.Substring(1, 1) + "&DATE=" + StartTime + "&PLINECODE=" + PlineCode + "&DATE2=" + EndTime + "&USERID=" + UserIDBefore;
- }
- //查询当天中班的所有数据
- else if (int.Parse(Time) > 204000)
- {
- StartTime = SeverTime.ToShortDateString() + " 13:40:00";
- EndTime = SeverTime.AddDays(1).ToShortDateString() + " 00:00:00";
- StartTimeU = SeverTime.ToShortDateString() + " 13:40:00";
- EndTimeU = SeverTime.AddDays(1).ToShortDateString() + " 00:00:00";
- UserIDBefore = hm.GetUserIDBefore(StartTimeU, EndTimeU, ShitGroupBefore.Substring(0, 1), ShitGroupBefore.Substring(1, 1), 10, PLineCode);
- //strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilPerforation.cpt&SHIFT=" + ShitGroupBefore.Substring(0, 1) + "&GROUP=" + ShitGroupBefore.Substring(1, 1) + "&DATE=" + StartTime + "&PLINECODE=" + PlineCode + "&DATE2=" + EndTime + "&USERID=" + UserIDBefore;
- }
- }
- //白班
- else if (Shift == "1")
- {
- StartTime = SeverTime.AddDays(-1).ToShortDateString() + " 12:00:00";
- EndTime = SeverTime.AddDays(0).ToShortDateString() + " 12:00:00";
- StartTimeU = SeverTime.AddDays(-1).ToShortDateString() + " 12:00:00";
- EndTimeU = SeverTime.AddDays(0).ToShortDateString() + " 12:00:00";
- UserIDBefore = hm.GetUserIDBefore(StartTimeU, EndTimeU, ShitGroupBefore.Substring(0, 1), ShitGroupBefore.Substring(1, 1), 10, PLineCode);
- }
- //中班
- else
- {
- StartTime = SeverTime.ToShortDateString() + " 00:00:00";
- EndTime = SeverTime.AddDays(1).ToShortDateString() + " 00:00:00";
- StartTimeU = SeverTime.ToShortDateString() + " 00:00:00";
- EndTimeU = SeverTime.AddDays(1).ToShortDateString() + " 00:00:00";
- UserIDBefore = hm.GetUserIDBefore(StartTimeU, EndTimeU, ShitGroupBefore.Substring(0, 1), ShitGroupBefore.Substring(1, 1), 10, PLineCode);
- //strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilPerforation.cpt&SHIFT=" + ShitGroupBefore.Substring(0, 1) + "&GROUP=" + ShitGroupBefore.Substring(1, 1) + "&DATE=" + StartTime + "&PLINECODE=" + PlineCode + "&DATE2=" + EndTime + "&USERID=" + UserIDBefore;
- }
- switch (PLineCode)
- {
- case "C008": //250
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality250.cpt&format=pdf&SHIFT=" + ShitGroupBefore.Substring(0, 1) + "&GROUP=" + ShitGroupBefore.Substring(1, 1) + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + UserIDBefore;
- break;
- case "C009": //258
- //晚班
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality258.cpt&format=pdf&SHIFT=" + ShitGroupBefore.Substring(0, 1) + "&GROUP=" + ShitGroupBefore.Substring(1, 1) + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + UserIDBefore;
- break;
- case "C010": //168
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality168.cpt&format=pdf&SHIFT=" + ShitGroupBefore.Substring(0, 1) + "&GROUP=" + ShitGroupBefore.Substring(1, 1) + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + UserIDBefore;
- break;
- case "C012": //Arssel
- break;
- case "C017": //460
- strurl = "http://172.54.10.42:8080/webroot/decision/view/report?viewlet=RepMilSamplingQuality460.cpt&format=pdf&SHIFT=" + ShitGroupBefore.Substring(0, 1) + "&GROUP=" + ShitGroupBefore.Substring(1, 1) + "&DATE=" + StartTime + "&PLINECODE=" + PLineCode + "&DATE2=" + EndTime + "&USERID=" + UserIDBefore;
- break;
- }
- FrmRepExcel fre = new FrmRepExcel(ob, strurl);
- fre.AutoSize = true;
- fre.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
- fre.WindowState = FormWindowState.Maximized;
- fre.Show();
- }
- private void ultraGrid1_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == (char)13)
- {
- }
- }
- private void ultraGrid1_KeyDown(object sender, KeyEventArgs e)
- {
- // if (e.Control & e.KeyCode == Keys.C)
- // {
- // //HotCheckCopyEntity.PipeLocation = ultraGrid1.ActiveRow.Cells["pipe_location"].Text.ToString();
- // HotCheckCopyEntity.D1 = ultraGrid1.ActiveRow.Cells["d1"].Value.ToString();
- // HotCheckCopyEntity.D2 = ultraGrid1.ActiveRow.Cells["d2"].Value.ToString();
- // HotCheckCopyEntity.D3 = ultraGrid1.ActiveRow.Cells["d3"].Value.ToString();
- // HotCheckCopyEntity.D4 = ultraGrid1.ActiveRow.Cells["d4"].Value.ToString();
- // HotCheckCopyEntity.S1 = ultraGrid1.ActiveRow.Cells["s1"].Value.ToString();
- // HotCheckCopyEntity.S2 = ultraGrid1.ActiveRow.Cells["s2"].Value.ToString();
- // HotCheckCopyEntity.S3 = ultraGrid1.ActiveRow.Cells["s3"].Value.ToString();
- // HotCheckCopyEntity.S4 = ultraGrid1.ActiveRow.Cells["s4"].Value.ToString();
- // HotCheckCopyEntity.S5 = ultraGrid1.ActiveRow.Cells["s5"].Value.ToString();
- // HotCheckCopyEntity.S6 = ultraGrid1.ActiveRow.Cells["s6"].Value.ToString();
- // HotCheckCopyEntity.S7 = ultraGrid1.ActiveRow.Cells["s7"].Value.ToString();
- // HotCheckCopyEntity.S8 = ultraGrid1.ActiveRow.Cells["s8"].Value.ToString();
- // CopyFlag = 1;
- // MessageBox.Show("复制成功!");
- // }
- // if (e.Control & e.KeyCode == Keys.V)
- // {
- // if (CopyFlag == 1)
- // {
- // int index = ultraGrid1.ActiveRow.Index;
- // //dtHotCheck.Rows[index]["pipe_location"] = HotCheckCopyEntity.PipeLocation;
- // dtHotCheck.Rows[index]["s1"] = HotCheckCopyEntity.S1;
- // dtHotCheck.Rows[index]["s2"] = HotCheckCopyEntity.S2;
- // dtHotCheck.Rows[index]["s3"] = HotCheckCopyEntity.S3;
- // dtHotCheck.Rows[index]["s4"] = HotCheckCopyEntity.S4;
- // dtHotCheck.Rows[index]["s5"] = HotCheckCopyEntity.S5;
- // dtHotCheck.Rows[index]["s6"] = HotCheckCopyEntity.S6;
- // dtHotCheck.Rows[index]["s7"] = HotCheckCopyEntity.S7;
- // dtHotCheck.Rows[index]["s8"] = HotCheckCopyEntity.S8;
- // dtHotCheck.Rows[index]["d1"] = HotCheckCopyEntity.D1;
- // dtHotCheck.Rows[index]["d2"] = HotCheckCopyEntity.D2;
- // dtHotCheck.Rows[index]["d3"] = HotCheckCopyEntity.D3;
- // dtHotCheck.Rows[index]["d4"] = HotCheckCopyEntity.D4;
- // //CopyFlag = 0;
- // }
- // }
- }
- }
- }
|