using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.PnCost.Models; using CoreFS.CA06; 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; namespace Core.StlMes.Client.PnCost { public partial class frmBaseReback : FrmBase { private DataTable dt; public frmBaseReback() { InitializeComponent(); } private void frmBaseReback_Load(object sender, EventArgs e) { EntityHelper.ShowGridCaption(ultraGrid1.DisplayLayout.Bands[0]); dt = ServerHelper.GetData("com.steering.pss.pncost.base.ComBasePlineReback.query", new object[] { }, ob); costBasePlineRebackEntityBindingSource.DataSource = dt; if (ultraGrid1.Rows.Count == 0) { return; } for (int i = 0; i < ultraGrid1.Rows.Count; i++) { for (int x = 0; x < ultraGrid1.Rows[i].Cells.Count; x++) { var items = dt.Rows.Cast().GroupBy(a => new { itemCode = a["ITEM_CODE"].ToString(), itemName = a["ITEM_NAME"].ToString() }) .Select(a => a.Key).ToList(); for (int j = 0; j < items.Count; j++) { ultraGrid1.Rows[i].Cells["Percent1"].Hidden = true; } } } } #region 方法 public override void ToolBar_Click(object sender, string ToolbarKey) { base.ToolBar_Click(sender, ToolbarKey); switch (ToolbarKey) { case "Query": Query(); break; case "Close": this.Close(); break; } } /// 查询方法 /// /// 查询方法 /// private void Query() { } #endregion } }