frmReportJl.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using System.Collections;
  11. using Core.Mes.Client.Comm.Control;
  12. using Pur.require_plan;
  13. namespace Pur.ck
  14. {
  15. public partial class frmReportJl : FrmBase
  16. {
  17. public frmReportJl()
  18. {
  19. InitializeComponent();
  20. }
  21. public override void ToolBar_Click(object sender, string ToolbarKey)
  22. {
  23. switch (ToolbarKey)
  24. {
  25. case "Query":
  26. {
  27. dataTable3.Rows.Clear();
  28. getJLData();
  29. }
  30. break;
  31. }
  32. }
  33. /// <summary>
  34. /// 获取计量数据
  35. /// </summary>
  36. private void getJLData()
  37. {
  38. this.Cursor = Cursors.WaitCursor;//等待
  39. Hashtable ht = new Hashtable();
  40. //ht.Add("orderno", "SH16090604001");//ugr.Cells["DELIVERYSUBLINESQE"].Value.ToString());
  41. //ht.Add("ordernos", new ArrayList());//ugr.Cells["DELIVERYSUBLINESQE"].Value.ToString());
  42. //ht.Add("carno", "津AG7061");
  43. //ht.Add("icno", "2E2568AE");
  44. if (chkMat.Checked)
  45. {
  46. ht.Add("materialcode", txtItemCode.Text);
  47. }
  48. if (chkSupp.Checked)
  49. {
  50. ht.Add("sourcecode", txtSuppcode.Text);
  51. }
  52. if (chkMatName.Checked)
  53. {
  54. ht.Add("materialname", txtItemName.Text);
  55. }
  56. if (chkSuppName.Checked)
  57. {
  58. ht.Add("sourcename", txtSuppName.Text);
  59. }
  60. if (chkOrderId.Checked)
  61. {
  62. ht.Add("orderno", txtOrderId.Text);
  63. }
  64. //ht.Add("sourcename", "葛洲坝兴业包头再生资源有限公司");
  65. //ht.Add("matchid", "42816062700050");
  66. ht.Add("suttletime", ((DateTime)txt_CreateTimeStart.Value));//净重时间开始
  67. ht.Add("taretime", ((DateTime)txt_CreateTimeEnd.Value));//净重时间结束
  68. DataTable dt = null;
  69. try
  70. {
  71. dt = this.GetJsonService().execute<DataTable>("com.hnshituo.pur.utils.service.UtilsService", "readData", new object[] { ht });
  72. }
  73. catch (System.Exception e)
  74. {
  75. MessageBox.Show(e.Message);
  76. }
  77. GridHelper.CopyDataToDatatable(dt, dataTable3, true);
  78. comm.RefreshAndAutoSizeExceptColumns(ultraGrid4);
  79. this.Cursor = Cursors.Default;//鼠标状态恢复正常
  80. }
  81. }
  82. }