Beispiel #1
0
        public override List<ProductPartTask> GetInitalizedPartTask()
        {
            var tsksInPart = new List<ProductPartTask>();

            ProductPartTask pt;

            String[] codTypeOfTasks = { "STAMPAMORBIDO" };

            foreach (var item in codTypeOfTasks)
            {
                pt = new ProductPartTask();
                //default selection
                pt.OptionTypeOfTask = SystemTaskList.FirstOrDefault(x => x.CodTypeOfTask == item).OptionTypeOfTasks.FirstOrDefault(y => y.CodOptionTypeOfTask == item + "_NO");
                pt.CodOptionTypeOfTask = pt.OptionTypeOfTask.CodOptionTypeOfTask;
                pt.Hidden = true;
                tsksInPart.Add(pt);
            }

            return tsksInPart;
        }
Beispiel #2
0
        //initialize only posiible part task like... plastificatura etc...
        public List<ProductPartTask> GetInitalizedPartTask()
        {
            IQueryable<TypeOfTask> taskList = typeOfTaskRepository.GetAll();
            var tsksInPart = new List<ProductPartTask>();

            ProductPartTask pt;

            String[] codTypeOfTasks = { "STAMPA", "PLASTIFICATURA" };

            foreach (var item in codTypeOfTasks)
            {
                pt = new ProductPartTask();
                //default selection
                pt.OptionTypeOfTask = taskList.FirstOrDefault(x => x.CodTypeOfTask == item).OptionTypeOfTasks.FirstOrDefault(y => y.CodOptionTypeOfTask == item + "_NO");
                pt.CodOptionTypeOfTask = pt.OptionTypeOfTask.CodOptionTypeOfTask;
                pt.Hidden = true;
                tsksInPart.Add(pt);
            }

            return tsksInPart;

        }
Beispiel #3
0
        public virtual void Copy(ProductPartTask to)
        {
            //All properties of object
            //and pointer of sons
            to.IndexOf = this.IndexOf;
            to.Hidden = this.Hidden;
            to.TimeStampTable = this.TimeStampTable;
            to.CodProductPart = this.CodProductPart;
            to.CodProductPartTask = this.CodProductPartTask;
            to.OptionTypeOfTask = this.OptionTypeOfTask;
            to.CodOptionTypeOfTask = this.CodOptionTypeOfTask;


            foreach (var mk in ProductPartTaskOptions)
            {
                var mk2 = (ProductPartTaskOption)mk.Clone();
                //                mk2.ProductPartPrintingGain = to;
                if (to.ProductPartTaskOptions == null)
                {
                    to.ProductPartTaskOptions = new HashSet<ProductPartTaskOption>();
                }

                to.ProductPartTaskOptions.Add(mk2);

            }


        }
        public override List<ProductPartTask> GetInitalizedPartTask()
        {
            var tsksInPart = new List<ProductPartTask>();

            ProductPartTask pt;

            String[] codTypeOfTasks = { "STAMPAETICHROTOLO", "FUSTELLATURAROTOLO", "STAMPAACALDOROTOLO",
                                          "SERIGRAFIAROTOLO", 
                                          "TAVOLOCONTROLLO" };

            foreach (var item in codTypeOfTasks)
            {

                switch (item)
                {
                    case "STAMPAETICHROTOLO":
                        pt = new ProductPartPrintRoll();
                        break;
                    case "SERIGRAFIAROTOLO":
                        var pts = new ProductPartSerigraphy();
                        //pts.ProductPartTaskOptions.Add(new ProductPartSerigraphyOption { TypeOfTaskSerigraphy = "", InkSerigraphy = "b" });
                        pt = pts;
                        break;
                    case "STAMPAACALDOROTOLO":
                        pt = new ProductPartHotPrinting();
                        break;

                    default:
                        pt = new ProductPartTask();
                        break;
                }
                //default selection
                pt.OptionTypeOfTask = SystemTaskList.FirstOrDefault(x => x.CodTypeOfTask == item).OptionTypeOfTasks.FirstOrDefault(y => y.CodOptionTypeOfTask == item + "_NO");

                if (item == "TAVOLOCONTROLLO")
                    pt.OptionTypeOfTask = SystemTaskList.FirstOrDefault(x => x.CodTypeOfTask == item).OptionTypeOfTasks.FirstOrDefault(y => y.CodOptionTypeOfTask == item + "_SI");

                pt.CodOptionTypeOfTask = pt.OptionTypeOfTask.CodOptionTypeOfTask;
                pt.Hidden = true;
                tsksInPart.Add(pt);
            }

            return tsksInPart;
        }
Beispiel #5
0
        public override List<ProductPartTask> GetInitalizedPartTask()
        {
            var tsksInPart = base.GetInitalizedPartTask();

            ProductPartTask pt;

            String[] codTypeOfTasks = {"FUSTELLATURA","TAGLIO" };

            foreach (var item in codTypeOfTasks)
            {

                pt = new ProductPartTask();
                //default selection
                pt.OptionTypeOfTask = SystemTaskList.FirstOrDefault(x => x.CodTypeOfTask == item).OptionTypeOfTasks.FirstOrDefault(y => y.CodOptionTypeOfTask == item + "_NO");

                if (item == "FUSTELLATURA" && CodMenuProduct.Contains("Sago"))
                    pt.OptionTypeOfTask = SystemTaskList.FirstOrDefault(x => x.CodTypeOfTask == item).OptionTypeOfTasks.FirstOrDefault(y => y.CodOptionTypeOfTask == item + "_SI");

                if (item == "TAGLIO" && !CodMenuProduct.Contains("Sago"))
                    pt.OptionTypeOfTask = SystemTaskList.FirstOrDefault(x => x.CodTypeOfTask == item).OptionTypeOfTasks.FirstOrDefault(y => y.CodOptionTypeOfTask == item + "_AL_VIVO");
                
                pt.CodOptionTypeOfTask = pt.OptionTypeOfTask.CodOptionTypeOfTask;
                pt.Hidden = true;
                tsksInPart.Add(pt);
            }

            return tsksInPart;
        }
 public override void Copy(ProductPartTask to)
 {
     base.Copy(to);
 }
 public override void Copy(ProductPartTask to)
 {
     base.Copy(to);
     ((ProductPartPrintRoll)to).PrintSide = this.PrintSide;
     ((ProductPartPrintRoll)to).ColorFormulation = this.ColorFormulation;
 }