Esempio 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);
        }
        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);
        }
        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);
        }