public static void Submit(GBMemo memo) { string strFlowCode = ""; string strNodeCode = ""; string strTypeCode = ""; if (memo.ProjectId.ToLower().IndexOf("rebuild") != -1) { strFlowCode = FlowCode.Rebuild; strNodeCode = NodeCode.Finish; strTypeCode = FlowCode.Rebuild_GBMemo; } else if (memo.ProjectId.ToLower().IndexOf("reimage") != -1) { strFlowCode = FlowCode.Reimage; strNodeCode = NodeCode.Finish; strTypeCode = FlowCode.Reimage_GBMemo; } var task = TaskWork.GetTaskWork(memo.ProjectId, ClientCookie.UserCode, TaskWorkStatus.UnFinish, strFlowCode, strTypeCode); task.Status = TaskWorkStatus.Finished; task.FinishTime = DateTime.Now; string taskUrl = "/" + strFlowCode + "/Main#/GBMemo/Process/View?projectId=" + memo.ProjectId; task.Url = taskUrl; using (var scope = new TransactionScope()) { TaskWork.Update(task); SaveGBMemo(memo); ProjectInfo.UpdateProjectNode(memo.ProjectId, strTypeCode, strNodeCode); scope.Complete(); } }