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();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
SAL_OUTSTOCK/ListHWDate.cs
Normal file
49
SAL_OUTSTOCK/ListHWDate.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Kingdee.BOS.Core.Bill;
|
||||
using Kingdee.BOS.Core.DynamicForm;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.Core.List;
|
||||
using Kingdee.BOS.Core.List.PlugIn;
|
||||
using Kingdee.BOS.Core.Metadata;
|
||||
using Kingdee.BOS.Core.Permission;
|
||||
using Kingdee.BOS.Util;
|
||||
|
||||
namespace GZ_LTHPilot_ORDER.SAL_OUTSTOCK
|
||||
{
|
||||
[Description("销售出库单批量更新货物日期#字段列表插件:点击按钮显示动态表单"), HotUpdate]
|
||||
public class ListHWDate : AbstractListPlugIn
|
||||
{
|
||||
public override void BarItemClick(BarItemClickEventArgs e)
|
||||
{
|
||||
base.BarItemClick(e);
|
||||
if (e.BarItemKey.EqualsIgnoreCase("VRYF_tbButton_3"))
|
||||
{
|
||||
|
||||
//获取选中行
|
||||
var listView = this.View as IListView;
|
||||
var selectedRows = listView.SelectedRowsInfo;
|
||||
if (selectedRows == null || selectedRows.Count == 0)
|
||||
{
|
||||
this.View.ShowMessage("列表中的销售出库单没有被选中");
|
||||
return;
|
||||
}
|
||||
//获取销售出库单的FID主键信息
|
||||
var FIDPrimaryKeys = selectedRows.Select(n=>n.PrimaryKeyValue);
|
||||
var Params = string.Join(",",FIDPrimaryKeys);
|
||||
DynamicFormShowParameter parameter = new DynamicFormShowParameter();
|
||||
parameter.OpenStyle.ShowType = ShowType.Floating;
|
||||
//选择需要打开的窗体FID
|
||||
parameter.FormId = "VRYF_QDRQ";
|
||||
parameter.MultiSelect = false;
|
||||
//获取的FID以字符串发送到输出的窗体
|
||||
parameter.CustomComplexParams.Add("EntryPrimaryKeys",Params);
|
||||
this.View.ShowForm(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
47
SAL_OUTSTOCK/ListSFDate.cs
Normal file
47
SAL_OUTSTOCK/ListSFDate.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
using Kingdee.BOS.Core.DynamicForm;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.Core.List;
|
||||
using Kingdee.BOS.Core.List.PlugIn;
|
||||
using Kingdee.BOS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GZ_LTHPilot_ORDER.SAL_OUTSTOCK
|
||||
{
|
||||
[Description("销售出库单批量更新顺丰发货日期#字段列表插件:点击按钮显示动态表单"), HotUpdate]
|
||||
public class ListSFDate : AbstractListPlugIn {
|
||||
public override void BarItemClick(BarItemClickEventArgs e)
|
||||
{
|
||||
base.BarItemClick(e);
|
||||
if (e.BarItemKey.EqualsIgnoreCase("VRYF_tbButton_5"))
|
||||
{
|
||||
|
||||
//获取选中行
|
||||
var listView = this.View as IListView;
|
||||
var selectedRows = listView.SelectedRowsInfo;
|
||||
if (selectedRows == null || selectedRows.Count == 0)
|
||||
{
|
||||
this.View.ShowMessage("列表中的销售出库单没有被选中");
|
||||
return;
|
||||
}
|
||||
//获取销售出库单的FID主键信息
|
||||
var FIDPrimaryKeys = selectedRows.Select(n => n.PrimaryKeyValue);
|
||||
var Params = string.Join(",", FIDPrimaryKeys);
|
||||
DynamicFormShowParameter parameter = new DynamicFormShowParameter();
|
||||
parameter.OpenStyle.ShowType = ShowType.Floating;
|
||||
//选择需要打开的窗体FID
|
||||
parameter.FormId = "VRYF_SFDate";
|
||||
parameter.MultiSelect = false;
|
||||
//获取的FID以字符串发送到输出的窗体
|
||||
parameter.CustomComplexParams.Add("EntryPrimaryKeys", Params);
|
||||
this.View.ShowForm(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
52
SAL_OUTSTOCK/ListSFDateForm.cs
Normal file
52
SAL_OUTSTOCK/ListSFDateForm.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user