/// <summary>
        /// Create a new working order.
        /// </summary>
        /// <param name="workingOrderRow">The WorkingOrderRow of the working order.</param>
        public WorkingOrder(WorkingOrderRow workingOrderRow)
        {
            // Initialize the object.
            this.blotterId      = workingOrderRow.BlotterId;
            this.modifiedTime   = workingOrderRow.ModifiedTime;
            this.securityId     = workingOrderRow.SecurityId;
            this.workingOrderId = workingOrderRow.WorkingOrderId;
            this.rowVersion     = workingOrderRow.RowVersion;

            this.symbol = workingOrderRow.SecurityRowByFK_Security_WorkingOrder_SecurityId.Symbol;
        }
        /// <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;
        }
        /// <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));
            }
        }
Esempio n. 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="row"></param>
 public WorkingOrderRecord(WorkingOrderRow row)
 {
     this.BlotterId  = row.BlotterId;
     this.RowId      = row.WorkingOrderId;
     this.RowVersion = row.RowVersion;
 }
Esempio n. 5
0
 /// <summary>
 /// Describes a handler and the data used to change a WorkingOrder row in the middle tier.
 /// </summary>
 /// <param name="handler">A handler to update the Working Order record.</param>
 /// <param name="workingOrderRow">The current Working Order record.</param>
 /// <param name="value">The new value of an element of the Working Order record.</param>
 public WorkingOrderChange(WorkingOrderClientDelegate handler, WorkingOrderRow workingOrderRow, object value)
 {
     this.Handler         = handler;
     this.WorkingOrderRow = workingOrderRow;
     this.Value           = value;
 }