53 lines
1.8 KiB
C#
53 lines
1.8 KiB
C#
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
|
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
|
using Kingdee.BOS.Core.List;
|
|
using Kingdee.BOS.Util;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Kingdee.BOS.ServiceHelper;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace GZ_LTHPilot_ORDER.SAL_OUTSTOCK
|
|
{
|
|
[Description("动态窗口插件:选择日期批量更新销售出库单顺丰发货日期#列表插件"), HotUpdate]
|
|
public class ListSFDateForm : AbstractDynamicFormPlugIn
|
|
{
|
|
string ListFidS;
|
|
public override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
//接受传输的值
|
|
ListFidS = Convert.ToString(this.View.OpenParameter.GetCustomParameter("EntryPrimaryKeys"));
|
|
}
|
|
public override void BarItemClick(BarItemClickEventArgs e)
|
|
{
|
|
base.BarItemClick(e);
|
|
if (e.BarItemKey.EqualsIgnoreCase("VRYF_tbButton"))
|
|
{
|
|
var Date = this.View.Model.GetValue("F_VRYF_Date_qtr");
|
|
string sql = string.Format(@"
|
|
update T_SAL_OUTSTOCK
|
|
SET F_SFSignatureTime = '{1}'
|
|
WHERE FID IN ({0})
|
|
", ListFidS, Date);
|
|
var result = DBServiceHelper.ExecuteDynamicObject(this.Context, sql.ToString(), null, null, CommandType.Text, null);
|
|
this.View.ShowMessage("更新成功");
|
|
}
|
|
}
|
|
public override void BeforeClosed(BeforeClosedEventArgs e)
|
|
{
|
|
base.BeforeClosed(e);
|
|
var parentView = this.View.ParentFormView as IListView;
|
|
if (parentView == null)
|
|
{
|
|
return;
|
|
}
|
|
parentView.Refresh();
|
|
}
|
|
}
|
|
}
|