this.View.ShowMessage 在工具栏按钮事件后弹出确认模态窗口

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

this.View.ShowMessage 在工具栏按钮事件后弹出确认模态窗口

using System;
using Kingdee.BOS.Util;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.BOS.Core.Bill;
using Kingdee.BOS.ServiceHelper;
using Kingdee.BOS.Core.Bill.PlugIn;

namespace HANS.AP_Payable
{
    [Description("采购订单行明细金额超出采购订单金额是否放行")]
    [HotUpdate]
    public  class PayAbleLetPass: AbstractBillPlugIn
    {
        /// <summary>
        /// 操作是否放行
        /// </summary>
        /// <param name="e"></param>
        public override void AfterBarItemClick(AfterBarItemClickEventArgs e)
        {
            base.AfterBarItemClick(e);
            if(e.BarItemKey.Equals("HANS_tbWetherGo"))
            {
                DynamicObject obj = this.Model.DataObject;
                //单据内码
                string FID = Convert.ToString(obj["Id"]);
                this.View.ShowMessage("行明细金额超出采购订单金额" + ",是否放行?", MessageBoxOptions.YesNo,
                        new Action<MessageBoxResult>((result) => {

                            if (result == MessageBoxResult.Yes)
                            {
                                //页面赋值为真
                                this.Model.SetValue("F_HANS_WETHERGO", 1);
                                this.View.UpdateView("F_HANS_WETHERGO");
                                //修改数据库数据
                                string SQL = "/*dialect*/update T_AP_PAYABLE set F_HANS_WETHERGO=1 where FID=" + FID + "";
                                DBServiceHelper.Execute(this.Context, SQL);
                            }
                        }));
            }                                       
        }
    }
}


this.View.ShowMessage 在工具栏按钮事件后弹出确认模态窗口

using System;using Kingdee.BOS.Util;using System.Collections.Generic;using System.ComponentModel;using System.Linq;using System.Te...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息