using System; using System.Collections; 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; using Pur.Entity; namespace Pur.Pop_upWindow { public partial class FrmPopCopyBudgetData : FrmPmsBase { public string Tips; private ArrayList list; public string isOrg="1"; public FrmPopCopyBudgetData() { InitializeComponent(); } public FrmPopCopyBudgetData(OpeBase Ob,ArrayList List) { InitializeComponent(); this.ob = Ob; this.list = List; } public FrmPopCopyBudgetData(OpeBase Ob, ArrayList List,String isOrg1) { InitializeComponent(); this.ob = Ob; this.list = List; this.isOrg = isOrg1; } private void FrmPopCopyBudgetData_Load(object sender, EventArgs e) { //初始化Tips Tips = "0"; //加载年选择事件 DataTable dt = new DataTable(); dt.Columns.Add("YEAR", Type.GetType("System.Int32")); for (int i = DateTime.Now.AddYears(-1).Year; i <= DateTime.Now.AddYears(3).Year; i++) dt.Rows.Add(new object[] { i }); txt_Year.DataSource = dt; txt_Year.ValueMember = "YEAR"; txt_Year.DisplayMember = "YEAR"; txt_Year.Value = DateTime.Now.Year.ToString(); if (isOrg == "0") { this.Text = "油卡充值标准复制"; lab_orgMsg.Text = "*源数据未维护充值标准的将自动过滤掉"; } //备注 txt_Text.Text = "copy data"; } private void btn_Sure_Click(object sender, EventArgs e) { if (txt_Year.Text == "") { MessageUtil.ShowTips("未指定年份"); txt_Year.Focus(); return; } CoreResult re =new CoreResult(); if (isOrg == "1") { re = this.execute("com.hnshituo.pur.configure.service.ConfigureOrgBudgetService", "doCopy", new object[] { list, txt_Year.Value, txt_Text.Text }); } else if (isOrg == "0") { re = this.execute("com.hnshituo.pur.requireplan.service.OilBudgetService", "doCopy", new object[] { list, txt_Year.Value, txt_Text.Text }); } else { MessageUtil.ShowTips("未知参数"); return; } if (re.Resultcode == 0) { MessageUtil.ShowTips("复制成功"); Tips = "1"; this.Close(); } else { if (MessageUtil.ShowYesNoAndQuestion("操作失败:" + re.Resultmsg) == DialogResult.Yes) { Tips = "0"; this.Close(); } } } private void btn_Cancel_Click(object sender, EventArgs e) { Tips = "0"; this.Close(); } } }