/// <summary> /// 将当前任务更新到数据库CURR_Misson /// </summary> /// <param name="clearFlag"></param> protected void UpdateCurrentEvent(bool clearFlag = false) { CURR_Mission cur_mis = new CURR_Mission(); cur_mis.After_Action = afteraction; cur_mis.Before_Action = beforeaction; cur_mis.Current_Action = currentaction; cur_mis.Miss_Desc = description; cur_mis.Miss_Name = name; //将内部变量的值预填充到权限认证字符串 Dictionary<string, object> inter_params = new Dictionary<string, object>(); foreach (var pa in m_params) inter_params[pa.Key] = pa.Value.value; cur_mis.Str_Authority = m_authority.FillParams(inter_params, null); try { WorkFlows wfs = new WorkFlows(); if (clearFlag == true) wfs.UpdateCurrentMission(m_parentWF.EntityID, null); else wfs.UpdateCurrentMission(m_parentWF.EntityID, cur_mis); } catch(Exception e) { Trace.WriteLine("UpdateCurrentEvent error:" + e.Message); } }