| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- 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 Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Mcp.Control.Entity;
- using CoreFS.CA06;
- using Infragistics.Win.UltraWinEditors;
- using Infragistics.Win.UltraWinGrid;
- namespace Core.StlMes.Client.Mcp.Control.Common
- {
- public partial class FrmHttBase : FrmBase
- {
- public FrmHttBase()
- {
- InitializeComponent();
- // EntityHelper.ShowGridCaption<PlnZyRclCEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- /* commHelper.RefreshAndAutoSize(ultraGrid1);*/
- commHelper.setOtherColumnReadOnly(ultraGrid1, new string[] { });
- }
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
- EntityHelper.ShowGridCaption<PlnZyRclCEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- commHelper.RefreshAndAutoSize(ultraGrid1);
- ultraGrid1.DisplayLayout.Bands[0].Override.HeaderClickAction = HeaderClickAction.Select;
- /* commHelper.setOtherColumnReadOnly(ultraGrid1, new string[] { });*/
- }
- public string Gx { get; set; }
-
- /// <summary>
- /// 只显示主表数据
- /// </summary>
- public bool ShowMain { get; set; }
- public void Query(string[] PlineCodes)
- {
- var starts = "";
- var plnNo = "";
- var judgeStoveNo = "";
- var feedStoveNo = "";
- var start = contorlPlanStatus1.statusArr;
- if (chkPlnNo.Checked)
- if (string.IsNullOrEmpty(txtRollBatchId.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入炉次计划号!");
- return;
- }
- else
- {
- plnNo = txtRollBatchId.Text.Trim();
- start = new string[4] { "10", "20", "30", "40" };
- }
- if (chkJuNo.Checked)
- if (string.IsNullOrEmpty(txtZyBatchId.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入炉号!");
- return;
- }
- else
- {
- judgeStoveNo = txtZyBatchId.Text.Trim();
- start = new string[4] { "10", "20", "30", "40" };
- }
- if (chkFeedNo.Checked)
- if (string.IsNullOrEmpty(txtFeedNo.Text.Trim()))
- {
- MessageUtil.ShowTips("请输入上料炉号!");
- return;
- }
- else
- {
- feedStoveNo = txtFeedNo.Text.Trim();
- start = new string[4] { "10", "20", "30", "40" };
- }
- plnZyRclCEntityBindingSource.DataSource = EntityHelper.GetData<PlnZyRclCEntity>(
- "com.steering.mes.mcp.common.PlanService.getSingleRclPlan", new object[] { ShowMain, plnNo, judgeStoveNo,feedStoveNo, PlineCodes, start, Gx, ultraOptionSet2.Value.ToString2() }, ob);
-
- commHelper.RefreshAndAutoSize(ultraGrid1);
- }
- public PlnZyRclCEntity ActiveRow
- {
- get
- {
- if (ultraGrid1.ActiveRow == null) return null;
- return ultraGrid1.ActiveRow.ListObject as PlnZyRclCEntity;
- }
- }
- private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
- {
- PlnZyRclCEntity PlnZyRclCEntity = e.Row.ListObject as PlnZyRclCEntity;
- if (PlnZyRclCEntity == null) return;
- if (PlnZyRclCEntity.Planstatus == "20")
- {
- e.Row.Cells["Planstatus"].Appearance.BackColor = Color.LightGreen;
- }
- else if (PlnZyRclCEntity.Planstatus == "30" || PlnZyRclCEntity.Planstatus == "40")
- {
- e.Row.Cells["Planstatus"].Appearance.BackColor = Color.Red;
- e.Row.Appearance.BackColor = Color.LightGray;
- }
- if (PlnZyRclCEntity.ActCount > 0)
- {
- e.Row.Cells["ActCount"].Appearance.BackColor = Color.LightGreen;
- }
- if (!string.IsNullOrEmpty(PlnZyRclCEntity.CycleBatch))
- {
- e.Row.Cells["CycleBatch"].Appearance.BackColor = Color.Red;
- PlnZyRclCEntity.CycleBatch = "批号:" + PlnZyRclCEntity.CycleBatch + "不合,要求重新热处理";
- }
- }
- private void craftImg_EditorButtonClick(object sender, EditorButtonEventArgs e)
- {
- if(ActiveRow==null) return;
- var craftPath = YdmBaseClass.getQueryCraftNoRCL(ActiveRow.CraftFileNo, ActiveRow.CraftSeq.ToString3(),
- ob);
- if (e.Button.Key.ToLower().Equals("select"))
- {
- var down = new FormFileDown(ob, craftPath);
- down.CtrlFileDown1.Button3.Visible = false;
- down.ShowDialog();
- }
- }
- private void chkStarts_CheckedChanged(object sender, EventArgs e)
- {
- if (chkPlnNo.Checked) txtRollBatchId.Enabled = true;
- else txtRollBatchId.Enabled = false;
- if (chkJuNo.Checked) txtZyBatchId.Enabled = true;
- else txtZyBatchId.Enabled = false;
- if (chkFeedNo.Checked) txtFeedNo.Enabled = true;
- else txtFeedNo.Enabled = false;
- }
- private void uteCraft2_EditorButtonClick(object sender, EditorButtonEventArgs e)
- {
- if (ActiveRow==null) return;
-
- if (e.Button.Key.ToLower().Equals("select"))
- {
- var down = new FormFileDown(ob, "Qcm/CraftLv2/" + ActiveRow.OrderNoSeq + "/" + ActiveRow.SecCraftFileNo);
- down.CtrlFileDown1.Button3.Visible = false;
- down.ShowDialog();
- }
- }
-
- }
- }
|