单据上引用附件列表问题
1,652次浏览
编辑于2015年10月16日 10:48:47
从https://vip.kingdee.com/article/285118202634428341的帖子中有以下几点问题
在单据插件的绑定事件中参考以下代码实现加载附件列表
Form frm = this.View.BillBusinessInfo.GetForm();
//获取单据编号
string billNo = "";
Field billNoField = this.View.BusinessInfo.GetBillNoField();
if (billNoField != null)
{
object objBillNo = this.View.Model.GetValue(billNoField.Key);
if (objBillNo != null)
{
billNo = objBillNo.ToString();
}
}
//获取附件列表过滤条件
AttachmentKey attachmentKey = new AttachmentKey();
attachmentKey.BillType = frm.Id;
attachmentKey.BillNo = billNo;
attachmentKey.BillInterID = objPkValue.ToString();
attachmentKey.OperationStatus = this.View.OpenParameter.Status;
//单据头
if (string.IsNullOrEmpty(OperationObjectKey))
{
attachmentKey.EntryKey = " ";
attachmentKey.EntryInterID = "-1";
attachmentKey.RowIndex = 0;
}
string filter = string.Format(@"FBILLTYPE='{0}' and FINTERID='{1}' and FENTRYKEY='{2}' and FENTRYINTERID='{3}'",
attachmentKey.BillType, attachmentKey.BillInterID, attachmentKey.EntryKey, attachmentKey.EntryInterID);
ListShowParameter listpara = new ListShowParameter();
listpara.IsLookUp = false;
listpara.CustomParams.Add(KeyConst.AttachmentKey, AttachmentKey.ConvertToString(attachmentKey));
listpara.OpenStyle.ShowType = ShowType.InContainer;
listpara.OpenStyle.TagetKey = "Panelxxx";//自己添加的面板
listpara.Caption = Kingdee.BOS.Resource.ResManager.LoadKDString("附件管理", "002012030003226", Resource.SubSystemType.BOS);
listpara.FormId = FormIdConst.BOS_Attachment;
listpara.MultiSelect = false;
listpara.PageId = string.Format("{0}_{1}_F7", this.View.PageId, listpara.FormId);
listpara.ListFilterParameter.Filter = filter;
listpara.IsShowQuickFilter = false;
this.View.ShowForm(listpara );
请问红色这两个变量分别是什么?
objPkValue是单据内码this.View.Model.GetPKValue() ?????
OperationObjectKey是什么????
在单据插件的绑定事件中参考以下代码实现加载附件列表
Form frm = this.View.BillBusinessInfo.GetForm();
//获取单据编号
string billNo = "";
Field billNoField = this.View.BusinessInfo.GetBillNoField();
if (billNoField != null)
{
object objBillNo = this.View.Model.GetValue(billNoField.Key);
if (objBillNo != null)
{
billNo = objBillNo.ToString();
}
}
//获取附件列表过滤条件
AttachmentKey attachmentKey = new AttachmentKey();
attachmentKey.BillType = frm.Id;
attachmentKey.BillNo = billNo;
attachmentKey.BillInterID = objPkValue.ToString();
attachmentKey.OperationStatus = this.View.OpenParameter.Status;
//单据头
if (string.IsNullOrEmpty(OperationObjectKey))
{
attachmentKey.EntryKey = " ";
attachmentKey.EntryInterID = "-1";
attachmentKey.RowIndex = 0;
}
string filter = string.Format(@"FBILLTYPE='{0}' and FINTERID='{1}' and FENTRYKEY='{2}' and FENTRYINTERID='{3}'",
attachmentKey.BillType, attachmentKey.BillInterID, attachmentKey.EntryKey, attachmentKey.EntryInterID);
ListShowParameter listpara = new ListShowParameter();
listpara.IsLookUp = false;
listpara.CustomParams.Add(KeyConst.AttachmentKey, AttachmentKey.ConvertToString(attachmentKey));
listpara.OpenStyle.ShowType = ShowType.InContainer;
listpara.OpenStyle.TagetKey = "Panelxxx";//自己添加的面板
listpara.Caption = Kingdee.BOS.Resource.ResManager.LoadKDString("附件管理", "002012030003226", Resource.SubSystemType.BOS);
listpara.FormId = FormIdConst.BOS_Attachment;
listpara.MultiSelect = false;
listpara.PageId = string.Format("{0}_{1}_F7", this.View.PageId, listpara.FormId);
listpara.ListFilterParameter.Filter = filter;
listpara.IsShowQuickFilter = false;
this.View.ShowForm(listpara );
请问红色这两个变量分别是什么?
objPkValue是单据内码this.View.Model.GetPKValue() ?????
OperationObjectKey是什么????
推荐阅读