public override void CreateEntities(PxMetaModel.PcAxisMetabaseEntities context) { if (IsNew) { base.CreateEntities(context); PxMetaModel.FootnoteMaintValue footnoteMainTableValue = new PxMetaModel.FootnoteMaintValue(); footnoteMainTableValue.MainTable = MainTable.TableId; footnoteMainTableValue.Variable = Variable.Variable; footnoteMainTableValue.ValuePool = Value.ValuePool; footnoteMainTableValue.ValueCode = Value.ValueCode; footnoteMainTableValue.FootnoteNo = FootnoteNo; footnoteMainTableValue.UserId = System.Security.Principal.WindowsIdentity.GetCurrent().Name; footnoteMainTableValue.LogDate = DateTime.Now; context.AddToFootnoteMaintValues(footnoteMainTableValue); } else { base.UpdateEntities(context); } }