Example #1
0
 protected override void OnLoadObjectData(DataRow row) {
   this.order = SupplyOrder.Parse((int) row["SupplyOrderId"]);
   this.orderItemTypeId = (int) row["SupplyOrderItemTypeId"];
   this.supplyPoint = Contact.Parse((int) row["ItemSupplyPointId"]);
   this.concept = (string) row["SupplyOrderItemConcept"];
   this.applicationItemTypeId = (int) row["ApplicationItemTypeId"];
   this.applicationItemId = (int) row["ApplicationItemId"];
   this.commissioner = Person.Parse((int) row["CommissionerId"]);
   this.requestedDate = (DateTime) row["RequestedDate"];
   this.promisedDate = (DateTime) row["PromisedDate"];
   this.deliveryTime = (DateTime) row["DeliveryTime"];
   if (this.order.Status == OrderStatus.Opened) {
     this.product = BaseObject.ParseFull<Product>((int) row["ProductId"]);
   } else {
     this.product = Product.Parse((int) row["ProductId"]);
   }
   this.quantity = (decimal) row["Quantity"];
   this.presentationUnit = PresentationUnit.Parse((int) row["PresentationId"]);
   this.identificationTag = (string) row["IdentificationTag"];
   this.dutyEntryTag = (string) row["DutyEntryTag"];
   this.expirationDate = (DateTime) row["ExpirationDate"];
   this.priceRuleId = (int) row["PriceRuleId"];
   this.priceType = (PriceType) Convert.ToChar(row["PriceType"]);
   this.discountRuleId = (int) row["DiscountRuleId"];
   this.discountType = (PriceType) Convert.ToChar(row["DiscountType"]);
   this.unitRepositionValue = (decimal) row["RepositionValue"];
   this.productUnitPrice = (decimal) row["ProductUnitPrice"];
   this.currency = Currency.Parse((int) row["BaseCurrencyId"]);
   this.productSubTotalInBaseCurrency = (decimal) row["ProductSubtotalBaseCurrency"];
   this.productSubTotal = (decimal) row["ProductSubtotal"];
   this.productDiscount = (decimal) row["ProductDiscount"];
   this.productTaxes = (decimal) row["ProductTaxes"];
   this.productTotal = (decimal) row["ProductTotal"];
   this.shippingSubTotal = (decimal) row["ShippingSubtotal"];
   this.shippingDiscount = (decimal) row["ShippingDiscount"];
   this.shippingTaxes = (decimal) row["ShippingTaxes"];
   this.shippingTotal = (decimal) row["ShippingTotal"];
   this.priceAuthorizationId = (int) row["PriceAuthorizationId"];
   this.keywords = (string) row["SupplyOrderItemKeywords"];
   this.parentItemId = (int) row["ParentSupplyOrderItemId"];
   this.postedBy = Contact.Parse((int) row["PostedById"]);
   this.postingTime = (DateTime) row["PostingTime"];
   this.status = (OrderStatus) Convert.ToChar(row["SupplyOrderItemStatus"]);
 }
 protected override void OnLoadObjectData(DataRow row) {
   this.order = WarehouseOrder.Parse((int) row["WarehouseOrderId"]);
   this.orderItemTypeId = (int) row["WarehouseOrderItemTypeId"];
   this.concept = (string) row["WarehouseOrderItemConcept"];
   this.applicationItemTypeId = (int) row["ApplicationItemTypeId"];
   this.applicationItemId = (int) row["ApplicationItemId"];
   this.requestedDate = (DateTime) row["RequestedDate"];
   this.promisedDate = (DateTime) row["PromisedDate"];
   this.deliveryTime = (DateTime) row["DeliveryTime"];
   this.product = Product.Parse((int) row["ProductId"]);
   this.quantity = (decimal) row["Quantity"];
   this.expectedQuantity = (decimal) row["ExpectedQuantity"];
   this.inputQuantity = (decimal) row["InputQuantity"];
   this.outputQuantity = (decimal) row["OutputQuantity"];
   this.errorsCount = (int) row["ErrorsCount"];
   this.presentationUnit = PresentationUnit.Parse((int) row["PresentationId"]);
   this.contentsQty = (decimal) row["ContentsQty"];
   this.contentsUnit = PresentationUnit.Parse((int) row["ContentsUnitId"]);
   this.identificationTag = (string) row["IdentificationTag"];
   this.dutyEntryTag = (string) row["DutyEntryTag"];
   this.expirationDate = (DateTime) row["ExpirationDate"];
   this.repositionValue = (decimal) row["RepositionValue"];
   this.binCube = (string) row["BinCube"];
   this.responsible = Contact.Parse((int) row["ResponsibleId"]);
   this.authorizationId = (int) row["AuthorizationId"];
   this.keywords = (string) row["WarehouseOrderItemKeywords"];
   this.parentWarehouseOrderItemId = (int) row["ParentWarehouseOrderItemId"];
   this.supplyOrderItemId = (int) row["SupplyOrderItemId"];
   this.postedBy = Contact.Parse((int) row["PostedById"]);
   this.postingTime = (DateTime) row["PostingTime"];
   this.status = (GeneralObjectStatus) Convert.ToChar(row["WarehouseOrderItemStatus"]);
 }