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


C# DocX.AddCustomProperty方法代码示例

本文整理汇总了C#中Novacode.DocX.AddCustomProperty方法的典型用法代码示例。如果您正苦于以下问题:C# DocX.AddCustomProperty方法的具体用法?C# DocX.AddCustomProperty怎么用?C# DocX.AddCustomProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Novacode.DocX的用法示例。


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

示例1: MergeField

        public override void MergeField(DocX doc)
        {
            base.MergeField(doc);

            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.LabelsPerRoll", this.LabelsPerRoll??0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.SoulDiameter", this.SoulDiameter ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.MaxDiameter", this.MaxDiameter ?? 0));
        }
开发者ID:algola,项目名称:backup,代码行数:8,代码来源:ProductPartSingleLabelRollEx.cs

示例2: MergeField

       public virtual void MergeField(DocX doc)
       {
           doc.AddCustomProperty(new Novacode.CustomProperty("PPPA.TypeOfMaterial", this.TypeOfMaterial));
           doc.AddCustomProperty(new Novacode.CustomProperty("PPPA.NameOfMaterial", this.NameOfMaterial));
           doc.AddCustomProperty(new Novacode.CustomProperty("PPPA.Color", this.Color));
           doc.AddCustomProperty(new Novacode.CustomProperty("PPPA.Weight", this.Weight ?? 0));
           doc.AddCustomProperty(new Novacode.CustomProperty("PPPA.Adhesive", this.Adhesive));
 		        
       }
开发者ID:algola,项目名称:backup,代码行数:9,代码来源:ProductPartsPrintableArticleEx.cs

示例3: MergeField

        public override void MergeField(DocX doc)
        {
            doc.AddCustomProperty(new Novacode.CustomProperty("CustomerBusinessName", this.CustomerSupplier.BusinessName));

            doc.AddCustomProperty(new Novacode.CustomProperty("EstimateNumber", this.EstimateNumber));
            doc.AddCustomProperty(new Novacode.CustomProperty("EstimateNumberSerie", this.EstimateNumberSerie));

            doc.AddCustomProperty(new Novacode.CustomProperty("DocumentName", this.DocumentName));
            doc.AddCustomProperty(new Novacode.CustomProperty("DocumentDate", (this.DateDocument ?? DateTime.Now).ToString("d")));
        }
开发者ID:algola,项目名称:backup,代码行数:10,代码来源:EstimateEx.cs

示例4: MergeField

 public virtual void MergeField(DocX doc)
 {
     doc.AddCustomProperty(new Novacode.CustomProperty("DocumentTaskCenter.DocumentName", this.DocumentName));
     doc.AddCustomProperty(new Novacode.CustomProperty("DocumentTaskCenter.CodDocumentTaskCenter", this.CodDocumentTaskCenter));
     doc.AddCustomProperty(new Novacode.CustomProperty("DocumentTaskCenter.FieldA", this.FieldA));
     doc.AddCustomProperty(new Novacode.CustomProperty("DocumentTaskCenter.FieldB", this.FieldB));
     doc.AddCustomProperty(new Novacode.CustomProperty("DocumentTaskCenter.FieldC", this.FieldC));
 
 
 
 }
开发者ID:algola,项目名称:backup,代码行数:11,代码来源:DocumentTaskCenter.cs

示例5: FillContent

 private static void FillContent(DocX doc, Type type, object obj){
     foreach (var prop in type.GetProperties())
     {
         doc.AddCustomProperty(new CustomProperty("@" + prop.Name, prop.GetValue(obj,null).ToString()));
     }
 }
开发者ID:ACETeam90,项目名称:bacanhtai1,代码行数:6,代码来源:ExportDoc.cs

