예제 #1
0
        public static dbentities.SalesOrder DtoToEntity(this SalesOrdersRequest request)
        {
            dbentities.SalesOrder entity = null;

            if (request != null)
            {
                entity = new dbentities.SalesOrder
                {
                    SalesOrderID       = request.SalesOrderId,
                    OrderTypeID        = request.SalesOrderTypeId,
                    SalesNo            = request.SalesNo,
                    SalesOrderStatusID = request.SalesOrderStatusId,
                    CustomerID         = request.CustomerId,
                    TotalQuantity      = request.TotalQuantity,
                    TotalAmount        = request.TotalAmount,
                    CreatedBy          = request.CreatedBy,
                    CreatedTime        = request.CreatedTime,
                    ModifiedBy         = request.ModifiedBy,
                    ModifiedTime       = request.ModifiedTime,
                    ModeOfPayment      = request.ModeOfPayment,
                    ShippingFee        = request.ShippingFee,
                };
            }

            return(entity);
        }
예제 #2
0
        public OrderServices(IInventoryAAARepository <dbentities.PurchaseOrder> purchaseOrderServices,
                             IInventoryAAARepository <dbentities.PurchaseOrderDetail> purchaseOrderDetailServices,
                             IInventoryAAARepository <dbentities.SalesOrder> salesOrderServices,
                             IInventoryAAARepository <dbentities.SalesOrderDetail> salesOrderDetailServices,
                             IInventoryAAARepository <dbentities.CorrectionOrder> correctionOrderServices,
                             IInventoryAAARepository <dbentities.CorrectionOrderDetail> correctionOrderDetailServices,
                             IInventoryAAARepository <dbentities.SalesOrderStatusLog> salesOrderStatusLogServices,

                             IProductServices productServices,
                             IOrderTypeServices orderTypeServices,
                             ICustomerServices customerServices)
        {
            this._purchaseOrderServices       = purchaseOrderServices;
            this._purchaseOrderDetailServices = purchaseOrderDetailServices;

            this._correctionOrderServices       = correctionOrderServices;
            this._correctionOrderDetailServices = correctionOrderDetailServices;

            this._salesOrderServices          = salesOrderServices;
            this._salesOrderDetailServices    = salesOrderDetailServices;
            this._salesOrderStatusLogServices = salesOrderStatusLogServices;

            this._productServices   = productServices;
            this._orderTypeServices = orderTypeServices;
            this._customerServices  = customerServices;


            this.purchaseOrder         = new dbentities.PurchaseOrder();
            this.purchaseOrderDetail   = new dbentities.PurchaseOrderDetail();
            this.salesOrder            = new dbentities.SalesOrder();
            this.salesOrderDetail      = new dbentities.SalesOrderDetail();
            this.correctionOrder       = new dbentities.CorrectionOrder();
            this.correctionOrderDetail = new dbentities.CorrectionOrderDetail();
            this.salesOrderStatusLog   = new dbentities.SalesOrderStatusLog();
        }