Exemple #1
0
        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;
        }
        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();
        }
Exemple #3
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());
        }
Exemple #4
0
 public void ResetClone()
 {
     ObjectCloner objectCloner = new ObjectCloner();
     this.m_Clone = objectCloner.Clone(this.m_Value);
 }
 public PersistentUpdateTracker(object objectToUpdate)
 {
     this.m_ObjectToUpdate = objectToUpdate;
     ObjectCloner objectCloner = new ObjectCloner();
     this.m_OriginalValues = objectCloner.Clone(this.m_ObjectToUpdate);
 }
Exemple #6
0
 public DocumentUpdate(DocumentId documentId)
     : base(documentId)
 {
     ObjectCloner objectCloner = new ObjectCloner();
     this.m_Clone = objectCloner.Clone(this.m_Value);
 }
Exemple #7
0
        public void ResetClone()
        {
            ObjectCloner objectCloner = new ObjectCloner();

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