示例6: MergeField

 public virtual void MergeField(DocX doc)
 {
     doc.AddCustomProperty(new Novacode.CustomProperty("Cost.Description", this.Description));
     doc.AddCustomProperty(new Novacode.CustomProperty("Cost.Quantity", this.Quantity ?? 0));
     doc.AddCustomProperty(new Novacode.CustomProperty("Cost.UnitCost", this.UnitCost));
     doc.AddCustomProperty(new Novacode.CustomProperty("Cost.TotalCost", this.TotalCost));
     doc.AddCustomProperty(new Novacode.CustomProperty("Cost.Markup", this.Markup ?? 0));
     doc.AddCustomProperty(new Novacode.CustomProperty("Cost.GranTotalCost", this.GranTotalCost));
 }
开发者ID:algola,项目名称:backup,代码行数:9,代码来源:CostEx.cs

示例7: MergeField

        public virtual void MergeField(DocX doc)
        {
            TaskCost.MergeField(doc);

            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.Starts", this.Starts ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.GainForRun", this.GainForRun ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.GainForRunForPrintableArticle", this.GainForRunForPrintableArticle ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.GainForMqRun", this.GainForMqRun ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.GainForMqRunForPrintableArticle", this.GainForMqRunForPrintableArticle ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.TypeOfQuantity", this.TypeOfQuantity ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.GainForWeigthRun", this.GainForWeigthRun ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.GainForWeigthRunForPrintableArticle", this.GainForWeigthRunForPrintableArticle ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.Error", this.Error ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.RollChanges", this.RollChanges ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.CalculatedMq", this.CalculatedMq ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.CalculatedMl", this.CalculatedMl ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.CalculatedKg", this.CalculatedKg ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.CalculatedRun", this.CalculatedRun ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.CalculatedTime", (this.CalculatedTime ?? new TimeSpan(0, 0, 0)).ToString()));

            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.Implants", this.Implants ?? 0));            

            if (ProductPartPrinting != null)
            {
                TaskexEcutorSelected = TaskExecutors.FirstOrDefault(x => x.CodTaskExecutor == CodTaskExecutorSelected);
                ProductPartPrinting.MergeField(doc);
            }

        }
开发者ID:algola,项目名称:backup,代码行数:29,代码来源:CostDetail.cs

示例8: MergeField

        public virtual void MergeField(DocX doc)
        {

            doc.AddCustomProperty(new Novacode.CustomProperty("ProductName", this.ProductName.Replace("@", Environment.NewLine)));

            if (this.Product.ProductRefName != null)
            {
                doc.AddCustomProperty(new Novacode.CustomProperty("ProductRefName", this.Product.ProductRefName.Replace("@", Environment.NewLine)));
            }
            else
            {
                doc.AddCustomProperty(new Novacode.CustomProperty("ProductRefName", ""));
            }

            doc.AddCustomProperty(new Novacode.CustomProperty("Quantity", string.Format("{0:n0}",(this.Quantity ?? 0))));
            doc.AddCustomProperty(new Novacode.CustomProperty("UnitPrice", this.UnitPrice));
            doc.AddCustomProperty(new Novacode.CustomProperty("TotalAmount", this.TotalAmount));

        }
开发者ID:algola,项目名称:backup,代码行数:19,代码来源:DocumentProductEx.cs

