frmExamineShowNew.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Windows.Forms;
  10. using com.hnshituo.pur.vo;
  11. using Core.Mes.Client.Comm.Tool;
  12. using CoreFS.CA06;
  13. using Pur.Entity;
  14. namespace Pur.Pop_upWindow
  15. {
  16. public partial class frmExamineShowNew : FrmPmsBase
  17. {
  18. private ArrayList list;
  19. public string tips = "0";
  20. public string isAudit = "";
  21. public string type = "pur";//"pur":采购,order:合同,req:需求
  22. public frmExamineShowNew()
  23. {
  24. InitializeComponent();
  25. }
  26. public frmExamineShowNew(ArrayList listM,OpeBase OB,string strType)
  27. {
  28. InitializeComponent();
  29. this.ob = OB;
  30. this.list = listM;
  31. this.type = strType;
  32. }
  33. private void frmExamineShowNew_Load(object sender, EventArgs e)
  34. {
  35. //加载数据
  36. }
  37. /// <summary>
  38. /// 状态 1:不通过2:通过
  39. /// </summary>
  40. private void button2_Click(object sender, EventArgs e)
  41. {
  42. tips = "0";
  43. this.Close();
  44. }
  45. private void button1_Click(object sender, EventArgs e)
  46. {
  47. if (textBox1.Text.Trim() == "" && radioButton1.Checked == false)
  48. {
  49. MessageUtil.ShowTips("请输入审批意见");
  50. return;
  51. }
  52. else
  53. {
  54. if (radioButton1.Checked)
  55. {
  56. isAudit = "2";//审批通过
  57. }
  58. else if (radioButton2.Checked)
  59. {
  60. isAudit = "1";//审批不通过
  61. }
  62. String auditMessage = textBox1.Text.ToString().Trim();
  63. CoreResult rt = new CoreResult();
  64. if (type == "pur")
  65. {
  66. rt = this.execute<CoreResult>("com.hnshituo.pur.purplan.service.PurPlanMService", "doAudit", new object[] { list, isAudit, auditMessage });
  67. }
  68. else if (type == "order")
  69. {
  70. rt = this.execute<CoreResult>("com.hnshituo.pur.order.service.OrderMService", "doAudit", new object[] { list, isAudit, auditMessage });
  71. }
  72. else if (type == "req")
  73. {
  74. rt = this.execute<CoreResult>("com.hnshituo.pur.purplan.service.PurPlanMService", "doAudit", new object[] { list, isAudit, auditMessage });
  75. }
  76. else
  77. {
  78. tips = "1";
  79. MessageUtil.ShowTips("未知审批类型参数!");
  80. this.Close();
  81. }
  82. if (rt.Resultcode == 0)
  83. {
  84. tips = "1";
  85. MessageUtil.ShowTips("审批成功!");
  86. this.Close();
  87. }
  88. else
  89. {
  90. MessageUtil.ShowTips("操作失败:"+rt.Resultmsg);
  91. tips = "0";
  92. }
  93. }
  94. }
  95. }
  96. }