Пример #1
0
        public override void CreateEntities(PxMetaModel.PcAxisMetabaseEntities context)
        {
            if (IsNew)
            {
                base.CreateEntities(context);

                PxMetaModel.FootnoteContTime footnoteContentTime = new PxMetaModel.FootnoteContTime();

                footnoteContentTime.MainTable = ContentTime.Content.MainTable.TableId;

                footnoteContentTime.Contents = ContentTime.Content.Content;

                footnoteContentTime.TimePeriod = ContentTime.TimePeriod;

                footnoteContentTime.FootnoteNo = FootnoteNo;

                footnoteContentTime.Cellnote = "N";

                footnoteContentTime.UserId = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

                footnoteContentTime.LogDate = DateTime.Now;

                context.AddToFootnoteContTimes(footnoteContentTime);
            }

            else
            {
                base.UpdateEntities(context);
            }
        }
        public override void CreateEntities(PxMetaModel.PcAxisMetabaseEntities context)
        {
            if (IsNew)
            {
                base.CreateEntities(context);

                PxMetaModel.FootnoteContTime footnoteContentTime = new PxMetaModel.FootnoteContTime();

                footnoteContentTime.MainTable = ContentTime.Content.MainTable.TableId;

                footnoteContentTime.Contents = ContentTime.Content.Content;

                footnoteContentTime.TimePeriod = ContentTime.TimePeriod;

                footnoteContentTime.FootnoteNo = FootnoteNo;

                footnoteContentTime.Cellnote = "N";

                footnoteContentTime.UserId = System.Security.Principal.WindowsIdentity.GetCurrent().Name;

                footnoteContentTime.LogDate = DateTime.Now;

                context.AddToFootnoteContTimes(footnoteContentTime);
            }

            else
            {
                base.UpdateEntities(context);
            }
        }