using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CY.BLL; using CY.Model; using CY.Infrastructure.Query; using CY.Infrastructure.Common; using CY.BLL.Sys; using System.Text; using CY.BLL.OA; using CY.BLL.EC; namespace CY.WebForm.Pages.business { public partial class DeliverPlanTimeEdit : BasePage { OA_DeliverPlanBLL oA_DeliverPlanBLL = null; public DeliverPlanTimeEdit() { oA_DeliverPlanBLL = new OA_DeliverPlanBLL(); } protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { this.HideKeyid.Value = Request["Keyid"].ToString2(); this.txtDelayTime.Value = Request["DelayTime"].ToString2(); } } catch (Exception ex) { PAGEHandleException(ex); Response.Clear(); Response.Write("-1"); } //Response.End(); } //提交事件 protected void btn_Submit_Config(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(this.HideKeyid.Value)) { JavaScript.MessageBox("没有订单id", this); } if (this.txtDelayTime.Value.ToDateTime2() == null) { JavaScript.MessageBox("请正确填写延迟完工时间", this); } string Keyid = this.HideKeyid.Value; DateTime DelayTime = this.txtDelayTime.Value.ToDateTime2().Value; var oA_DeliverPlan = oA_DeliverPlanBLL.GetModelByKeyid(Keyid.ToGuid2(),null,null); oA_DeliverPlan.DeliverTime = DelayTime; oA_DeliverPlan.Updater = CurrentUser.TrueMemberId; oA_DeliverPlan.LastUpdateTime = DateTime.Now; bool result = oA_DeliverPlanBLL.UpdateModel(oA_DeliverPlan); if (result) JavaScript.MessageBox("更新成功", this, true, true); else JavaScript.MessageBox("更新失败", this); } catch (Exception ex) { PAGEHandleException(ex); JavaScript.MessageBox("操作失败", this); } } } }