ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:24.82KB ,
资源ID:16544475      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/16544475.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Aras Innovator二次开发的一些常用代码段文档格式.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

Aras Innovator二次开发的一些常用代码段文档格式.docx

1、UsergetMyItem.setAttribute(selectfirst_name,last_nameItem MyResult = MyItem.apply();for (int i=0; iMyResult.getItemCount(); i+) msgBox.AppendText(n + i + + MyResult.getItemByIndex(i).getProperty(first_namena) + last_name) ); /Document实例的添加注:必填项属性必须设置,属性名一般为小写,若为大写将不可识别, 属性的空格用_代替,若属性值为系统已有的内置属性,则必须与

2、系统内置属性值相等,区分大小写Example:Innovator innovator = new Innovator(connection);Item item = innovator.newItem(Documentadditem.setProperty(item_number0002Example1classification/Document/Softwareauthoring_toolOthereffective_date2010-01-21item = item.apply();/修改多语言字段itemtype为对象类名称,lang为多语言字段缩写,name为字段名string la

3、ng=zh;Item resultitem = innovator.newItem(itemtype, editresultitem.setAttribute(id, id);resultitem.setProperty(name, value, lang);resultitem = resultitem.apply();/提升版本方法1:resultitem.promote(activePlease review方法2: q.setAttribute(actionPromoteItemtypeId, thisItem.getProperty(itemtype); q.setID(thisIt

4、em.getID(); q.setProperty(state,toState); r = q.apply();/Innovator RelationShip的添加添加RelationShip时,relationshipType需指定一个联系的对象(item)添加关系时应特别注意,向文档中添加文件时的关系添加,如向Part中添加BOM的关系操作不同,不同对象的关系添加方式不同此例子为向文档中添加已存在的文件First /获取关联文件Item file = innovator.newItem(Filefile.setProperty(keyed_name,id,filename8FA86396E

5、DDA493481BF0A3AA6F15D44file = file.apply(); /Document File表存储了文档和文件的关系Item docfile = innovator.newItem(Document Filedocfile.setProperty(source_id, item.getID();docfile.setPropertyAttribute(keyed_name, item.getProperty(docfile.getPropertyAttribute(typerelated_id, file.getID();, file.getProperty(Typei

6、tem.addRelationship(docfile);item.apply();判断当前窗体对象是否被锁定:if (!document.thisItem.isNew() & document.thisItem.getAttribute() != & document.thisItem.isLocked() != 1 ) return top.aras.newError(请先锁定窗体!方法简化:为Document添加File关系为: Item relationship=innovator.newItem( relationship.setRelatedItem(file); item.add

7、Relationship(relationship); item.apply();/C# 连接excelstring strconn = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=0;Extended Properties=Excel 8.0;HDR=Yes;IMEX=1; /连接字符串中的空格不可去掉 string command = string.Format(select * from 0$, sheetname);/$不可去掉 using (OleDbConnection oleconnection = new OleDbConnecti

8、on(string.Format(strconn, filepath) oleconnection.Open(); DataTable st = oleconnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); OleDbDataAdapter oleadapter = new OleDbDataAdapter(command, oleconnection); DataSet ds = new DataSet(); oleadapter.Fill(ds); return ds;/小知识点activity表的message为显示在I

9、nbasket中的介绍(introduction)/关于Item.apply()方法的说明当Item.apply()提交的数据与数据库中数据产生冲突时,会自动不予提交/上传文件 path文件路径 Item item = innovator.newItem( int index=path.LastIndexOf( string filename=path.subString(index+1); item.setProperty(filename, filename); item.attachPhysicalFile(path); item = item.apply();提升生命周期状态:acti

10、onitem=innovator.newItem(Action Itemactionitem.setAttribute(where,string.Format(id=0,actid);actionitem.promote(Please review.actionitem=actionitem.apply();AML关系查找示例: 1RelationshipsMy BOMrelated_id2/related_id/Relationships/javascript操作页面元素var results=document.thisItem;/获取页面元素var element=results.getI

11、temsByXpath(/Itemtype=TPK_Millstonedocument.thisItem.isLocked()=1表示页面元素被锁定document.thisItem.isNew() 判断页面对象是否为新建对象document.thisItem.getAttribute( 判断当前的操作是否为add/获取属性的子属性 string newitem = resulitem.getPropertyAttribute(current_state/赋予权限,applySQL只有当前用户为Administrator或super user身份时可用,Aras PLM也具有applySQL的

12、权限,一般在系统内部使用其他身份若要使用applySQL需要先赋予权限Aras.Server.Security.Identity plmIdentity = Aras.Server.Security.Identity.GetByName(Aras PLMbool PermissionWasSet = Aras.Server.Security.Permissions.GrantIdentity(plmIdentity);if (PermissionWasSet) Aras.Server.Security.Permissions.RevokeIdentity(plmIdentity);/ 工作流实

13、例间的关系,当工作流实例根据模板建立后,基本与模板没有关系,(a.source_type=itemtype.id a.source_id=item.id)Workflow(a)-1:1-Workflow Process(b)-1:N-Workflow Process Activity(c)-1:1-Activity(d)-1:N-Activity Assignment(e)a.related_id=b.id, c.source_id=b.id c.source_id=b.id, c.related_id=d.id e.source_id=d.id,e.related_id=identity.i

14、dWorkflow Process Path:source_id(源activity),related_id(关联activity)当为工作流添加权限时,它会自动从activity处获得权限。如果是动态添加activity则必须在Activity添加后再为添加path,这样权限会自动添加。手工设置权限将无效(applySQL除外)。更新缓存 在页面中填写值完毕后通过此方法更新缓存中的值,否则依然为原数据 handleItemChange(字段id,字段值);打开某个对象的方法:function showorkflowprocess() var itemNd = top.aras.getItem

15、ById(对象类名称对象类id, 0); var myLock =false; top.aras.uiShowItemEx(itemNd, top.aras.getPreferenceItemProperty(Core_GlobalLayout, null, core_view_mode), top.aras.getVariable(TearOff) = true隐藏Pr页签中的Files页签:top.hideIssueTabs=function() if(!parent.relationships|!parent.relationships.relTabbarReady|parent.rel

16、ationships.relTabbar.GetTabOrder(|)=) setTimeout(top.hideIssueTabs(),30); return; var tabbar=parent.relationships.relTabbar; var tabID=tabbar.getTabId(Files/得到Files的tabId if(tabID!=undifined)tabbar.SetTabVisible(tabID,false); /将Visible设置为false;快速获取数据库连接字符串的方法:建一个后缀名为udl的文件/项目模板的存储Project Template的存储

17、:project_template.wbs_id=wbs_element.idproject_template.wbs_id=sub_wbs.source_idsub_wbs.related_id=wbs_element.idwbs_element和Activity2的对应关系为WBS_Activity2打开workflow签核页需要传递的参数:1 var params=new Object(); params.aras=top.aras; params.activity=top.aras.getItemById(activity,activityId,1); params.wflName=w

18、flName; /workflow process的名称 params.wflId=workflowProcessID; /workflow process的id params.assignmentId=assignmentId;/activity assignment的id params.itemId=itemId; /item的id showModalDialogWithDelay(InBasket-VoteDialog.html, params, resizable:1; scroll: dialogHeight:400px; dialogWidth:700px; status: hel

19、p:0, true);打开Project签核页需要传递的参数:var params=new Array();params0=window;params1=activityID; /activity2的IDshowModalDialog(././Solutions/Project/scripts/ActivityCompletionWorksheet/ACWDialog.htmldialogHeight: 320px;0; resizable:1javascript获取对象类关系:top.aras.getItemRelationShips(Project,projectid,Project Te

20、amInbasket中workflow activities的数据来自Activity 和Activity Assignment.Inbasket中Project Activities的数据来自Activity2 和Activity2 Assignment. 当前状态(Pending-Active-Complate)由Activity2.state字段标识。 activity2的date_start_sched,date_due_sched分别表示计划开始时间和计划结束时间。9.2版本下notification_control在中文模式下报错:修改arasInnovatorInnovatorC

21、lientjavascriptuser_notifications.js中 if (!notification_control) throw new Error(1, ArgumentException: notification_control cant be undefined这不是最好的办法,只是暂时不报错/获取网格中的选中对象mainTreeApplet=parent.tree.treeApplet;var selectedRowId = mainTreeApplet.getSelectedId();熟悉STAThreadjavascript操作gridApplet:gridApple

22、t.cells(relationshipID,列数).GetValue()获取某行某列的值).setEditType(1)将单元格设置为编辑状态javascirpt禁用元素:disabled=true ,设置元素为只读:readOnly=true(注意大小写)Javascript 获取时间日期的各种格式var myDate = new Date();myDate.getYear(); /获取当前年份(2位)myDate.getFullYear(); /获取完整的年份(4位,1970-?myDate.getMonth(); /获取当前月份(0-11,0代表1月)myDate.getDate(); /获取当前日(1-31)myDate.getDay(); /获取当前星期X(0-6,0代表星期天)myDate.getTime(); /获取当前时间(从1970.1.1开始的毫秒数)myDate.getHours(); /获取当前小时数(0-23)myDate.getMi

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1