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); } }
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); } }
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); }
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); } }
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); } }
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); } }