//沈峥注释掉,2015/6/21.必须提供列定义 //public void FillCreateActivityParams(WfCreateActivityParamCollection capc, PropertyDefineCollection definedProperties) //{ // SOARolePropertyDefinitionCollection definitions = null; // SOARole role = this._Role as SOARole; // if (role != null) // definitions = role.PropertyDefinitions; // else // definitions = new SOARolePropertyDefinitionCollection(); // this.FillCreateActivityParams(capc, definitions, definedProperties); //} public void FillCreateActivityParams(WfCreateActivityParamCollection capc, SOARolePropertyDefinitionCollection definitions, PropertyDefineCollection definedProperties) { capc.NullCheck("capc"); definitions.NullCheck("definitions"); SOARolePropertyRowUsersCollection rowsUsers = GenerateRowsUsers(); rowsUsers.ForEach(rowUsers => capc.Add(WfCreateActivityParam.FromRowUsers(rowUsers, definitions, definedProperties))); if (definitions.MatrixType == WfMatrixType.ActivityMatrix) { capc.MergeSameActivityParamBySN(); } capc.ForEach(cap => InitTransitionTemplatesProperties(cap, definitions, cap.Source)); }
private static OguDataCollection <IUser> CalculateRowOperators() { OguDataCollection <IUser> result = new OguDataCollection <IUser>(); if (ObjectContextCache.Instance.ContainsKey("RoleMatrixCurrentRow")) { SOARolePropertyRow row = (SOARolePropertyRow)ObjectContextCache.Instance["RoleMatrixCurrentRow"]; SOARolePropertyRowCollection rows = new SOARolePropertyRowCollection(); rows.Add(row); SOARolePropertyRowUsersCollection rowsUsers = rows.GenerateRowsUsers(); rowsUsers.ForEach(ru => result.CopyFrom(ru.Users)); } return(result); }