示例#1
0
        public override void CreateEntities(PxMetaModel.PcAxisMetabaseEntities context)
        {
            PxMetaModel.Value value = new PxMetaModel.Value();
            value.ValuePool = ValuePool;
            value.ValueCode = ValueCode;
            value.ValueTextL = ValueText;
            value.Footnote = Footnote;
            value.SortCode = ValueCode;
            value.UserId = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
            value.LogDate = DateTime.Now;

            context.AddToValues(value);

            PxMetaModel.Value_Eng valueEng = new PxMetaModel.Value_Eng();
            valueEng.Value = value;
            valueEng.ValuetextL = ValueTextEnglish;
            valueEng.UserId = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
            valueEng.LogDate = DateTime.Now;
            valueEng.SortCode = ValueCode;
            context.AddToValue_Eng(valueEng);

            foreach(var valueFootnote in ValueFootnotes)
            {
                valueFootnote.Value = this;
                valueFootnote.Save(context);
            }
        }