(结合视频教学资料使用)
1.UBF路径配置
(视频160)
2.解决方案建立规则
目录层次:解决方案>>项目>>组件   
同一模块,所有BE、BP、SV项目放在(同)一个解决方案内
同一模块,所有BE,只用一个项目,即只生成一个BE的DLL
同一模块,所有BP、SV,只用一个项目,即只生成一个BP、SV的DLL
同一模块,可以所有枚举放在(同)一个BE组件内
同一模块,所有UI项目放在一个解决方案内
一个档案或单据UI,及其相关的查参照UI,用(同)一个项目,即一个档案或单据,生成一个UI的DLL
同一模块,所有列表UI,用(同)一个项目
同一模块,所有参照UI,用(同)一个项目
3.命名规范
配件名:UFIDA.U9.Cust.XM(地区).HXPP(公司).EX(模块)BE
表名:Cust_XM(地区)_HXPP(公司)_EX(模块)_XXXX
4.档案开发需求
(视频170,180)
考核模块(EX)>>科目(Subject)
printform
名称
显示名称
类型
备注
Org
组织
组织机构
业务主键,不可空
Code
编码
字符串
业务主键,不可空,长50
Name
科目名称
字符串
不可空,长200
SubjectType
科目类型
科目类型枚举
枚举值:辅料、主要材料、产值、费用,对账差异,营销可比利润,调节项,其他收入,税后利润,考核税前利润
Effective
状态
状态
 
Memo
备注
字符串
长500
DescFlexField
扩展字段
实体扩展字段集合
 
5.BE Code与Model对比
6.组件、类实体、属性关系查询(SQL语句)
select a. Name as ComponentName ,at. DisplayName as ComponentName_CN,a. AssemblyName,a .Kind
,b. Name as ClassName , bt. DisplayName as ClassName_CN,b. FullName,b .Discriminator
,c. Name as AttributeName ,ct. DisplayName as AttributeName_CN
from UBF_MD_Component a
left outer join UBF_MD_Component_Trl at on a. Local_ID=at .Local_ID and at.SysMLFlag= 'zh-cn'
left outer join UBF_MD_Class b on a. ID=b .MD_Component_ID
left outer join UBF_MD_Class_Trl bt on b. Local_ID=bt .Local_ID and bt.SysMLFlag= 'zh-cn'
left outer join UBF_MD_Attribute c on b. ID=c .MD_Class_ID
left outer join UBF_MD_Attribute_Trl ct on c. Local_ID=ct .Local_ID and ct.SysMLFlag= 'zh-cn'
where (1 =1)
and bt. DisplayName='科目'
7.UI Code与Model对比
8.UIForm、Part、Page的关系查询(SQL语句)
select at .DisplayName as UIFormDisplayName , a .name as UIFormName ,c. name as PageName
,a. uid as [UID(FormID)], b.PageCode
,a. uri as [PartID(UIFormURI)], c.uri as PageURI
,a. AssemblyName , a.ClassName
,a. Width,a .Height, dt.name as ApplicationName
from ubf_md_uiform a
left outer join ubf_assemble_part b on a.uid =b. component
left outer join ubf_assemble_page c on b.page =c. id
left outer join base_application_trl dt on c.application =dt. id and dt. sysmlflag='zh-cn'
left outer join ubf_md_uiform_trl at on a.id =at. id and at. sysmlflag='zh-cn'
where (1 =1)
and at.DisplayName='科目'
9.同步枚举脚本
以补丁包方式更新/安装,则不需要下面的脚本,因为be的bulk中会处理;
delete from ubf_sys_extenumtype
delete from ubf_sys_extenumtype_trl
delete from ubf_sys_extenumvalue
delete from ubf_sys_extenumvalue_trl
GO
insert into ubf_sys_extenumtype select local_id as id,'20060612' ,'u9zhangheng', '20060612','u9zhangheng' ,0, fullname as code, isextend,id as uid,0 as IsRefView from ubf_md_class where classtype=3
insert into ubf_sys_extenumtype_trl select a .local_id as id ,'zh-CN', b.[displayname] as [na
me],b .[Description] from ubf_md_class  a left join ubf_RES_resourcevalue b on cast( a.[iD] as nvarchar(255 )) = b. resourcename  where classtype =3
insert into ubf_sys_extenumvalue select a .local_id as id,'20060612' ,'u9zhangheng', '20060612','u9zhangheng' ,0, a.[Local_Class_ID] as ExtEnumType , a.[name] as code,a .defaultvalue as evalue ,issystem, md_class_id as ExtEnumTypeUID from ubf_md_attribute as a inner join ubf_md_class as b on a. md_class_id=b .id where classtype =3
insert into ubf_sys_extenumvalue_trl select a .local_id as id ,'zh-CN', c.[displayname] as [name] from ubf_md_attribute as a inner join ubf_md_class as b on a.md_class_id =b. id left join ubf_RES_resourcevalue c on cast( a.[ID] as nvarchar(255 )) = c. resourcename where classtype= 3
GO
--枚举值表关系
SELECT a .Code , at .NAME ,a. EValue, c.UID AS EnumTypeUID FROM UBF_Sys_ExtEn
umValue a
LEFT OUTER JOIN UBF_Sys_ExtEnumValue_Trl at ON a.id =at . id AND at. SysMLFlag='zh-cn'
LEFT OUTER JOIN UBF_Sys_ExtEnumType c ON a.ExtEnumType =c . id
WHERE c .Code = 'UFIDA.U9.Base.Doc.ConfirmTypeEnum'
10.装配发布
(视频190)
\UBFV28\U9.VOB.Product.UBF\UBFStudio
l,修改UILib路径
.\l
<system>
    <connectionString>User Id=sa;Password=123456;Data Source=laputa\mssql2012;Initial Catalog=hxpp0326;packet size=4096;Max Pool size=1500;persist security info=True</connectionString>
  </system>
带实例名的ConnectionString
<connectionString>User Id=sa;Password=123456;Data Source=DZY-\mssqlsever;Initial Catalog=HXPP0145;packet size=4096;Max Pool size=100;Connection Timeout=900;persist security info=True;MultipleActiveResultSets=true;</connectionString>
11.常用代码
(视频200,210,220)
BE上赋默认值,OnSetDefaultValue 处增加代码
if (this.Org == null)
{ this.Org = Context.LoginOrg; }
UI上赋默认值,Model>>AfterInitModel 处增加代码
this.Subject.FieldOrg.DefaultValue = PDContext.Current.OrgRef.ID;

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。