/// <summary>
        /// Create a new working order.
        /// </summary>
        /// <param name="workingOrderRow">The WorkingOrderRow of the working order.</param>
        public ConsumerDebtWorkingOrder(WorkingOrderRow workingOrderRow)
            : base(workingOrderRow)
        {
            SecurityRow     securityRow     = workingOrderRow.SecurityRowByFK_Security_WorkingOrder_SecurityId;
            ConsumerDebtRow consumerDebtRow = securityRow.GetConsumerDebtRows()[0];
            ConsumerRow     consumerRow     = consumerDebtRow.ConsumerRow;

            this.consumerDebtRowVersion = consumerDebtRow.RowVersion;
            this.firstName            = consumerRow.IsFirstNameNull() ? null : consumerRow.FirstName;
            this.lastName             = consumerRow.IsLastNameNull() ? null : consumerRow.LastName;
            this.socialSecurityNumber = consumerRow.SocialSecurityNumber;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create a new working order based on a working order row.
        /// </summary>
        /// <param name="workingOrderRow">The working order data row.</param>
        /// <returns>The new working order object.</returns>
        public static WorkingOrder New(WorkingOrderRow workingOrderRow)
        {
            SecurityRow securityRow = workingOrderRow.SecurityRowByFK_Security_WorkingOrder_SecurityId;

            if (securityRow.GetConsumerTrustRows().Length > 0)
            {
                return(new ConsumerTrustWorkingOrder(workingOrderRow));
            }
            if (securityRow.GetConsumerDebtRows().Length > 0)
            {
                return(new ConsumerDebtWorkingOrder(workingOrderRow));
            }
            else
            {
                return(new WorkingOrder(workingOrderRow));
            }
        }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="row"></param>
 public Security(SecurityRow row)
 {
     this.RowId      = row.SecurityId;
     this.RowVersion = row.RowVersion;
     this.TenantId   = row.TenantId;
 }