示例#1
0
        public virtual void Copy(ProductPartCoverSheet to)
        {
            //All properties of object
            //and pointer of sons

            to.Back = this.Back;
            to.WidthWings = this.WidthWings;

        }
示例#2
0
        public override void InitProduct()
        {
            base.InitProduct();

            var cover = new ProductPartCoverSheet();
            cover.ProductPartTasks = this.GetInitalizedPartTask();
            cover.ProductPartName = "";
            cover.WidthWings = 0;
            cover.Back = 0;

            Type t = typeof(PapiroMVC.Models.Resources.Products.ResProductPart);
            cover.ProductPartName = (string)t.GetProperty(cover.TypeOfProductPart.ToString()).GetValue(null, null);

            ProductPartTask partTask;
            partTask = cover.ProductPartTasks.First(x => x.CodOptionTypeOfTask == "STAMPAOFFeDIGITALE_NO");
            partTask.Hidden = false;
            partTask.IndexOf = 1;

            partTask = cover.ProductPartTasks.First(x => x.CodOptionTypeOfTask == "PLASTIFICATURA_NO");
            partTask.Hidden = false;
            partTask.IndexOf = 2;

            ProductPartSheetArticle material = new ProductPartSheetArticle();

            cover.ProductPartPrintableArticles.Add(material);
            ProductParts.Add(cover);

            //-------------------------------------------------------------------------------------------

            var intern = new ProductPartBookSheet();
            intern.ProductPartTasks = this.GetInitalizedPartTask();

            partTask = intern.ProductPartTasks.First(x => x.CodOptionTypeOfTask == "STAMPAOFFeDIGITALE_NO");
            partTask.Hidden = false;
            partTask.IndexOf = 1;

            material = new ProductPartSheetArticle();

            intern.ProductPartPrintableArticles.Add(material);
            ProductParts.Add(intern);

            //descrizone che poi andrà nei costi per identificare la parte!
            intern.ProductPartName = (string)t.GetProperty(intern.TypeOfProductPart.ToString()).GetValue(null, null);
            intern.ProductPartName += " 1";

        }