コード例 #1
0
 public void InitializePropertyFormMaterialSubType()
 {
     try
     {
         Revisions = new BL.Internal.Revision().GetByMaterialSubType(MaterialSubTypeMember);
         gdcRevision.DataSource = Revisions;
         txtName.Text           = MaterialSubTypeMember.SubType;
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
コード例 #2
0
ファイル: Revision.cs プロジェクト: GianiWVL/VUYLSTEKE
 public void RemoveAll(RevisionObjectCollection revisions)
 {
     try
     {
         foreach (RevisionObject revision in revisions)
         {
             Remove(revision);
         }
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
コード例 #3
0
        public RevisionObjectCollection GetByMaterialType(MaterialTypeObject materialType)
        {
            RevisionObjectCollection revisions = new RevisionObjectCollection();
            QueryBuilder             builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(RevisionObject.MATTYP_ID, materialType.MatTypID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                builder.Append("AND " + RevisionObject.MATTYP_ID + " is not null ");
                revisions = RevisionConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(revisions);
        }
コード例 #4
0
 void IEditableObject.EndEdit()
 {
     try
     {
         if (_inTxn)
         {
             _loadedCategory = Category;
             //Child members
             _loadedTypes     = Types;
             _loadedRevisions = Revisions;
             _inTxn           = true;
         }
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
コード例 #5
0
 void IEditableObject.BeginEdit()
 {
     try
     {
         if (!_inTxn)
         {
             _loadedMaterialType = MaterialType;
             _loadedSubType      = SubType;
             //Child members
             _loadedRevisions = Revisions;
             _inTxn           = true;
         }
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
コード例 #6
0
ファイル: Revision.cs プロジェクト: GianiWVL/VUYLSTEKE
 public void Save(RevisionObjectCollection revisions)
 {
     try
     {
         foreach (RevisionObject revision in revisions)
         {
             if (revision.State == PROF_IT.Common.Enumerations.ObjectState.Deleted)
             {
                 Remove(revision);
             }
             if (revision.State == PROF_IT.Common.Enumerations.ObjectState.Modified |
                 revision.State == PROF_IT.Common.Enumerations.ObjectState.Created)
             {
                 Save(revision);
             }
         }
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }