コード例 #1
0
        public static void Ensure310Opts(List<WorksheetEditOpt> worksheetOpts)
        {
            if (!worksheetOpts.Any(o => (o.Type == OptionType.Characteristic) && (o.TypeCD == WorksheetEditOpt.LeatherPatternTypeCD)))
            {
                WorksheetEditOpt optCol = new WorksheetEditOpt();
                optCol.Type = OptionType.Characteristic;
                optCol.TypeCD = WorksheetEditOpt.LeatherPatternTypeCD;
                optCol.TypeDescr = "Pattern";
                optCol.OptionCode1 = WorksheetEditOpt.LeatherPatternOptCD;
                worksheetOpts.Add(optCol);
            }

            if (!worksheetOpts.Any(o => (o.Type == OptionType.Characteristic) && (o.TypeCD == WorksheetEditOpt.LeatherColorTypeCD)))
            {
                WorksheetEditOpt optCol = new WorksheetEditOpt();
                optCol.Type = OptionType.Characteristic;
                optCol.TypeCD = WorksheetEditOpt.LeatherColorTypeCD;
                optCol.TypeDescr = "Color";
                optCol.OptionCode1 = WorksheetEditOpt.Color1ColorOptCD;
                worksheetOpts.Add(optCol);
            }
        }
コード例 #2
0
        public WorksheetEditOpt AddComp()
        {
            Modified = true;

            int nextSeq = SortSeqComps();

            WorksheetEditOpt parentOpt = new WorksheetEditOpt
            {
                Level = 1,
                Type = OptionType.Component,
                TypeCD = ActionTypeCD,
                TypeDescr = ActionTypeDescr,
                OptionCode1 = IsisEntities.SalesSetid,
                OptionCode2 = ActionOptCD2,
                CompOptCd3Seq = nextSeq,
                OptionDescr = ActionOptDescr,
                ImgCount = 0,
                WorksheetID = this.WorksheetID,
                UserDefined = ActionOptUDF,
                GroupStart = true
            };
            parentOpt.TypeGroupCD = parentOpt.GroupID;

            List<WorksheetEditOpt> compGrpOpts = new List<WorksheetEditOpt> { parentOpt };

            WorksheetOpt.CompSubChars<WorksheetEditOpt>(parentOpt, compGrpOpts);
            WorksheetOpt.CompSubComps<WorksheetEditOpt>(parentOpt, compGrpOpts);

            compGrpOpts.ForEach(o => o.TypeGroupCD = parentOpt.GroupID );

            EnsureWorksheet();
            WorksheetOpts.AddRange(compGrpOpts);

            return parentOpt;
        }
コード例 #3
0
 protected void AssgnOptImgs(WorksheetEditOpt opt)
 {
     opt.AssignTypeProps();
     opt.ProdImageInfoSet = IsisDbContext.ProdImageInfoSet(opt.CompProdCD);
     opt.ImgCount = opt.ProdImageInfoSet.IfNotNull(s => s.Count);
 }