protected override void OnFlowEnd(T_Foreign_Goabroadpersonal entity, Workflow.Logic.Domain.S_WF_InsTaskExec taskExec, Workflow.Logic.Domain.S_WF_InsDefRouting routing) { var mod = new S_E_Peerlist(); mod.ID = FormulaHelper.CreateGuid(); mod.ApplyDate = entity.Applytime; mod.ApplyType = "因私出国"; mod.T_Foreign_GoabroadapplybusinessID = entity.ID; mod.TaskName = entity.Position; mod.UserID = entity.ApplyUser; mod.UserName = entity.ApplyUserName; mod.DeptID = entity.Appledept; mod.DeptName = entity.AppledeptName; mod.Code = entity.ApplyCode; mod.Gocountry = entity.Country; BusinessEntities.Set <S_E_Peerlist>().Add(mod); BusinessEntities.SaveChanges(); }
protected override void OnFlowEnd(T_Foreign_Goabroadapplybusiness entity, Workflow.Logic.Domain.S_WF_InsTaskExec taskExec, Workflow.Logic.Domain.S_WF_InsDefRouting routing) { var list = entity.T_Foreign_Goabroadapplybusiness_Peerlist.ToList(); var mod = new S_E_Peerlist(); mod.ID = FormulaHelper.CreateGuid(); mod.ApplyDate = entity.Applytime; mod.ApplyType = "因公出国"; mod.T_Foreign_GoabroadapplybusinessID = entity.ID; mod.TaskName = entity.Taskname; mod.UserID = entity.ApplyUser; mod.UserName = entity.ApplyUserName; mod.DeptID = entity.Applydept; mod.DeptName = entity.ApplydeptName; mod.Code = FormulaHelper.GetUserInfoByID(entity.ApplyUser).Code; mod.Gocountry = entity.Gocountry; BusinessEntities.Set <S_E_Peerlist>().Add(mod); foreach (var item in list) { mod = new S_E_Peerlist(); mod.ID = FormulaHelper.CreateGuid(); mod.ApplyDate = entity.Applytime; mod.ApplyType = "因公出国"; mod.T_Foreign_GoabroadapplybusinessID = entity.ID; mod.TaskName = entity.Taskname; mod.UserID = item.UserID; mod.UserName = item.Name; mod.DeptID = item.Dept; mod.DeptName = item.DeptName; mod.Code = item.Workid; mod.Gocountry = entity.Gocountry; BusinessEntities.Set <S_E_Peerlist>().Add(mod); } BusinessEntities.SaveChanges(); }