就写写代码,大家参考一下。
if (Convert.ToString(FormDataSet["FormManpower.Location"]).Contains("SHANGHAI")) { return Role.FromFullName("BPMOU://Shanghai/HR Specialist").Members; } else if (Convert.ToString(FormDataSet["FormManpower.OrderBPCode"]).Contains("BEIJING")) { return Role.FromFullName("BPMOU://Beijing/HR Specialist").Members; } else { return Initiator.GetParentOU("Company").GetAllRoles("HR Specialist").AllMembers; }
第二种
if (Convert.ToString(FormDataSet["FormNPNR.SBU"]).Contains("Eng Mgmt") && Convert.ToString(FormDataSet["FormNPNR.ItemGroup"]).Contains("034")) { return Member.FromAccount("Troy.Cui"); } else { return Member.FromAccount(FormDataSet["FormNPNR.SBUManager"].ToString()); }