frmPopOrgBudgetDetail.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 com.hnshituo.pur.vo;
  10. using Core.Mes.Client.Comm.Tool;
  11. using CoreFS.CA06;
  12. namespace Pur.Pop_upWindow
  13. {
  14. public partial class frmPopOrgBudgetDetail : FrmBase
  15. {
  16. DateTime Qdt = new DateTime();
  17. String StrOrgId = "";
  18. public frmPopOrgBudgetDetail()
  19. {
  20. InitializeComponent();
  21. }
  22. public frmPopOrgBudgetDetail(OpeBase Ob)
  23. {
  24. Qdt = DateTime.Now.AddMonths(1);
  25. this.ob = Ob;
  26. InitializeComponent();
  27. }
  28. public frmPopOrgBudgetDetail(OpeBase Ob,DateTime dt,string orgId)
  29. {
  30. Qdt = dt;
  31. StrOrgId = orgId;
  32. this.ob = Ob;
  33. InitializeComponent();
  34. }
  35. private void frmPopOrgBudgetDetail_Load(object sender, EventArgs e)
  36. {
  37. //可用预算
  38. Q_time.Value = Qdt;
  39. loadBugetData(Qdt, StrOrgId);
  40. }
  41. private void loadBugetData(DateTime dt,string orgId)
  42. {
  43. String strorgId = orgId;
  44. String stryear = dt.Year.ToString();
  45. String strmouth = dt.Month.ToString();
  46. CoreResult re = this.GetJsonService().execute<CoreResult>("com.hnshituo.pur.configure.service.ConfigureOrgBudgetService", "doQueryBudgetRemain", new object[] { strorgId, stryear, strmouth, "" });
  47. if (re.Resultcode != 0)
  48. {
  49. txt_budgetCanUse.Value = 0;
  50. txt_budgetUsed.Value = 0;
  51. //return;
  52. }
  53. else
  54. {
  55. txt_budgetCanUse.Value = re.Resultmsg;
  56. txt_budgetUsed.Value = re.Resultdata.ToString();
  57. }
  58. //
  59. CoreResult re1 = this.GetJsonService().execute<CoreResult>("com.hnshituo.pur.configure.service.ConfigureOrgBudgetService", "doQueryBudgetAll", new object[] { strorgId, stryear, strmouth });
  60. if (re1.Resultcode != 0)
  61. {
  62. txt_bugetAll.Value = 0;
  63. this.Text = re1.Resultmsg;
  64. //return;
  65. }
  66. else
  67. {
  68. txt_bugetAll.Value = re1.Resultmsg;
  69. this.Text = "部门预算查询(" + re1.Resultdata + ")";
  70. }
  71. }
  72. private void ultraButton1_Click(object sender, EventArgs e)
  73. {
  74. if (String.IsNullOrEmpty(Q_time.Text.Trim()))
  75. {
  76. MessageUtil.ShowTips("请选择查询计划月份");
  77. return;
  78. }
  79. loadBugetData(Convert.ToDateTime(Q_time.Value), StrOrgId);
  80. }
  81. }
  82. }