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.Tool;
using Infragistics.Win.UltraWinGrid;
using Core.Mes.Client.Comm.Format;
using System.Collections;
using Core.Mes.Client.Comm.Server;
namespace Core.StlMes.Client.SaleOrder
{
public partial class frmDesignLength : FrmBase
{
///
/// 合同行号
///
private String designKey;
public String DesignKey
{
get { return designKey; }
set { designKey = value; }
}
private OpeBase ob;
public OpeBase Ob
{
get { return ob; }
set { ob = value; }
}
public frmDesignLength(string designKey, OpeBase ob)
{
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
InitializeComponent();
this.designKey = designKey;
this.ob = ob;
}
private void frmDesignLength_Load(object sender, EventArgs e)
{
EntityHelper.ShowGridCaption(ultraGrid1.DisplayLayout.Bands[0]);
DoQuery();
setColumnReadOnly(ultraGrid1);
}
private void DoQuery()
{
///ordLnPk = "EFD0A935A9C94724BA60F7AA7C580619001";
List listSource = EntityHelper.GetData(
"com.steering.pss.sale.order.CoreDesignLength.getDesingLenth", new object[] { designKey }, ob);
slmOrdDesignLengthEntityBindingSource.DataSource = listSource;
}
///
/// 设置列只可读
///
/// UltraGrid
/// 列数组
private void setColumnReadOnly(UltraGrid ugr)
{
foreach (UltraGridColumn ugc in ugr.DisplayLayout.Bands[0].Columns)
{
if (!ugc.Key.Equals("CHC"))
{
ugc.CellActivation = Activation.ActivateOnly;
}
}
}
private void buttonCommit_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}