当前位置: 首页>>代码示例>>C#>>正文


C# IProcessDefinition类代码示例

本文整理汇总了C#中IProcessDefinition的典型用法代码示例。如果您正苦于以下问题:C# IProcessDefinition类的具体用法?C# IProcessDefinition怎么用?C# IProcessDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IProcessDefinition类属于命名空间,在下文中一共展示了IProcessDefinition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddEditableRootControlSpecificMethods

        /// <summary>
        /// Adds the editable root control specific methods.
        /// </summary>
        /// <param name="assemblyCode">The assembly code.</param>
        /// <param name="process">The process.</param>
        public override void AddEditableRootControlSpecificMethods(StringBuilder assemblyCode, IProcessDefinition process)
        {
            base.AddEditableRootControlSpecificMethods(assemblyCode, process);

            assemblyCode.Append(@"
        public void Copy()
        {
            using (BypassPropertyChecks)
            {
                Locked = null;
                LockedByAccountId = null;
                LockedByAccountName = null;
                LastModifiedOn = DateTime.Now;
                IsNewVersion = true;
                ApplyEdit();
                Save(true);
            }
        }");

            //When we change IFileProcess, we need to add UploadFile(string fileName) method
            //and update FileFieldUpdater.Update()
            assemblyCode.Append(@"
        public void UploadFile()
        {
            DataPortal.Execute(new UploadFileCommand { FileName = FileName });
        }
        ");
        }
开发者ID:mparsin,项目名称:Elements,代码行数:33,代码来源:FileProcessServerExtension.cs

示例2: OnAfterEditableRootAddBusinessRules

        /// <summary>
        /// This method is called after generation of all logic code in Editable Root AddBusinessRules method.
        /// </summary>
        /// <param name="code">Code holder.</param>
        /// <param name="process">Generating process definition.</param>
        public override void OnAfterEditableRootAddBusinessRules(StringBuilder code, IProcessDefinition process)
        {
            base.OnAfterEditableRootAddBusinessRules(code, process);

            code.Append(@" BusinessRules.AddRule(new CalendarsWorkingIntervalsRule());");
            code.Append(@" BusinessRules.AddRule(new CalendarsUniqNameRule());"); 
        }
开发者ID:mparsin,项目名称:Elements,代码行数:12,代码来源:CalendarInterfacesExtension.cs

示例3: OnBefore_EditableRoot_DataPortal_Update_InvokeActions

        /// <summary>
        /// This method is called before ActionManager.InvokeActions in EditableRoot.DataPortal_Update.
        /// </summary>
        /// <param name="code">
        /// The code.
        /// </param>
        /// <param name="process">
        /// The process.
        /// </param>
        public override void OnBefore_EditableRoot_DataPortal_Update_InvokeActions(StringBuilder code, IProcessDefinition process)
        {
            // Update action items if BasePerson.OutOfOffice changes.
            code.AppendFormat(@"
            ActionItemManager.CheckOutOfOffice(this, oldItem);
");
        }
开发者ID:mparsin,项目名称:Elements,代码行数:16,代码来源:BasePersonExtension.cs

示例4: OnAfter_AddClassProperties

        /// <summary>
        /// Called when [after_ add class properties].
        /// </summary>
        /// <param name="assemblyCode">The assembly code.</param>
        /// <param name="process">The process.</param>
        /// <param name="isInfoProperty">if set to <c>true</c> [is information property].</param>
        /// <param name="resolveRefTypes">if set to <c>true</c> [resolve reference types].</param>
        /// <param name="skipId">if set to <c>true</c> [skip identifier].</param>
        public override void OnAfter_AddClassProperties(StringBuilder assemblyCode, IProcessDefinition process, bool isInfoProperty, bool resolveRefTypes, bool skipId = false)
        {
            if (!isInfoProperty) return;

            foreach (var crf in process.RootTable.FieldList.Where(f => f.ColumnType == ColumnTypes.Reference && !f.IsHidden && f.IncludeInList))
            {
                assemblyCode.AppendFormat(@"
        private {1}Info _{0}Member;
        public {1}Info {0}Member
        {{ 
            get 
            {{
                if (_{0}Member == null && {0}Id > 0) 
                {{
                    var items = {1}List.Get{1}PageList(string.Empty, {0}Id, 1, null, null);
                    if (items.Count > 0) 
                    {{
                        _{0}Member = items[0];
                    }}
                }}
                return _{0}Member;
            }}
        }}
"
                    , crf.ColumnName, crf.ReferencedProcessName);
            }
        }
开发者ID:mparsin,项目名称:Elements,代码行数:35,代码来源:BasePersonExtension.cs

示例5: OnAfter_EditableChild_DataPortal_Fetch

        /// <summary>
        /// Called when [after_ editable child_ data portal_ fetch].
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="process">The process.</param>
        public override void OnAfter_EditableChild_DataPortal_Fetch(StringBuilder code, IProcessDefinition process)
        {
            base.OnAfter_EditableChild_DataPortal_Fetch(code, process);

            AddUpdateApprovalMembers(code, process);
            AddLoadApprovalOverrideMembers(code, process);
        }
开发者ID:mparsin,项目名称:Elements,代码行数:12,代码来源:ApprovalFieldExtension.cs

示例6: OnBefore_EditableRoot_DataPortal_Insert_UpdateChildren

        /// <summary>
        /// Called when [before_ editable root_ data portal_ insert_ update children].
        /// </summary>
        /// <param name="assemblyCode">The assembly code.</param>
        /// <param name="process">The process.</param>
        public override void OnBefore_EditableRoot_DataPortal_Insert_UpdateChildren(StringBuilder assemblyCode, IProcessDefinition process)
        {
            base.OnBefore_EditableRoot_DataPortal_Insert_UpdateChildren(assemblyCode, process);
			if (process.SampleFields == null)
				return;

            foreach (var sample in process.SampleFields.Values)
            {
                assemblyCode.AppendFormat(@"
            if ({0} == null || {0}.Count == 0)
            {{
                LoadProperty({0}Property, {0}SampleList.PopulateSampleList(this));
            }}
            ", sample.Name);

                //if it is not 0 or 1 or 2 which are indexes of SampleType because this is how sample type was stored in old processes
                if (!string.IsNullOrEmpty(sample.SampleTypeFieldName) && !Char.IsDigit(sample.SampleTypeFieldName[0]))
                {
                    assemblyCode.AppendFormat(@"
            if (string.IsNullOrEmpty({0}))
                LoadProperty({0}Property, ""Number"");
            ", sample.SampleTypeFieldName);
                }
            }
        }
开发者ID:mparsin,项目名称:Elements,代码行数:30,代码来源:SampleExtension.cs

示例7: EditableRoot_GenerateControlSpecificFunctions

        /// <summary>
        /// Editables the root_ generate control specific functions.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="process">The process.</param>
        public override void EditableRoot_GenerateControlSpecificFunctions(StringBuilder code, IProcessDefinition process)
        {
            base.EditableRoot_GenerateControlSpecificFunctions(code, process);

            foreach (var field in process.TableList[0].FieldList.Where(x => x.ColumnType == ColumnTypes.File && (x.ConvertToPdf || x.UseReport)))
            {
                if (string.IsNullOrEmpty(field.CoverPagePortraitReportName) && string.IsNullOrEmpty(field.CoverPageLandscapeReportName) &&
                    string.IsNullOrEmpty(field.WatermarkPortraitReportName) && string.IsNullOrEmpty(field.WatermarkLandscapeReportName) &&
                    string.IsNullOrEmpty(field.AppendixLandscapeReportName) && string.IsNullOrEmpty(field.AppendixPortraitReportName) &&
                    string.IsNullOrEmpty(field.ReportName)) continue;

                code.Append("\t\t\t").Append(@"
        [NonSerialized]
        [NotUndoable]
        private IFileManager _fileManager;

        public IFileManager TheFileManager
        {
            get 
            { 
                return _fileManager ??
                      (_fileManager = ImportDependency<IFileManager>());
            }
            set { _fileManager = value; }
        }
");
                return;
            }

        }
开发者ID:mparsin,项目名称:Elements,代码行数:35,代码来源:FileExtension.cs

示例8: OnAfter_EditableRoot_DataPortal_Create

        /// <summary>
        /// Called when [after_ editable root_ data portal_ create].
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="process">The process.</param>
        public override void OnAfter_EditableRoot_DataPortal_Create(StringBuilder code, IProcessDefinition process)
        {
            base.OnAfter_EditableRoot_DataPortal_Create(code, process);

            code.AppendFormat(@"
            LoadProperty({0}Property, false);", Constants.OutOfOfficePropertyName).AppendLine();
        }
开发者ID:mparsin,项目名称:Elements,代码行数:12,代码来源:BasePersonInterfacesExtension.cs

示例9: AddEditClassProperties

        /// <summary>
        /// Adds extra properties to EditableRoot.
        /// </summary>
        /// <param name="code">The source code under generation.</param>
        /// <param name="process">Current process.</param>
        public override void AddEditClassProperties(StringBuilder code, IProcessDefinition process)
        {
            base.AddEditClassProperties(code, process);

            if (process.SampleFields == null)
                return;

            foreach (var sample in process.SampleFields.Values)
            {
                var sampleSettings = new XElement("SampleSettings",
                   new XAttribute("Id", sample.Id),
                   new XAttribute("SampleTypeFieldName", sample.SampleTypeFieldName),
                   new XAttribute("UpperSpecFieldName", sample.UpperSpecFieldName),
                   new XAttribute("LowerSpecFieldName", sample.LowerSpecFieldName),
                   new XAttribute("SamplingTechniqueFieldName", sample.SamplingTechniqueFieldName),
                   new XAttribute("SampleSizeType", sample.SampleSizeType.ToString()),
                   new XAttribute("SampleSizeFieldName", sample.SampleSizeFieldName),
                   new XAttribute("BatchSizeFieldName", sample.BatchSizeFieldName),
                   new XAttribute("AQLTableFieldName", sample.AQLTableFieldName),
                   new XAttribute("AQLFieldName", sample.AQLFieldName),
                   new XAttribute("NumberOfDecimalsFieldName", sample.NumberOfDecimalsFieldName));

                code.AppendFormat(@"
		public string {0}{1}
		{{
			get {{ return ""{2}""; }}
		}}
", sample.Name, Constants.SampleSettingPostfix, sampleSettings.ToString().Replace("\"", "\\\""));
            }
        }
开发者ID:mparsin,项目名称:Elements,代码行数:35,代码来源:SampleFieldExtension.cs

示例10: GetAuditUnions

        /// <summary>Gets the audit from cross referenced table for CR fields with Link Field.</summary>
        /// <param name="process">The process.</param>
        /// <returns></returns>
        private string GetAuditUnions(IProcessDefinition process)
        {
            var code = new StringBuilder();
            foreach (var field in process.TableList[0].FieldList.Where(f => f.IsRef && !string.IsNullOrEmpty(f.LinkFieldSystemName)))
            {
                code.AppendLine().AppendFormat(@"
UNION ALL
SELECT [Id]
      ,[Type]
      ,@id
      ,'{0}'
      ,''
      ,'Link added: Process={1}, Id=' + CAST([ItemId] AS VARCHAR(10))
      ,[UpdateDate]
      ,[UserName]
FROM [audit].[{1}]
WHERE NewValue LIKE 'Process={2}, Id=' + CAST(@id AS VARCHAR(10)) + ',%'
UNION ALL
SELECT [Id]
      ,[Type]
      ,@id
      ,'{0}'
      ,'Link removed: Process={1}, Id=' + CAST([ItemId] AS VARCHAR(10))
	  ,''
      ,[UpdateDate]
      ,[UserName]
FROM [audit].[{1}]
WHERE OldValue LIKE 'Process={2}, Id=' + CAST(@id AS VARCHAR(10)) + ',%'", field.SystemName, field.ReferenceColumnTable, process.Name).AppendLine();
            }

            if (code.Length > 0)
                code.AppendLine().Append("ORDER BY UpdateDate DESC");

            return code.ToString();
        }
开发者ID:mparsin,项目名称:Elements,代码行数:38,代码来源:AuditTrailExtension.cs

示例11: AddEditClassProperties

        /// <summary>
        /// Adds extra properties to EditableRoot.
        /// </summary>
        /// <param name="code">The source code under generation.</param>
        /// <param name="process">Current process.</param>
        public override void AddEditClassProperties(StringBuilder code, IProcessDefinition process)
        {
            base.AddEditClassProperties(code, process);

            foreach (var field in process.RootTable.FieldList.Where(f => f.ColumnType == ColumnTypes.Frequency))
            {
                code.AppendFormat(
                    @"
            public Cebos.Veyron.SharedTypes.FrequencyInfo {0}{4}
            {{
                get
                {{
                    return new Cebos.Veyron.SharedTypes.FrequencyInfo({0}, {0}{1}, {0}{2}, {0}{3});
                }}

                set
                {{
                    {0} = value.Name;
                    {0}{1} = value.FrequencyType;
                    {0}{2} = value.FrequencyHours;
                    {0}{3} = value.SelectedEvent;
                }}
            }}
",
                    field.SystemName,
                    Constants.FrequencyEventTypeFieldSuffix,
                    Constants.FrequencyEventHoursFieldSuffix,
                    Constants.FrequencyEventSelectedFrequencyFieldSuffix,
                    Constants.FrequencyEventInfoFieldSuffix);
            }
        }
开发者ID:mparsin,项目名称:Elements,代码行数:36,代码来源:FrequencyFieldExtension.cs

示例12: ActivityFormImpl

		public ActivityFormImpl(IProcessDefinition processDefinition, IList fields, IDictionary attributeValues)
		{
			this._processDefinition = processDefinition;
			this._activityState = (IActivityState) processDefinition.StartState;
			this._fields = fields;
			this._attributeValues = attributeValues;
			InitTransitionNames(processDefinition.StartState);
		}
开发者ID:qwinner,项目名称:NetBPM,代码行数:8,代码来源:ActivityFormImpl.cs

示例13: OnBefore_EditableRoot_DataPortal_Insert_UpdateChildren

 public override void OnBefore_EditableRoot_DataPortal_Insert_UpdateChildren(StringBuilder code, IProcessDefinition process)
 {
     foreach (var gageField in process.RootTable.FieldList.Where(x => x.ColumnType == ColumnTypes.GageRR))
     {
         code.AppendFormat(@"
     DataPortal.UpdateChild({0}_Member, new MsaUpdateCriteria{{ParentId = Id, Connection = connection}});", gageField.SystemName);
     }
 }
开发者ID:mparsin,项目名称:Elements,代码行数:8,代码来源:GageRRExtension.cs

示例14: OnAfterEditableRootAddBusinessRules

        /// <summary>
        /// This method is called after generation of all logic code in Editable Root AddBusinessRules method.
        /// </summary>
        /// <param name="code">Code holder.</param>
        /// <param name="process">Generating process definition.</param>
        public override void OnAfterEditableRootAddBusinessRules(StringBuilder code, IProcessDefinition process)
        {
            base.OnAfterEditableRootAddBusinessRules(code, process);

            code.Append(@"BusinessRules.AddRule(new FrequencyPatternNameRule(NameProperty));")
                .AppendLine()
                .Append(@"BusinessRules.AddRule(new FrequencyPatternPatternTypeRule(PatternTypeProperty));");
        }
开发者ID:mparsin,项目名称:Elements,代码行数:13,代码来源:FrequencyPatternInterfacesExtension.cs

示例15: AddUpdateApprovalMembers

        /// <summary>
        /// Adds the update approval members.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="process">The process.</param>
        private void AddUpdateApprovalMembers(StringBuilder code, IProcessDefinition process)
        {
            if (process.RootTable.FieldList.All(f => f.ColumnType != ColumnTypes.Approval))
                return;

            code.AppendFormat(@"
            UpdateApprovalMembers();");
        }
开发者ID:mparsin,项目名称:Elements,代码行数:13,代码来源:ApprovalFieldExtension.cs


注:本文中的IProcessDefinition类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。