1.0
This commit is contained in:
@@ -1,28 +1,55 @@
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.App.Data;
|
||||
using Kingdee.BOS;
|
||||
using Kingdee.BOS.Core.DynamicForm;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.Core.List.PlugIn;
|
||||
using Kingdee.BOS.Core.Report.PlugIn;
|
||||
using Kingdee.BOS.Model.Report;
|
||||
using Kingdee.BOS.Orm.DataEntity;
|
||||
using Kingdee.BOS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace MonthlyProductionSchedule
|
||||
{
|
||||
[Description("生产计划表-点击事件"), HotUpdate]
|
||||
public class BarItemClickEventPlugIn : AbstractSysReportPlugIn
|
||||
{
|
||||
|
||||
public override void ButtonClick(ButtonClickEventArgs e)
|
||||
{
|
||||
|
||||
if (e.Key.EqualsIgnoreCase("FSaveDataButton"))
|
||||
{
|
||||
base.ButtonClick(e);
|
||||
var t = this.View.BillBusinessInfo;
|
||||
var reportModel = this.Model as SysReportModel; //简单帐表对应的Model
|
||||
|
||||
|
||||
this.View.ShowMessage("保存数据会覆盖历史数据,是否继续?", MessageBoxOptions.OKCancel, new Action<MessageBoxResult>(result =>
|
||||
{
|
||||
if (result == MessageBoxResult.OK)
|
||||
{
|
||||
var tableName = this.SysReportView.Model.DataSource.TableName;
|
||||
var para = new List<SqlParam>();
|
||||
|
||||
var year = reportModel.DataObject["DataHoldYear"].Long2Int();
|
||||
var month = reportModel.DataObject["DataHoldMonth"].Long2Int();
|
||||
|
||||
para.Add(new SqlParam("@tableName", KDDbType.String, tableName));
|
||||
para.Add(new SqlParam("@FRECORDDATE", KDDbType.DateTime, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
|
||||
para.Add(new SqlParam("@FRECORDYEAR", KDDbType.Int64, year));
|
||||
para.Add(new SqlParam("@FRECORDMONTH", KDDbType.Int64, month));
|
||||
|
||||
var res = DBUtils.ExecuteStoreProcedure(this.Context, "PROC_PPL_SaveCurrentData", para);
|
||||
|
||||
reportModel.DataObject["DataBDStatu"] = 1;
|
||||
}
|
||||
}));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user