FrmJGInformation.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Tool;
  3. using Core.StlMes.Client.PlnSaleOrd.BaseMethod;
  4. using Core.StlMes.Client.PlnSaleOrd.报表.entity;
  5. using CoreFS.CA06;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.ComponentModel;
  9. using System.Data;
  10. using System.Drawing;
  11. using System.Linq;
  12. using System.Text;
  13. using System.Windows.Forms;
  14. namespace Core.StlMes.Client.PlnSaleOrd.报表
  15. {
  16. public partial class FrmJGInformation : FrmBase
  17. {
  18. public FrmJGInformation()
  19. {
  20. this.IsLoadUserView = true;
  21. InitializeComponent();
  22. }
  23. private void FrmJGInformation_Load(object sender, EventArgs e)
  24. {
  25. BaseHelper.InitCellPosition(ultraGridJG, new string[] { "NumJg", "MinD", "MinH", "AimlengthBl", "PlanNum", "Matchnum", "JgwtBlreq",
  26. "Outdiameter", "Wallthick" ,"Aimlength","JgblReqWeight","JgblReqNum","OrderQty","Orderweight","Ordernum"});
  27. BaseHelper.setOtherColumnReadOnly(ultraGridJG, new string[] { "CHC" });
  28. }
  29. public override void ToolBar_Click(object sender, string ToolbarKey)
  30. {
  31. base.ToolBar_Click(sender, ToolbarKey);
  32. switch (ToolbarKey)
  33. {
  34. case "Query"://查询
  35. Query();
  36. break;
  37. case "Export": //导出
  38. GridHelper.ulGridToExcel(ultraGridJG, "接箍合同综合信息");
  39. break;
  40. case "Close": //关闭
  41. this.Close();
  42. break;
  43. default:
  44. break;
  45. }
  46. }
  47. private void Query()
  48. {
  49. string rollMonth="";
  50. if (chcRollMonth.Checked && txtRollMonth.Value != null)
  51. {
  52. rollMonth = DateTime.Parse(txtRollMonth.Value.ToString()).ToString("yyyy-MM");
  53. }
  54. string orderNo = "";
  55. if (chcOrderNo.Checked)
  56. {
  57. orderNo = txtOrderNo.Text.Trim();
  58. }
  59. string orderStatus = "";
  60. if (chcOrderStatus.Checked && txtOrderStatus.Value != null)
  61. {
  62. orderStatus = txtOrderStatus.Value.ToString();
  63. }
  64. List<JGInformationEntity> listSource = EntityHelper.GetData<JGInformationEntity>
  65. ("com.steering.pss.plnsaleord.report.FrmJGInformation.queryJgInformation", new object[] { rollMonth, orderNo, orderStatus }, this.ob);
  66. jGInformationEntityBindingSource.DataSource = listSource;
  67. }
  68. private void chc_CheckedChanged(object sender, EventArgs e)
  69. {
  70. if (chcRollMonth.Checked) { txtRollMonth.ReadOnly = false; } else { txtRollMonth.ReadOnly = true; }
  71. if (chcOrderNo.Checked) { txtOrderNo.ReadOnly = false; } else { txtOrderNo.ReadOnly = true; }
  72. if (chcOrderStatus.Checked) { txtOrderStatus.ReadOnly = false; } else { txtOrderStatus.ReadOnly = true; }
  73. }
  74. }
  75. }