标签:
1.构造UI项目后,打开生成的UI项目代码,如初始化一些字段的值
2.订单明细行中行号设置、订单基本操作按钮提示
UFIDA.U9.Base.BaseBP.Agent.dll(代理)
UFIDA.U9.Base.BaseBP.Deploy.dll(实现弱类型)
该dll在Portal\ApplicationServer\Libs目录下,因UI是通过代理去调用,且只能用弱类型去实现
public void AfterOnLoad() { string paramWhere = null; //查询 PDFormMessage.ShowConfirmDialog(this.Page, "abc8b212-990a-40a6-81b3-28c50b0127d3", "580", "408", Title, wpFindID.ClientID, this.BtnFind, paramWhere); FlexFieldHelper.SetDescFlexField(new DescFlexFieldParameter[] { new DescFlexFieldParameter(this.FlexFieldPicker0, this.Model.HomaGiftDoc) }); FlexFieldHelper.SetDescFlexField(new DescFlexFieldParameter[] { new DescFlexFieldParameter(this.DataGrid8, this.DataGrid8.Columns.Count - 1, "DescFlexField") }); //开启个性化 // UFIDA.U9.UI.PDHelper.PersonalizationHelper.SetPersonalizationEnable((BaseWebForm)this, true); //取得提示信息资源:是否删除当前记录 string message = PDResource.GetDeleteConfirmInfo(); //绑定注册弹出对话框到删除按钮 PDFormMessage.ShowConfirmDialog(this.Page, message, "", this.BtnDelete); PDFormMessage.ShowConfirmDialog(this.Page, "确认放弃当前记录?", "", this.BtnCancel); //引入命名空间: //UFIDA.U9.Base.BaseBP.Agent.dll //UFIDA.U9.Base.BaseBP.Deploy.dll //设置默认行号 GetProfileValueProxy bpObj = new GetProfileValueProxy(); bpObj.ProfileCode = "SysLineNo"; PVDTOData pVTDOData = bpObj.Do(); //行GRID ((IAutoRowNo)this.DataGrid8.Columns["RowNo"]).Sequence = true; ((IAutoRowNo)this.DataGrid8.Columns["RowNo"]).SequenceStep = Int32.Parse(pVTDOData.ProfileValue); ((IAutoRowNo)this.DataGrid8.Columns["RowNo"]).SequenceStart = Int32.Parse(pVTDOData.ProfileValue); }
public void AfterUIModelBinding() { //设置单据状态只读 ((UFSoft.UBF.UI.ControlModel.IUIFieldBindingDataBindControl)this.GiftDocStatus150).ReadOnly = true; //设置行号不可编辑 this.DataGrid8.Columns["RowNo"].Enabled = false; DisableBtn(); } /// <summary> /// 控制按钮显示 /// </summary> private void DisableBtn() { if (UFIDA.U9.UI.PDHelper.NavigateManager.IsModelPopup(this) || UFIDA.U9.UI.PDHelper.NavigateManager.IsTitleLink(this)) { //this.BtnOk.Visible = true; //this.BtnClose.Visible = true; this.BtnList.Enabled = false; } else { //this.BtnOk.Visible = false; //this.BtnClose.Visible = false; this.BtnList.Enabled = true; } //没有数据时 if (this.Model.HomaGiftDoc.FocusedRecord.ID < 0L) { this.BtnApprove.Enabled = false; this.BtnUndoApprove.Enabled = false; this.BtnSubmit.Enabled = false; this.BtnDelete.Enabled = false; this.BtnCopy.Enabled = false; } else { //据单据状态控制按钮 switch (this.Model.HomaGiftDoc.FocusedRecord.GiftDocStatus) { case 0: //开立 this.BtnApprove.Enabled = false; this.BtnUndoApprove.Enabled = false; this.BtnSubmit.Enabled = false; this.BtnDelete.Enabled = false; break; case 1: //核准中 this.BtnApprove.Enabled = true; this.BtnUndoApprove.Enabled = true; this.BtnSubmit.Enabled = false; this.BtnDelete.Enabled = true; break; case 2: //已核准 this.BtnApprove.Enabled = false; this.BtnUndoApprove.Enabled = false; this.BtnSubmit.Enabled = false; this.BtnDelete.Enabled = false; break; } } }
至此单据的基本功能开发完毕
标签:
原文地址:http://www.cnblogs.com/myjacky/p/4597362.html