欢迎来到天天文库
浏览记录
ID:38060233
大小:23.50 KB
页数:5页
时间:2019-05-24
《LOTUS程序精选》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、LOTUS程序精选1、用程序实现星期的转换:DimworkspaceAsNewNotesUIWorkspaceDimuidocAsNotesUIDocumentDimdocAsNotesDocumentDimdateComposedObjAsNewNotesDateTime(""Setuidoc=workspace.CurrentDocumentSetdoc=uidoc.DocumentdateComposed=doc.DateComposedthisWeekday=Weekday(dateComposed(0))SelectCasethisWeekdayCase1:stringWee
2、kday="Sunday"Case2:stringWeekday="Monday"Case3:stringWeekday="Tuesday"Case4:stringWeekday="Wednesday"Case5:stringWeekday="Thursday"Case6:stringWeekday="Friday"Case7:stringWeekday="Saturday"EndSelectMessagebox("Thisdocumentwascomposedona"&stringWeekday)2、利用程序增加角色:DimdbAsNewNotesDatabase("",Inputb
3、ox("Nameofdatabase")DimdbACLAsNotesACLDimdbACLEntryAsNotesACLEntrySetdbACL=db.ACLename=Inputbox("NameofACLentry?"SetdbACLEntry=dbACL.GetEntry(ename)CalldbACL.AddRole("Role"CalldbACLEntry.EnableRole("Role"dbRoles=dbACLEntry.RolesIfNot(Isempty(dbRoles))ThenForalldbRoleIndbRolesMessagebox"Role"&dbR
4、oleEndForallElseMessagebox"NorolesforthisACLentry"EndIfCalldbACL.save3、用程序删除私有视图:DimsessionAsNewnotessessionDimdbAsnotesdatabaseDimdocAsnotesdocumentSetdb=session.currentdatabaseForalliIndb.viewsSetdoc=db.getDocumentByUNID(v.universalID)viewflag=doc.getItemvalue("$flags"Ifviewflag(0)="pYV"ThenCa
5、lli.removeEndIfEndForall4、用程序打开视图:SubPostopen(SourceAsNotesuidatabase)CallSource.OpenView("按时间"EndSub5、利用程序选择运行指定代理:DimsessionAsNewNotesSessionDimdbAsNotesDatabaseDimtheAgentAsNotesAgentDimagentStringAsStringSetdb=session.CurrentDatabaseForallagentIndb.AgentsagentString=agentString&Chr(10)&agent
6、.NameEndForallMessageboxagentString,,"Agents"SettheAgent=db.GetAgent(Inputbox("请输入须运行的代理?")IfNot(theAgentIsNothing)ThenCalltheAgent.RunElseMessagebox"没有选择代理!"EndIf6、显示数据库的管理者:DimsessionAsNewNotesSessionDimdbAsNotesDatabaseDimdb2AsNotesDatabaseDimdcAsNotesDocumentCollectionDimdocAsNotesDocumentSe
7、tdb=session.CurrentDatabaseprintdb.managers(0)7、检验数字域:SubExiting(SourceAsField)DimwAsNewnotesuiworkspaceDimdocAsnotesuidocumentDimbodyAsVariantSetdoc=w.currentdocumentnum=doc.FieldGettext("num"IfInt(num)<0ThenMessagebox"输入值非
此文档下载收益归作者所有