示例9: CompileFromTemplate

        // Create an invoice for a factitious company called "The Happy Builder".
        private DocX CompileFromTemplate(DocX template, PapiroMVC.Models.Document d)
        {

            //customer
            var customer = customerSupplierRepository.GetSingle(d.CodCustomer);
            customer = customer ?? new Customer();

            var cbase = customer.CustomerSupplierBases.Where(x => x.TypeOfBase.CodTypeOfBase == "0001").FirstOrDefault();

            //se non c'è una sede
            cbase = cbase ?? new CustomerSupplierBase();

            #region Set CustomProperty values
            // Set the value of the custom property 'company_name'.
            template.AddCustomProperty(new Novacode.CustomProperty("company_name", customer.BusinessName));

            // Set the value of the custom property 'company_slogan'.
            template.AddCustomProperty(new Novacode.CustomProperty("company_slogan", ""));

            // Set the value of the custom properties 'hired_company_address_line_one', 'hired_company_address_line_two' and 'hired_company_address_line_three'.
            template.AddCustomProperty(new Novacode.CustomProperty("hired_company_address_line_one", cbase.Address ?? ""));
            template.AddCustomProperty(new Novacode.CustomProperty("hired_company_address_line_two", (cbase.PostalCode ?? "") + " " + (cbase.City ?? "") + " " + (cbase.Province ?? "")));
            template.AddCustomProperty(new Novacode.CustomProperty("hired_company_address_line_three", (cbase.Phone ?? "")));

            // Set the value of the custom property 'invoice_date'.
            template.AddCustomProperty(new Novacode.CustomProperty("invoice_date", d.DateDocument.Value.ToString("d")));

            // Set the value of the custom property 'invoice_number'.
            template.AddCustomProperty(new Novacode.CustomProperty("invoice_number", d.Number.ToString()));

            // Set the value of the custom property 'hired_company_details_line_one' and 'hired_company_details_line_two'.
            template.AddCustomProperty(new Novacode.CustomProperty("hired_company_details_line_one", "Business Street, Dublin, 12345"));
            template.AddCustomProperty(new Novacode.CustomProperty("hired_company_details_line_two", "Phone: 012-345-6789, Fax: 012-345-6789, e-mail: [email protected]"));
            #endregion


            /* 
             * InvoiceTemplate.docx contains a blank Table, 
             * we want to replace this with a new Table that
             * contains all of our invoice data.
             */
            Novacode.Table t = template.Tables[1];
            Novacode.Table invoice_table = CreateAndInsertInvoiceTableAfter(t, ref template, d);
            t.Remove();

            // Return the template now that it has been modified to hold all of our custom data.
            return template;
        }
开发者ID:algola,项目名称:backup,代码行数:49,代码来源:DocumentController2.cs

示例10: MergeField

        public virtual void MergeField(DocX doc)
        {

            //cerco di capire se la macchina èflexo... se è flexo voglio stampare lo zeta e lo h
            if (CostDetail.TaskexEcutorSelected.TypeOfExecutor == TaskExecutor.ExecutorType.Flexo)
            {
                var z = ((Flexo)CostDetail.TaskexEcutorSelected).GetZFromCm(PrintingFormat.GetSide2());
                var pFtoFlexo = "h" + PrintingFormat.GetSide1() + " z" + z.ToString();
                doc.AddCustomProperty(new Novacode.CustomProperty("PPP.PrintingFormat", pFtoFlexo));
            }
            else
            {
                doc.AddCustomProperty(new Novacode.CustomProperty("PPP.PrintingFormat", this.PrintingFormat));
            }

            doc.AddCustomProperty(new Novacode.CustomProperty("PPP.DCut1", this.CalculatedDCut1));
            doc.AddCustomProperty(new Novacode.CustomProperty("PPP.DCut2", this.CalculatedDCut2));
            doc.AddCustomProperty(new Novacode.CustomProperty("PPP.Gain1", this.CalculatedSide1Gain));
            doc.AddCustomProperty(new Novacode.CustomProperty("PPP.Gain2", this.CalculatedSide2Gain));


            if (Part != null)
            {
                doc.AddCustomProperty(new Novacode.CustomProperty("PPP.FormatOpened", this.Part.FormatOpened));
                doc.AddCustomProperty(new Novacode.CustomProperty("PPP.Format", this.Part.Format));
            }
            else
            {
                doc.AddCustomProperty(new Novacode.CustomProperty("PPP.FormatOpened", ""));
                doc.AddCustomProperty(new Novacode.CustomProperty("PPP.Format", this.Part.Format));
            }


        }
开发者ID:algola,项目名称:backup,代码行数:34,代码来源:ProductPartPrinting.cs

