添加项目文件。
This commit is contained in:
45
UnPayableInStock/TUPISSQLFilterPlugIn.cs
Normal file
45
UnPayableInStock/TUPISSQLFilterPlugIn.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using Kingdee.BOS;
|
||||
using Kingdee.BOS.Core.CommonFilter;
|
||||
using Kingdee.BOS.Core.CommonFilter.PlugIn;
|
||||
using Kingdee.BOS.Core.DynamicForm;
|
||||
using Kingdee.BOS.Core.Log;
|
||||
using Kingdee.BOS.Core.Metadata;
|
||||
using Kingdee.BOS.Core.Metadata.EntityElement;
|
||||
using Kingdee.BOS.Core.Metadata.Expression.FuncDefine;
|
||||
using Kingdee.BOS.Core.Metadata.FieldElement;
|
||||
using Kingdee.BOS.Core.Objects;
|
||||
using Kingdee.BOS.Core.Permission;
|
||||
using Kingdee.BOS.Core.ReportFilter;
|
||||
using Kingdee.BOS.Core.SqlBuilder;
|
||||
using Kingdee.BOS.Model.ReportFilter;
|
||||
using Kingdee.BOS.Orm.DataEntity;
|
||||
using Kingdee.BOS.Orm.Metadata.DataEntity;
|
||||
using Kingdee.BOS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace UnPayableInStock
|
||||
{
|
||||
[HotUpdate,Description("无关联应付单的采购入库单的过滤条件默认值设置")]
|
||||
public class TUPISSQLFilterPlugIn : AbstractCommonFilterPlugIn
|
||||
{
|
||||
public override void BeforeBindData(EventArgs e)
|
||||
{
|
||||
base.BeforeBindData(e);
|
||||
var sqlModel = this.Model as SQLReportFilterModel;
|
||||
if (sqlModel == null)
|
||||
return;
|
||||
var startDField = sqlModel.SQLFilterObject.FilterFieldList.FirstOrDefault(m => m.KeyWord == "#FStartDate#");
|
||||
var endDField = sqlModel.SQLFilterObject.FilterFieldList.FirstOrDefault(m => m.KeyWord == "#FEndDate#");
|
||||
DateTime time = DateTime.Now;
|
||||
startDField.DefaultValue = time.AddDays(1 - time.Day).ToShortDateString();
|
||||
endDField.DefaultValue = time.AddDays(1 - time.Day).AddMonths(1).AddDays(-1).ToShortDateString();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user