| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Data;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.LgClassModel;
- using CoreFS.CA06;
- using Infragistics.Win;
- namespace Core.StlMes.Client.LgCommon
- {
- public partial class frmSetMaterialName : Form
- {
- private OpeBase ob;
- private List<CostBaseMetalTypeEntity> CostBaseMetalTypeEntityList;
- public frmSetMaterialName(string szWLM, string szLX, OpeBase ob)
- {
- InitializeComponent();
- this.m_szLX = szLX;
- this.ob = ob;
- this.label1.Text = "当前物料名:" + szWLM;
- ClsControlPack.SetUltraGridAppearance(this);
- ulgridMtrInfo.DisplayLayout.Override.RowSelectors = DefaultableBoolean.False;
- }
- private DataTable m_dtMain = null;
- private string m_szLX = "1";
- public bool bChange = false;
- // public string m_szWLMC = ""; //物料名称
- public string m_szWLBM = ""; //物料编码
- //public string m_szWLLX = ""; //物料类型
- private void frmSetMaterialName_Load(object sender, EventArgs e)
- {
- GetDataSource();
- }
- private void GetDataSource()
- {
- ClsControlPack.SetReadOnly(ulgridMtrInfo);
- EntityHelper.ShowGridCaption<CostBaseMetalTypeEntity>(ulgridMtrInfo.DisplayLayout.Bands[0]);
- string strMsg = "";
- bool bSuccess = false;
- CostBaseMetalTypeEntityList = EntityHelper.GetData<CostBaseMetalTypeEntity>(
- "Core.LgMes.Server.LgDeviceManager.StlAdditive.GetMaterialData", null, ob);
- costBaseMetalTypeEntityBindingSource.DataSource = CostBaseMetalTypeEntityList;
- ClsControlPack.RefreshAndAutoSize(ulgridMtrInfo);
- }
-
- private void rbFZL_Click(object sender, EventArgs e)
- {
-
- }
- private void rbHJ_Click(object sender, EventArgs e)
- {
- }
- private void btOK_Click(object sender, EventArgs e)
- {
- if (this.ulgridMtrInfo.ActiveRow != null)
- {
- var CostBaseMetalTypeEntity = ulgridMtrInfo.ActiveRow.ListObject as CostBaseMetalTypeEntity;
- if (CostBaseMetalTypeEntity == null) return;
- this.bChange = true;
- m_szWLBM = CostBaseMetalTypeEntity.ItemCode;
- }
- this.Close();
- }
- private void btReset_Click(object sender, EventArgs e)
- {
- try
- {
- this.bChange = true;
- m_szWLBM = "";
- /* m_szWLMC = "";
- m_szWLLX = "";*/
- this.Close();
- }
- catch { }
- }
- private void btClose_Click(object sender, EventArgs e)
- {
- this.Close();
- }
-
- private void rbWS_Click(object sender, EventArgs e)
- {
-
- }
- private void ulgridMtrInfo_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- if (e.Row != null && e.Row.Index > -1)
- {
- var CostBaseMetalTypeEntity = ulgridMtrInfo.ActiveRow.ListObject as CostBaseMetalTypeEntity;
- if (CostBaseMetalTypeEntity == null) return;
- this.bChange = true;
- m_szWLBM = CostBaseMetalTypeEntity.ItemCode;
- this.Close();
- }
- }
- }
- }
|