frmSendJXY.cs.svn-base 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using CoreFS.CA06;
  9. namespace Core.LgMes.Client.LgJobMgt
  10. {
  11. public partial class frmSendJXY : Form
  12. {
  13. public string strHeatNO = ""; //炉号
  14. public string strStationCode = ""; //岗位
  15. public string strDisposalTime = ""; //处理次数
  16. public string strSteelCode = ""; //牌号编码
  17. public string strSteel = ""; //牌号
  18. public string strFlowNo = ""; //流号
  19. public string strOptName = ""; //操作员
  20. public frmSendJXY()
  21. {
  22. InitializeComponent();
  23. }
  24. private void frmSendJXY_Load(object sender, EventArgs e)
  25. {
  26. txtHeatNo.Text = strHeatNO;
  27. txtSteel.Text = strSteel;
  28. if (strStationCode == "2" || strStationCode == "3")
  29. {
  30. cbbFlowNo.Items[0].DisplayText = "0流";
  31. cbbFlowNo.Items[1].DisplayText = "1流";
  32. cbbFlowNo.Items[2].DisplayText = "2流";
  33. cbbFlowNo.Items[3].DisplayText = "3流";
  34. cbbFlowNo.Items[4].DisplayText = "4流";
  35. }
  36. }
  37. private void btnSend_Click(object sender, EventArgs e)
  38. {
  39. if (strHeatNO == "" || cbbFlowNo.SelectedIndex==-1)
  40. {
  41. MessageBox.Show("请选择要发送金相指示的流号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  42. return;
  43. }
  44. if (strStationCode == "2" || strStationCode == "3")
  45. strFlowNo = Convert.ToString(Convert.ToInt32(cbbFlowNo.Value) - 1);
  46. else
  47. strFlowNo = cbbFlowNo.Value.ToString();
  48. object[] sArgs = new object[6];
  49. sArgs[0] = strHeatNO; //熔炼号
  50. sArgs[1] = strStationCode; //岗位
  51. sArgs[2] = strDisposalTime;//处理次数
  52. sArgs[3] = strSteelCode; //牌号
  53. sArgs[4] = strOptName; //操作员
  54. sArgs[5] = strFlowNo; //流号
  55. string strError = "";
  56. DialogResult result = DialogResult.No;
  57. result = MessageBox.Show(this, "确认要发送金相指示吗?", "提示", MessageBoxButtons.YesNo,
  58. MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
  59. if (result == DialogResult.Yes)
  60. {
  61. try
  62. {
  63. //hengxing
  64. //ClientCommon._RemotingHelp.ExecuteMethod("lgResMgt",
  65. // "Core.LgMes.Server.LgResMgt.LfsCollect",
  66. // "SendJXYZS", new object[] { sArgs }, out strError);
  67. if (strError != "")
  68. {
  69. MessageBox.Show("发送金相指示失败!\n" + strError, "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error);
  70. return;
  71. }
  72. else
  73. this.Close();
  74. }
  75. catch (System.Exception exp)
  76. {
  77. MessageBox.Show("发送金相指示失败!\n" + exp.ToString(), "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error);
  78. }
  79. }
  80. }
  81. private void btnNo_Click(object sender, EventArgs e)
  82. {
  83. this.Close();
  84. }
  85. }
  86. }