frmBaseReback.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Core.Mes.Client.Comm.Server;
  2. using Core.Mes.Client.Comm.Tool;
  3. using Core.StlMes.Client.PnCost.Models;
  4. using CoreFS.CA06;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.ComponentModel;
  8. using System.Data;
  9. using System.Drawing;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Windows.Forms;
  13. namespace Core.StlMes.Client.PnCost
  14. {
  15. public partial class frmBaseReback : FrmBase
  16. {
  17. private DataTable dt;
  18. public frmBaseReback()
  19. {
  20. InitializeComponent();
  21. }
  22. private void frmBaseReback_Load(object sender, EventArgs e)
  23. {
  24. EntityHelper.ShowGridCaption<CostBasePlineRebackEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  25. dt = ServerHelper.GetData("com.steering.pss.pncost.base.ComBasePlineReback.query",
  26. new object[] { }, ob);
  27. costBasePlineRebackEntityBindingSource.DataSource = dt;
  28. if (ultraGrid1.Rows.Count == 0)
  29. {
  30. return;
  31. }
  32. for (int i = 0; i < ultraGrid1.Rows.Count; i++)
  33. {
  34. for (int x = 0; x < ultraGrid1.Rows[i].Cells.Count; x++)
  35. {
  36. var items = dt.Rows.Cast<DataRow>().GroupBy(a => new { itemCode = a["ITEM_CODE"].ToString(), itemName = a["ITEM_NAME"].ToString() })
  37. .Select(a => a.Key).ToList();
  38. for (int j = 0; j < items.Count; j++)
  39. {
  40. ultraGrid1.Rows[i].Cells["Percent1"].Hidden = true;
  41. }
  42. }
  43. }
  44. }
  45. #region 方法
  46. public override void ToolBar_Click(object sender, string ToolbarKey)
  47. {
  48. base.ToolBar_Click(sender, ToolbarKey);
  49. switch (ToolbarKey)
  50. {
  51. case "Query":
  52. Query();
  53. break;
  54. case "Close":
  55. this.Close();
  56. break;
  57. }
  58. }
  59. /// 查询方法
  60. /// <summary>
  61. /// 查询方法
  62. /// </summary>
  63. private void Query()
  64. {
  65. }
  66. #endregion
  67. }
  68. }