aa
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using Kingdee.BOS.App;
|
||||
using Kingdee.BOS.ServiceHelper;
|
||||
using Kingdee.BOS.Core;
|
||||
using Kingdee.BOS.Core.CommonFilter.PlugIn;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel;
|
||||
using Kingdee.BOS.KDThread;
|
||||
using Kingdee.BOS.ServiceHelper.ManagementCenter;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Kingdee.BOS.Contracts;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
|
||||
namespace Enpower.POSH_CB_PROCOSTRESULTREC
|
||||
{
|
||||
public class BillEventPlugInEx : AbstractCommonFilterPlugIn
|
||||
{
|
||||
public override void AfterBindData(EventArgs e)
|
||||
{
|
||||
base.AfterBindData(e);
|
||||
var _commonFilterModel = this.CommonFilterModel;
|
||||
var t = this.View.BusinessInfo.GetForm();
|
||||
|
||||
|
||||
IDBService dBService = ServiceFactory.GetDBService(this.Context);
|
||||
|
||||
DataSet result = null;
|
||||
try
|
||||
{
|
||||
result = dBService.ExecuteDataSet(this.Context, new List<string> { }, (new List<string> { }).ToArray());
|
||||
}
|
||||
finally
|
||||
{
|
||||
ServiceFactory.CloseService(dBService);
|
||||
|
||||
}
|
||||
|
||||
var table = result.Tables;
|
||||
var tableName = table[0];
|
||||
var rows = tableName.Rows;
|
||||
//return;
|
||||
|
||||
var batchFilterGrid = this.View.GetControl<BatchFilterGrid>("FBatchFilterGrid");
|
||||
|
||||
|
||||
MainWorker.QuequeTask(this.Context, () =>
|
||||
{
|
||||
var tt = Math.Ceiling(0.1);
|
||||
}, (a) =>
|
||||
{
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public override void BarItemClick(BarItemClickEventArgs e)
|
||||
{
|
||||
base.BarItemClick(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
127
07.珠海英搏尔/Enpower/POSH_CB_PROCOSTRESULTREC/PCBP_PRT.cs
Normal file
127
07.珠海英搏尔/Enpower/POSH_CB_PROCOSTRESULTREC/PCBP_PRT.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Kingdee.BOS.App.Data;
|
||||
using Kingdee.BOS.BusinessEntity.BusinessFlow;
|
||||
using Kingdee.BOS.Core;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||||
using Kingdee.BOS.Core.Metadata.Util;
|
||||
using Kingdee.BOS.KDThread;
|
||||
using Kingdee.BOS.Orm.DataEntity;
|
||||
using Kingdee.BOS.ServiceHelper;
|
||||
|
||||
namespace Enpower.POSH_CB_PROCOSTRESULTREC
|
||||
{
|
||||
public class PCBP_PRT : AbstractDynamicFormPlugIn
|
||||
{
|
||||
public override void ButtonClick(ButtonClickEventArgs e)
|
||||
{
|
||||
base.ButtonClick(e);
|
||||
|
||||
List<string> list = new List<string>();
|
||||
var a = list.Contains("1");
|
||||
|
||||
var proEntity = this.View.Model.BusinessInfo.GetEntryEntity("FAnalyzeProEntity");
|
||||
|
||||
var materialEntity = this.View.Model.BillBusinessInfo.GetEntryEntity("FAnalyzeMaterialEntity");
|
||||
var materialRows = this.View.Model.GetEntityDataObject(materialEntity);
|
||||
materialRows.Clear();
|
||||
var tempRow =new List<DynamicObject>();
|
||||
|
||||
var row = new DynamicObject(materialEntity.DynamicObjectType);
|
||||
|
||||
DBServiceHelper.Execute(this.Context, "");
|
||||
//DBUtils.ExecuteScalar(this.Context, "");
|
||||
|
||||
var b = "aaaaa";
|
||||
//var c = b.Contains(",");
|
||||
}
|
||||
|
||||
private void Test()
|
||||
{
|
||||
|
||||
DBServiceHelper.ExecuteDynamicObject(null, "");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
/// 显示进度条
|
||||
|
||||
/// </summary>
|
||||
|
||||
/// <param name="userTruePro">是否使用真的进度值</param>
|
||||
|
||||
private void ShowProgressBar(bool userTruePro)
|
||||
|
||||
{
|
||||
|
||||
this.View.ShowProcessForm(formResult => { }, userTruePro, "正在执行xxx");
|
||||
|
||||
// 启动线程执行耗时操作,同时更新执行进度
|
||||
|
||||
MainWorker.QuequeTask(this.View.Context, () =>
|
||||
|
||||
{
|
||||
|
||||
try
|
||||
|
||||
{
|
||||
|
||||
var counter = 30;
|
||||
|
||||
for (var x = 1; x < counter; ++x)
|
||||
|
||||
{
|
||||
|
||||
// TODO
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
// 报告下执行进度
|
||||
|
||||
var rate = Convert.ToInt32(x * 100 / counter);
|
||||
|
||||
this.View.Session["ProcessRateValue"] = rate;
|
||||
|
||||
// 进度条界面增加文字提示信息
|
||||
|
||||
//this.View.Session["ProcessTips"] = string.Format("任务{0}已处理", x);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.View.ShowMessage("操作已完成。");
|
||||
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
|
||||
{
|
||||
|
||||
this.View.ShowErrMessage(ex.Message);
|
||||
|
||||
}
|
||||
|
||||
finally
|
||||
|
||||
{
|
||||
|
||||
// 此句必不可少,进度值100时进度条自动关闭
|
||||
|
||||
this.View.Session["ProcessRateValue"] = 100;
|
||||
|
||||
this.View.SendDynamicFormAction(this.View);
|
||||
|
||||
}
|
||||
|
||||
}, null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user