1
This commit is contained in:
56
SAL_OUTSTOCK/ListDateForm.cs
Normal file
56
SAL_OUTSTOCK/ListDateForm.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Util;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Util;
|
||||
using System.ComponentModel;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.ServiceHelper;
|
||||
using Kingdee.BOS.App.Data;
|
||||
using Kingdee.BOS.Core.List;
|
||||
using Kingdee.BOS.Core.List.PlugIn;
|
||||
using System.Data;
|
||||
|
||||
namespace GZ_LTHPilot_ORDER.SAL_OUTSTOCK
|
||||
{
|
||||
[Description("动态窗口插件:选择日期批量更新销售出库单列表插件"), HotUpdate]
|
||||
public class ListDateForm : 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_SigningTime = '{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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user