第八章 启动与执行业务流程(六)
来源:互联网 发布:淘宝教育客户端下载 编辑:程序博客网 时间:2024/06/05 17:43
8.2 启动与执行业务流程
8.2.2 TaskInstance.aspx.cs文件代码:
......(续前页,继续Page_Load()函数内容)
//显示前面任务已上传的附件
if(ds.Tables[0].Rows[0]["AboutAttached"].ToString().Trim() == "R"
|| ds.Tables[0].Rows[0]["AboutAttached"].ToString().Trim() == "LR")
{
//这里的sql语句的前提是回退并重新选择新的分支(或分支,而且过程逻辑不允许嵌套)
//执行时要删除原分支的所有任务实例以及它们上传的相关附件等。
strSql="select ImageID,ImageName from RelatedAttachedImages where
ProcessInstanceID="+ds.Tables[1].Rows[0]["ProcessInstanceID"].ToString()
+" and TaskInstanceID < "+ViewState["taskinstanceid"].ToString();
DataSet attachedds=basecode.SQLExeDataSet(strSql);
if(attachedds != null & attachedds.Tables[0].Rows.Count>=1)
{
TableRow tr;
TableCell tc;
tr=new TableRow();
tc=new TableCell();
tc.HorizontalAlign=HorizontalAlign.Right;
tc.Width=Unit.Percentage(15);
tc.Text="相关资料";
tr.Cells.Add(tc);
tc=new TableCell();
tr.Cells.Add(tc);
Tbl.Rows.Add(tr);
HyperLink link;