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; using Pur.Entity; using Pur.Entity.pur_planEntity; namespace Pur.Pop_upWindow { public partial class frmPopTaskOfferDelay : FrmPmsBase { string strTaskId = ""; public string strTips = "0"; public frmPopTaskOfferDelay() { InitializeComponent(); } public frmPopTaskOfferDelay(OpeBase Ob,string TaskId) { InitializeComponent(); this.ob = Ob; this.strTaskId = TaskId; } private void frmPopTaskOfferDelay_Load(object sender, EventArgs e) { PurTaskMEntity ptm = this.execute("com.hnshituo.pur.purplan.service.TaskMService", "findById", new object[] { strTaskId }); ultDt_OFFER_TIME_END.Value = ptm.OfferTimeEnd;//报价结束时间 ultDt_OFFER_TIME_START.Value = ptm.OfferTimeStart;//报价开始时间 this.Text = "延长任务单【" + strTaskId + "】报价时间"; } private void btn_upd_Click(object sender, EventArgs e) { PurTaskMEntity m = new PurTaskMEntity(); m.TaskId = strTaskId; if ((DateTime)(ultDt_OFFER_TIME_END.Value) <= System.DateTime.Now) { MessageUtil.ShowTips("报价结束时间不能<=当前时间"); return; } if ((DateTime)(ultDt_OFFER_TIME_END.Value) <= (DateTime)(ultDt_OFFER_TIME_START.Value)) { MessageUtil.ShowTips("报价结束时间必须>=报价开始时间"); return; } m.OfferTimeStart = DateTime.Parse(ultDt_OFFER_TIME_START.Value.ToString()); m.OfferTimeEnd = DateTime.Parse(ultDt_OFFER_TIME_END.Value.ToString()); if (MessageUtil.ShowYesNoAndQuestion("确定延长报价时间?").Equals(DialogResult.No)) { return; } CoreResult crt = this.execute("com.hnshituo.pur.purplan.service.TaskMService", "doUpdate", new object[] { m}); if (crt.Resultcode != 0) { MessageUtil.ShowTips("操作失败 " + crt.Resultmsg); return; } MessageUtil.ShowTips("操作成功!"); strTips = "1"; this.Close(); } } }