Ejemplo n.º 1
0
        public static IOBalanceDBV2Entity.PurchaseOrderDetail DtoToEntity(this OrderDetailDto dto)
        {
            IOBalanceDBV2Entity.PurchaseOrderDetail entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceDBV2Entity.PurchaseOrderDetail
                {
                    PurchaseOrderDetailID = dto.OrderDetailId,
                    PurchaseOrderID       = dto.OrderId,
                    ProductID             = dto.ProductId,
                    SupplierID            = dto.SupplierId,
                    Quantity = dto.Quantity
                };
            }

            return(entity);
        }
Ejemplo n.º 2
0
        public static IOBalanceEntity.PurchaseOrderDetail DtoToEntityPurchaseOrderDetail(this OrderDetailDto dto)
        {
            IOBalanceEntity.PurchaseOrderDetail entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.PurchaseOrderDetail
                {
                    PurchaseOrderDetailID = dto.PurchaseOrderDetailId,
                    PurchaseOrderID       = (long)dto.PurchaseOrderId,
                    ProductID             = dto.ProductId,
                    SupplierID            = dto.SupplierId,
                    OverrideDisplay       = dto.OverrideDisplay,
                    OverrideExtDisplay    = dto.OverrideExtDisplay
                };
            }

            return(entity);
        }
Ejemplo n.º 3
0
        public static IOBalanceEntity.SalesOrderDetail DtoToEntitySalesOrderDetail(this OrderDetailDto dto)
        {
            IOBalanceEntity.SalesOrderDetail entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.SalesOrderDetail
                {
                    SalesOrderDetailID = dto.SalesOrderDetailId,
                    SalesOrderID       = dto.SalesOrderId,
                    ProductID          = (long)dto.ProductId,
                    Quantity           = dto.Quantity,
                    UnitID             = dto.UnitId,
                    UnitPrice          = dto.UnitPrice,
                    OverrideDisplay    = dto.OverrideDisplay,
                    OverrideExtDisplay = dto.OverrideExtDisplay
                };
            }

            return(entity);
        }