コード例 #1
0
ファイル: DocumentUpdate.cs プロジェクト: ericramses/YPILIS
        public override YellowstonePathology.Business.Persistence.SubmissionResult Submit()
        {
            YellowstonePathology.Business.Persistence.SqlCommandSubmitter sqlCommandSubmitter = this.GetSqlCommands(this.m_Value);
            YellowstonePathology.Business.Persistence.SubmissionResult result = sqlCommandSubmitter.SubmitChanges();

            ObjectCloner objectCloner = new ObjectCloner();
            this.m_Clone = objectCloner.Clone(this.m_Value);

            return result;
        }
コード例 #2
0
        public override YellowstonePathology.Business.Persistence.SubmissionResult Submit()
        {
            PersistentClass persistentClassAttribute = (PersistentClass)this.m_Type.GetCustomAttributes(typeof(PersistentClass), false).Single();
            SqlCommandSubmitter objectSubmitter = new SqlCommandSubmitter(persistentClassAttribute.Database);
            PropertyInfo keyProperty = this.m_Type.GetProperties().Where(prop => Attribute.IsDefined(prop, typeof(PersistentPrimaryKeyProperty))).Single();
            object keyPropertyValue = keyProperty.GetValue(this.m_Value, null);

            InsertCommandBuilder insertCommandBuilder = new InsertCommandBuilder();
            insertCommandBuilder.Build(this.m_Value, objectSubmitter.SqlInsertCommands, objectSubmitter.SqlInsertLastCommands);

            ObjectCloner objectCloner = new ObjectCloner();
            this.m_Clone = objectCloner.Clone(this.m_Value);

            return objectSubmitter.SubmitChanges();
        }
コード例 #3
0
ファイル: Document.cs プロジェクト: ericramses/YPILIS
 public void ResetClone()
 {
     ObjectCloner objectCloner = new ObjectCloner();
     this.m_Clone = objectCloner.Clone(this.m_Value);
 }
コード例 #4
0
 public PersistentUpdateTracker(object objectToUpdate)
 {
     this.m_ObjectToUpdate = objectToUpdate;
     ObjectCloner objectCloner = new ObjectCloner();
     this.m_OriginalValues = objectCloner.Clone(this.m_ObjectToUpdate);
 }
コード例 #5
0
ファイル: DocumentUpdate.cs プロジェクト: ericramses/YPILIS
 public DocumentUpdate(DocumentId documentId)
     : base(documentId)
 {
     ObjectCloner objectCloner = new ObjectCloner();
     this.m_Clone = objectCloner.Clone(this.m_Value);
 }
コード例 #6
0
ファイル: Document.cs プロジェクト: ericramses/YPILIS
        public void ResetClone()
        {
            ObjectCloner objectCloner = new ObjectCloner();

            this.m_Clone = objectCloner.Clone(this.m_Value);
        }