| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
-
- using System.Collections.Generic;
- using System.Linq;
- using com.steering.mes.mcp.entity;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Mcp.Control.Entity;
- using Core.StlMes.Client.Mcp.Control.Machining;
- namespace Core.StlMes.Client.Mcp.Control
- {
- public partial class BundingControl : MchControlBase
- {
- public BundingControl()
- {
- InitializeComponent();
- EntityHelper.ShowGridCaption<MchBundlingResultEntity>(ultraGrid1.DisplayLayout.Bands[0]);
- gx = "701312";
- Value = null;
- }
- protected override string ScrapCode { get { return ""; } }
- public MchBundlingResultEntity Value
- {
- get
- {
- var list =
- MchBundlingResultEntityBindingSource.DataSource as List<MchBundlingResultEntity>;
- return (list == null) || !list.Any() ? new MchBundlingResultEntity() : list.FirstOrDefault();
- }
- set
- {
- if (value == null)
- {
- MchBundlingResultEntityBindingSource.DataSource = new List<MchBundlingResultEntity>
- {
- new MchBundlingResultEntity()
- };
- ScrappedList = new List<MchBugDEntity>();
- }
- else
- {
- value.ProWt = comm.GetWeight1(PortHttBatchSampleResultEntitys, gx, (int)(value.ProNum ?? 0),
- (int)(PlnZyJgxCEntity.ProCount ?? 0));
- MchBundlingResultEntityBindingSource.DataSource = new List<MchBundlingResultEntity> { value.Clone() };
- if (_plineCode != Value.PlineCode)
- {
- Names = EntityHelper.GetData<HttSignatureEntity>(
- "com.steering.mes.mcp.heatTreatment.FrmHttCrackDetectResult.getHttSign",
- new object[] { Value.PlineCode, "10" }, Ob);
-
- name.DisplayMember = "UserName";
- name.ValueMember = "UserName";
- YdmBaseClass.SetComboItemHeight(name);
- _plineCode = Value.PlineCode;
- }
- name.DataSource = Names.Where(p => p.ColGroup == value.ProGroup).ToList();
- if (value.FailNum == 0)
- ScrappedList = new List<MchBugDEntity>();
- }
- }
- }
- private void ultraGrid1_CellChange_1(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- if (e.Cell.Column.Key == "BundingTypeCode")
- {
- e.Cell.Row.Cells["BundingTypeName"].Value = e.Cell.Text;
- }
- }
- }
- }
|