09 2011 档案

摘要:$objOu = [ADSI]"WinNT://shni391"$objUser = $objOU.Create("User", "TestComm") #用户名TestComm$objUser.setpassword("Password_1") #密码Password_1$objUser.SetInfo()$objUser.description = "Test Comm" #用户名描述$objUser.SetInfo()$objOu = [ADSI]"WinNT://shni391 阅读全文
posted @ 2011-09-30 09:50 风影极光 阅读(510) 评论(0) 推荐(0)
摘要:根据event获取事件触发者, 在ie下是event.srcElements 而ff等标准浏览器下下是event.target. 阅读全文
posted @ 2011-09-24 21:24 风影极光 阅读(202) 评论(0) 推荐(0)
摘要:应用场景:在Parallel Activity中使用InvokeWorkflow来达到间接关闭并行分支的功能。TestInvokeWorkflow方法用于启动监听工作流。endinvoke方法用户关闭启动的监听工作流实例。 private void TestInvokeWorkflow(object sender, EventArgs e) { SPWeb web = SPContext.Current.Web; SPList list = web.Lists["TestList"]; SPWorkflowAss... 阅读全文
posted @ 2011-09-15 16:28 风影极光 阅读(328) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2011-09-15 10:57 风影极光 阅读(236) 评论(0) 推荐(0)
摘要:取消正在执行的Workflow instance。以下代码以properties来自EventReceiver中的上下文。SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(properties.SiteId)) { using (SPWeb web = site.OpenWeb(properties.RelativeWebUrl)) { SPWorkflowManager manager = site.Work... 阅读全文
posted @ 2011-09-15 10:45 风影极光 阅读(391) 评论(0) 推荐(0)
摘要:关于使用Query实现不同版本的SharePoint迁移- In case of SP 2007 to SP 2010 upgrade , recommended to go with Microsoft upgrade approach instead of third party tools which suits for most requirements. Quest tool has limitation in preserving workflow history, workflow field status and Publishing site whilst most thir 阅读全文
posted @ 2011-09-14 16:32 风影极光 阅读(202) 评论(0) 推荐(0)
摘要:问题描述:我们经常在更新Item的时候,会触发工作流实例中的OnTaskChanged事件的自动触发。所以我们可以通过继承SPItemEventReceiver来解决这个问题。 SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling(); try { rh.DisableEventFiring(); ... 阅读全文
posted @ 2011-09-14 16:04 风影极光 阅读(344) 评论(0) 推荐(0)
摘要:因为经常需要提升权限来完成一件事情,特此封装为一个固定的方法来调用。 protected void RunWithElevatedPrivilegesAndContextSwitch(SPSecurity.CodeToRunElevated secureCode) { HttpContext backupContext = HttpContext.Current; HttpContext.Current = null; SPSecurity.RunWithElevatedPrivileges(secureCode)... 阅读全文
posted @ 2011-09-14 16:01 风影极光 阅读(208) 评论(0) 推荐(0)
摘要:function SetupUserGroups($site,$owners,$members,$vistors){ if($site -ne $null -and $site -ne "") { $web = $site.OpenWeb() $ownerGroup = $web.AssociatedOwnerGroup $memberGroup =$web.AssociatedMemberGroup $visitorGroup = $web.AssociatedVisitorGroup $xpath = "Id... 阅读全文
posted @ 2011-09-14 15:00 风影极光 阅读(302) 评论(0) 推荐(0)
摘要:1 借助.net的调试技巧在代码中添加此行代码,当程序运行时会自动要求调试人员附加相关的进行。System.Diagnostics.Debugger.Launch();2 附加进行,设置断点进行调试。查看端口对应的进程有以下几种方式命令C:\WINDOWS\system32\inetsrv>appcmd.exe list wpwindbg使用VS附加进程可以直接附加所有进程查看任务管理器 阅读全文
posted @ 2011-09-14 14:38 风影极光 阅读(254) 评论(0) 推荐(0)
摘要:问题描述:我们在不同的开发Server和Product环境中部署InfoPath的时候,发现命名空间会随InfoPath的小版本变化而变化。比如:http://schemas.microsoft.com/office/infopath/2003/myXSD/2011-03-14T09:12:19处理办法:使用Linq to xml 来获取。封装的方法如下:public static string GetXMLNameSpaceByPrefix(string outerXml, string prefix) { XElement xmlTree = XElem... 阅读全文
posted @ 2011-09-14 14:20 风影极光 阅读(203) 评论(0) 推荐(0)
摘要:前提:Task Form 使用InfoPath 2010来设计。在Task Form中的FormEvents_Loading事件中读取第二数据源ItemMetadata中的数据。ItemMetadata中包含了丰富的数据,在工作流中把RequestForm的xml数据存储到ows_ReqXMLSource字段中,此时再来读取这个字段的值时,我们会发现不仅仅是Request的xml数据,还有丰富Task相关联的所有数据(Request对应的Form Library和Task Id等信息)。 string xmlSource = this.DataSources["ItemMetada. 阅读全文
posted @ 2011-09-14 14:15 风影极光 阅读(253) 评论(0) 推荐(0)
摘要:获取SPWeb实例方式一 if deployed on farm,we can get spweb by time job titleA define site url in feature template.xml as property,and access it in FeatureActivated eventstring url = properties.Feature.Properties[activeSiteUrl].Value;……job.Title = displayName + "(" + url.ToLower().Trim() + ")&q 阅读全文
posted @ 2011-09-13 12:35 风影极光 阅读(487) 评论(0) 推荐(0)
摘要:net localgroup administrators /add ibm\mingle 阅读全文
posted @ 2011-09-06 20:14 风影极光 阅读(385) 评论(0) 推荐(0)
摘要:NeverAlwaysNecessay 阅读全文
posted @ 2011-09-02 17:58 风影极光 阅读(132) 评论(0) 推荐(0)
摘要:Article1 how to customize task list display page and content type?Article2 how to design time job in SharePoint 2010?Article3 InfoPath debug 阅读全文
posted @ 2011-09-02 17:57 风影极光 阅读(235) 评论(0) 推荐(0)
摘要:应用场景:在请假系统中,需要一个Country列表和Task列表。Country列表作为元数据显示用户所属的国家。Task列表工作流审批使用,并且呈现Task的编辑aspx页面需要隐藏删除按钮。<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- Country Content Type : Parent ContentType: Item (0x01) 阅读全文
posted @ 2011-09-02 17:54 风影极光 阅读(228) 评论(0) 推荐(0)