using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using com.hnshituo.pur.vo; using Core.Mes.Client.Comm.Tool; using CoreFS.CA06; namespace Pur.Pop_upWindow { public partial class frmPopOrgBudgetDetail : FrmBase { DateTime Qdt = new DateTime(); String StrOrgId = ""; public frmPopOrgBudgetDetail() { InitializeComponent(); } public frmPopOrgBudgetDetail(OpeBase Ob) { Qdt = DateTime.Now.AddMonths(1); this.ob = Ob; InitializeComponent(); } public frmPopOrgBudgetDetail(OpeBase Ob,DateTime dt,string orgId) { Qdt = dt; StrOrgId = orgId; this.ob = Ob; InitializeComponent(); } private void frmPopOrgBudgetDetail_Load(object sender, EventArgs e) { //可用预算 Q_time.Value = Qdt; loadBugetData(Qdt, StrOrgId); } private void loadBugetData(DateTime dt,string orgId) { String strorgId = orgId; String stryear = dt.Year.ToString(); String strmouth = dt.Month.ToString(); CoreResult re = this.GetJsonService().execute("com.hnshituo.pur.configure.service.ConfigureOrgBudgetService", "doQueryBudgetRemain", new object[] { strorgId, stryear, strmouth, "" }); if (re.Resultcode != 0) { txt_budgetCanUse.Value = 0; txt_budgetUsed.Value = 0; //return; } else { txt_budgetCanUse.Value = re.Resultmsg; txt_budgetUsed.Value = re.Resultdata.ToString(); } // CoreResult re1 = this.GetJsonService().execute("com.hnshituo.pur.configure.service.ConfigureOrgBudgetService", "doQueryBudgetAll", new object[] { strorgId, stryear, strmouth }); if (re1.Resultcode != 0) { txt_bugetAll.Value = 0; this.Text = re1.Resultmsg; //return; } else { txt_bugetAll.Value = re1.Resultmsg; this.Text = "部门预算查询(" + re1.Resultdata + ")"; } } private void ultraButton1_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(Q_time.Text.Trim())) { MessageUtil.ShowTips("请选择查询计划月份"); return; } loadBugetData(Convert.ToDateTime(Q_time.Value), StrOrgId); } } }