protected void InsertMissionToDB() { WorkFlows wfs = new WorkFlows(); Mission mis = new Mission(); mis.Miss_Name = this.name; mis.Miss_WFentity = null; mis.Miss_Desc = this.description; mis.Event_Name = this.name; mis.next_Mission = null; mis.pre_Mission = null; mis.Record_Info = null; try { wfs.AddMissionRecord(m_parentWF.EntityID, mis); List<Mission_Param> pars = new List<Mission_Param>(); foreach(var pa in m_params) { Mission_Param par = new Mission_Param(); par.Param_Name = pa.Value.name; par.Param_Type = pa.Value.type; par.Param_Value = Convert.ToString(pa.Value.value); par.Param_Desc = pa.Value.description; pars.Add(par); } wfs.LinkParamsToMiss(mis.Miss_Id, pars); } catch(Exception e) { return; } }