示例11: MergeField

 public virtual void MergeField(DocX doc)
 {
     doc.AddCustomProperty(new Novacode.CustomProperty("CodTaskCenter", this.CodTaskCenter));
     doc.AddCustomProperty(new Novacode.CustomProperty("TaskCenterName", this.TaskCenterName));
 }
开发者ID:algola,项目名称:backup,代码行数:5,代码来源:TaskCenterEx.cs

示例12: MergeField

 public override void MergeField(DocX doc)
 {
     doc.AddCustomProperty(new Novacode.CustomProperty("Product.Format", this.Format));
 }
开发者ID:algola,项目名称:backup,代码行数:4,代码来源:ProductSoftEx.cs

示例13: MergeField

 public virtual void MergeField(DocX doc)
 {
     doc.AddCustomProperty(new Novacode.CustomProperty("Product.CodProduct", this.CodProduct));
     doc.AddCustomProperty(new Novacode.CustomProperty("Product.ProductName", this.ProductName.Replace("@", Environment.NewLine)));
     doc.AddCustomProperty(new Novacode.CustomProperty("Product.ProductRefName", this.ProductRefName));
     doc.AddCustomProperty(new Novacode.CustomProperty("CodProduct", this.CodProduct));
     doc.AddCustomProperty(new Novacode.CustomProperty("ProductName", this.ProductName.Replace("@", Environment.NewLine)));
     doc.AddCustomProperty(new Novacode.CustomProperty("ProductRefName", this.ProductRefName));
     //doc.AddCustomProperty(new Novacode.CustomProperty("Product.Format", "ciao"));
 }
开发者ID:algola,项目名称:backup,代码行数:10,代码来源:ProductEx.cs

示例14: MergeField

        public override void MergeField(DocX doc)
        {
            base.MergeField(doc);

            var description = String.Empty;
            if (TypeOfRepass == 0)
            {
                List<ProductPartSerigraphyOption> optSeris = new List<ProductPartSerigraphyOption>();
                //serigraphy options where we can find the inks and types
                foreach (var item in this.TaskCost.ProductPartTask.ProductPartTaskOptions.OfType<ProductPartSerigraphyOption>())
                {
                    description += item.TypeOfTaskSerigraphy + " " + item.InkSerigraphy + "\n";
                }

            }
            else
            {
                List<ProductPartHotPrintingOption> optSeris = new List<ProductPartHotPrintingOption>();
                //serigraphy options where we can find the inks and types
                foreach (var item in this.TaskCost.ProductPartTask.ProductPartTaskOptions.OfType<ProductPartHotPrintingOption>())
                {
                    description += item.Foil + " " + item.Format + "\n";
                }

            }

            doc.AddCustomProperty(new Novacode.CustomProperty("CostDetail.OptionTask", description));
            doc.AddCustomProperty(new Novacode.CustomProperty("PPP.PrintingFormat", this.WorkingFormat));

        }
开发者ID:algola,项目名称:backup,代码行数:30,代码来源:RepassRollCostDetail.cs

示例15: MergeField

        //public double DCut1Calc
        //{ get; set; }

        //public double DCut2Calc
        //{ get; set; }


        public virtual void MergeField(DocX doc)
        {
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.ProductPartName", this.ProductPartName));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.Format", this.Format));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.ServicesNumber", this.ServicesNumber ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.FormatOpened", this.FormatOpened));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.SubjectNumber", this.SubjectNumber ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.DCut", this.DCut ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.IsDCut", this.IsDCut ?? false));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.DCut1", this.DCut1 ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.DCut2", this.DCut2 ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.HaveDCutLimit", this.HaveDCutLimit ?? false));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.MaxDCut", this.MaxDCut ?? 0));
            doc.AddCustomProperty(new Novacode.CustomProperty("ProductPart.MinDCut", this.MinDCut ?? 0));
        }
开发者ID:algola,项目名称:backup,代码行数:22,代码来源:ProductPartEx.cs


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