public WorkPlace(string workFlowId, string userId, string userName) { InitializeComponent(); UserId = userId; UserName = userName; _stId = 0; _endtId = 0; _altId = 0; _jtId = 0; _etId = 0; _autoId = 0; _conId = 0; _subId = 0; ToolModel = false; _isDrawingLine = false; _isZhexian = false; IsModify = false; _breakIndex = -1; WorkFlowId = workFlowId; if (WorkFlowId != null && WorkFlowId.Trim().Length > 0) { var tmpWorkflow = new WorkFlowData { WorkFlowId = WorkFlowId }; tmpWorkflow.ReadWorkFlow(); TaskItems = tmpWorkflow.TaskItems; LineItems = tmpWorkflow.LineItems; } }
public void SaveWorkFlow() { try { WorkFlowData tmpWorkflow = new WorkFlowData(); tmpWorkflow.SaveWorkFlow(WorkFlowId, TaskItems, LineItems, State); IsModify = false; MessageBoxHelper.ShowInformationMsg("保存成功!"); } catch (Exception ex) { MessageBoxHelper.ShowErrorMsg("保存失败,错误代码:" + ex.Message.ToString()); } }