76 lines
2.7 KiB
C#
76 lines
2.7 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Kingdee.BOS;
|
|
using Kingdee.BOS.Core.Bill.PlugIn;
|
|
using Kingdee.BOS.Core.Bill.PlugIn.Args;
|
|
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
|
using Kingdee.BOS.Core.Metadata;
|
|
using Kingdee.BOS.Core.Metadata.EntityElement;
|
|
using Kingdee.BOS.Core.SqlBuilder;
|
|
using Kingdee.BOS.Orm.DataEntity;
|
|
using Kingdee.BOS.ServiceHelper;
|
|
using Kingdee.BOS.Util;
|
|
using Kingdee.BOS.Core.DynamicForm;
|
|
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
|
using Kingdee.BOS.Core.List.PlugIn;
|
|
namespace aoyuPlugIn
|
|
{
|
|
[Description("补数单列表反写生产订单")]
|
|
public class zp_bsdlb:AbstractListPlugIn
|
|
{
|
|
//int fx = -1;
|
|
void fxjdb(string issh)
|
|
{
|
|
try
|
|
{
|
|
//string fbillno = "";
|
|
if (this.ListView.SelectedRowsInfo.Count > 0)
|
|
{
|
|
for (int i = 0; i < this.ListView.SelectedRowsInfo.Count; i++)
|
|
{
|
|
//取指定行单据编号
|
|
string fbillno = this.ListView.SelectedRowsInfo[i].BillNo;
|
|
string zt = this.ListView.SelectedRowsInfo[i].DataRow["FDOCUMENTSTATUS"].ToString();
|
|
if (issh == "1")
|
|
{
|
|
if (zt == "D" || zt == "B")
|
|
{
|
|
var sSql = String.Format("EXEC hw_fx_bs " + fbillno + "," + issh);
|
|
var dr = DBServiceHelper.ExecuteDynamicObject(this.Context, sSql);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (zt == "C")
|
|
{
|
|
var sSql = String.Format("EXEC hw_fx_bs " + fbillno + "," + issh);
|
|
var dr = DBServiceHelper.ExecuteDynamicObject(this.Context, sSql);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex) { this.View.ShowMessage("反写进度表时发生错误为:" + ex.Message); }
|
|
}
|
|
//列表菜单事件
|
|
public override void AfterBarItemClick(AfterBarItemClickEventArgs e)
|
|
{
|
|
base.AfterBarItemClick(e);
|
|
|
|
if (e.BarItemKey == "tbSplitApprove" || e.BarItemKey == "tbApprove")//审核
|
|
{
|
|
fxjdb("1");
|
|
}
|
|
else if (e.BarItemKey == "tbReject")//反审核
|
|
{
|
|
fxjdb("0");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|