protected override void OnLoadObjectData(DataRow row) { this.number = (string) row["SupplierOrderNumber"]; this.customerOrderNumber = (string) row["CustomerOrderNumber"]; this.dutyEntryTag = (string) row["OrderDutyEntryTag"]; this.concept = (string) row["SupplyOrderConcept"]; this.supplyChannel = SupplyChannel.Parse((int) row["SupplyChannelId"]); this.supplyPoint = Contact.Parse((int) row["SupplyPointId"]); this.supplier = Contact.Parse((int) row["SupplierId"]); this.supplierContact = Person.Parse((int) row["SupplierContactId"]); this.customerContact = Person.Parse((int) row["CustomerContactId"]); this.deliveryMode = DeliveryMode.Parse((int) row["DeliveryModeId"]); this.deliveryTo = Contact.Parse((int) row["DeliveryToId"]); this.deliveryPoint = Contact.Parse((int) row["DeliveryPointId"]); this.deliveryContact = Person.Parse((int) row["DeliveryContactId"]); this.authorizationId = (int) row["OrderAuthorizationId"]; this.currency = Currency.Parse((int) row["SupplyOrderCurrencyId"]); this.orderingTime = (DateTime) row["OrderingTime"]; this.closedBy = Person.Parse((int) row["ClosedById"]); this.closingTime = (DateTime) row["ClosingTime"]; this.canceledBy = Person.Parse((int) row["CanceledById"]); this.cancelationTime = (DateTime) row["CancelationTime"]; this.keywords = (string) row["SupplyOrderKeywords"]; this.payment = CRTransaction.Parse((int) row["CRTransactionId"]); this.bill = Bill.Parse((int) row["BillId"]); this.externalOrderId = (int) row["ExternalOrderId"]; this.parentSupplyOrderId = (int) row["ParentSupplyOrderId"]; this.postedBy = Contact.Parse((int) row["PostedById"]); this.postingTime = (DateTime) row["PostingTime"]; this.status = (OrderStatus) Convert.ToChar(row["SupplyOrderStatus"]); if (this.Status == OrderStatus.Opened) { this.customer = BaseObject.ParseFull<Contact>((int) row["CustomerId"]); } else { this.customer = Contact.Parse((int) row["CustomerId"]); } }
public void SetNotDelivery(DeliveryMode deliveryMode) { this.deliveryMode = deliveryMode; this.deliveryTime = ExecutionServer.DateMaxValue; this.deliveryContact = Person.Empty; status = OrderStatus.OnDelivery; Save(); }