zoukankan
html css js c++ java
Windows Sharepoint Services v3.0,一个简单的审批工作流
根据微软的视频作的例子,一个简单的审批流程
using
System;
using
System.ComponentModel;
using
System.ComponentModel.Design;
using
System.Collections;
using
System.Drawing;
using
System.Workflow.ComponentModel.Compiler;
using
System.Workflow.ComponentModel.Serialization;
using
System.Workflow.ComponentModel;
using
System.Workflow.ComponentModel.Design;
using
System.Workflow.Runtime;
using
System.Workflow.Activities;
using
System.Workflow.Activities.Rules;
using
System.Xml.Serialization;
using
System.Xml;
using
Microsoft.SharePoint;
using
Microsoft.SharePoint.Workflow;
using
Microsoft.SharePoint.WorkflowActions;
using
Microsoft.Office.Workflow.Utility;
namespace
DemoReview
{
public
sealed
partial
class
Workflow1 : SharePointSequentialWorkflowActivity
{
public
Workflow1()
{
InitializeComponent();
}
public
Guid workflowId
=
default
(System.Guid);
public
Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties workflowProperties
=
new
Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties();
public
Guid taskId
=
default
(System.Guid);
public
SPWorkflowTaskProperties taskProps
=
new
Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();
public
SPWorkflowTaskProperties afterProps
=
new
Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();
public
SPWorkflowTaskProperties beforeProps
=
new
Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();
private
string
assignto
=
default
(System.String);
private
string
instructions
=
default
(System.String);
private
int
currentreviewer
=
0
;
private
string
itemtitle
=
default
(System.String);
private
void
onWorkflowActivated1_Invoked(
object
sender, ExternalDataEventArgs e)
{
this
.workflowId
=
workflowProperties.WorkflowId;
itemtitle
=
workflowProperties.Item.DisplayName;
XmlSerializer myserializer
=
new
XmlSerializer(
typeof
(myFields));
XmlTextReader reader
=
new
XmlTextReader(
new
System.IO.StringReader(workflowProperties.InitiationData));
myFields myinitf
=
(myFields)myserializer.Deserialize(reader);
assignto
=
(myinitf.assignees).ToString();
instructions
=
(myinitf.instructions).ToString();
}
private
void
workflownotFinished(
object
sender, ConditionalEventArgs e)
{
if
(
this
.assignto.Split(Convert.ToChar(
"
;
"
)).Length
<
currentreviewer
+
1
)
{
e.Result
=
false
;
}
else
{
e.Result
=
true
;
}
}
private
bool
isFinished
=
false
;
private
void
taskNotFinished(
object
sender,ConditionalEventArgs e)
{
e.Result
=
!
isFinished;
}
private
void
createTask1_MethodInvoking(
object
sender, EventArgs e)
{
taskId
=
Guid.NewGuid();
isFinished
=
false
;
taskProps.Title
=
"
Please Review:
"
+
itemtitle;
taskProps.AssignedTo
=
this
.assignto.Split(Convert.ToChar(
"
;
"
))[
this
.currentreviewer].ToString();
taskProps.Description
=
this
.instructions;
taskProps.ExtendedProperties[
"
instructions
"
]
=
instructions;
}
private
string
comment
=
default
(System.String);
private
void
onTaskChanged1_Invoked(
object
sender, ExternalDataEventArgs e)
{
this
.isFinished
=
bool
.Parse(afterProps.ExtendedProperties[
"
isFinished
"
].ToString());
this
.comment
=
afterProps.ExtendedProperties[
"
comments
"
].ToString();
}
private
void
completeTask1_MethodInvoking(
object
sender, EventArgs e)
{
this
.currentreviewer
++
;
}
}
}
查看全文
相关阅读:
gulp-px2rem-plugin 将px 转化为 rem
jquery.lazyload.js 的 使用
IDEA集成MyBatis Generator 插件
远程连接数据库 出现 Client does not support authentication protocol requested by server的解决方法
webpack 编译Es6 es7
webpack 自动打包
TypeError: CleanWebpackPlugin is not a constructor
el-table 表格循环多张图片
Android Studio 引入Lambda表达式
去掉SrollView、GrdiView、ListView、ViewPager等滑动到边缘的光晕效果
原文地址:https://www.cnblogs.com/puke/p/901565.html
最新文章
为友盟消息推送开发的PHP SDK(composer版):可以按省发Android push
已解决:Ubuntu php gettext 无效
改写百度云推送SDK,PHP PEAR 包:Services_Baidu_Push
为Apple Push开发的PHP PEAR 包:Services_Apple_PushNotification
PHP发短信 PEAR 包:Services_Sms
云存储:阿里云 和 七牛 的比较
PRM-DUL Oracle恢复软件绿色破解版 下载
Oracle DBA的神器: PRM恢复工具,可脱离Oracle软件运行,直接读取Oracle数据文件中的数据
通过inotify实现反调试
看雪CTF第八题
热门文章
逻辑运算
看雪CTF第十四题
Build GMP on 64bit Windows
看雪CTF第十题
RSA加密算法详解(一)
RSA加密算法详解(二)
BrainFuck 指令
利用SEH防范BP(int 3)断点
jquery 抽取公共方法
gulp 的配置 gulpfile.js
Copyright © 2011-2022 走看看