Ejemplo n.º 1
0
        public override object Deserialize(IDictionary <string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfAURoleResourceDescriptor auRoleResourceDesp = (WfAURoleResourceDescriptor)base.Deserialize(dictionary, type, serializer);
            WrappedAUSchemaRole        role = JSONSerializerExecute.Deserialize <WrappedAUSchemaRole>(dictionary["AUSchemaRole"]);

            auRoleResourceDesp.AUSchemaRole = role;

            return(auRoleResourceDesp);
        }
Ejemplo n.º 2
0
        public override IDictionary <string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            WfAURoleResourceDescriptor auRoleResourceDesp = (WfAURoleResourceDescriptor)obj;

            IDictionary <string, object> dictionary = base.Serialize(obj, serializer);

            dictionary.Add("AUSchemaRole", auRoleResourceDesp.AUSchemaRole);

            return(dictionary);
        }
		/// <summary>
		/// 准备管理单元相关的模板
		/// </summary>
		/// <returns></returns>
		private IWfActivityDescriptor PrepareAURelativeActivityDescriptor(string key)
		{
			WfActivityDescriptor templateActDesp = new WfActivityDescriptor(key, WfActivityType.NormalActivity);
			templateActDesp.Name = "审批";
			templateActDesp.CodeName = key;
			templateActDesp.Properties.SetValue("IsDynamic", true);

			WrappedAUSchemaRole role = new WrappedAUSchemaRole(AUHelper.AUSchemaActivityMatrixRoleID) { Name = "实物管理员", Description = "实物管理员" };

			WfAURoleResourceDescriptor roleDesp = new WfAURoleResourceDescriptor(role);

			templateActDesp.Resources.Add(roleDesp);

			return templateActDesp;
		}