Exemplo n.º 1
0
 public void DeletetblCustomsWayPoint(DSS4_ECompliance.BO.tblCustomsWayPoint tblcustomswaypoint, bool doNotCallDeleteForThis = false, bool isCascaded = false, object calledBy = null)
 {
     if (tblcustomswaypoint == null || tblcustomswaypoint.IsTransient())
     {
         return;
     }
     foreach (var toDissasociate in this.Get <DSS4_ECompliance.BO.tblCustomsWayPointRisk>(ap => ap.tblCustomsWayPoint == tblcustomswaypoint))
     {
         toDissasociate.tblCustomsWayPoint = null;
     }
     foreach (var toDissasociate in this.Get <DSS4_ECompliance.BO.tblCustomsWayPointVisibility>(ap => ap.tblCustomsWayPoint == tblcustomswaypoint))
     {
         toDissasociate.tblCustomsWayPoint = null;
     }
     tblcustomswaypoint.CustomsWayPoint = null;
     foreach (var toDissasociate in this.Get <DSS4_ECompliance.BO.tblCustomsWayPoint>(ap => ap.CustomsWayPoint == tblcustomswaypoint))
     {
         toDissasociate.CustomsWayPoint = null;
     }
     if (!doNotCallDeleteForThis)
     {
         Delete <DSS4_ECompliance.BO.tblCustomsWayPoint>(tblcustomswaypoint, isCascaded);
     }
 }
Exemplo n.º 2
0
/// <summary>
///     Returns true if self and the provided entity have the same Id values
///     and the Ids are not of the default Id value
/// </summary>
        protected bool HasSameNonDefaultIdAs(tblCustomsWayPoint compareTo)
        {
            return(!this.IsTransient() && !compareTo.IsTransient() && this.Id.Equals(compareTo.Id));
        }