public void Insert(Guid Guid, short EnumX, string Lookup, string Description, string LongDescription) { var item = new StudyHistoryTypeEnum(); item.Guid = Guid; item.EnumX = EnumX; item.Lookup = Lookup; item.Description = Description; item.LongDescription = LongDescription; item.Save(UserName); }
public static StudyHistory CreateStudyHistoryRecord(IUpdateContext updateContext, StudyStorageLocation primaryStudyLocation, StudyStorageLocation secondaryStudyLocation, StudyHistoryTypeEnum type, object entryInfo, object changeLog) { StudyHistoryUpdateColumns columns = new StudyHistoryUpdateColumns { InsertTime = Platform.Time, StudyHistoryTypeEnum = type, StudyStorageKey = primaryStudyLocation.GetKey(), DestStudyStorageKey = secondaryStudyLocation != null ? secondaryStudyLocation.GetKey() : primaryStudyLocation.GetKey(), StudyData = XmlUtils.SerializeAsXmlDoc(entryInfo) ?? new XmlDocument(), ChangeDescription = XmlUtils.SerializeAsXmlDoc(changeLog) ?? new XmlDocument() }; IStudyHistoryEntityBroker broker = updateContext.GetBroker <IStudyHistoryEntityBroker>(); return(broker.Insert(columns)); }
public void Update(Guid Guid, short EnumX, string Lookup, string Description, string LongDescription) { var item = new StudyHistoryTypeEnum(); item.MarkOld(); item.IsLoaded = true; item.Guid = Guid; item.EnumX = EnumX; item.Lookup = Lookup; item.Description = Description; item.LongDescription = LongDescription; item.Save(UserName); }