Esempio n. 1
0
        protected override object[] GetMasterDtoValues(Order order)
        {
            var values =
                new object[]
            {
                order.OrderNumber,
                order.OrderDate.ToString("d"),
                order.TotalPrice,
                order.CustomerFirstName,
                order.CustomerLastName,
                order.CustomerAddress,
                order.CustomerCity,
                order.CustomerCountry,
                order.CustomerPostalCode,
                order.CustomerPhoneNumber,
                order.CustomerEmail,
                order.TrackingNumber,
                order.Parcel != null?order.Parcel.ToString() : string.Empty,
                    order.Active.ToYesNo(),
                    order.CustomerPrepaid,
                    order.CustomerPaid,
                    order.DistributorSpentOnDelivery,
                    order.RublesPerDollar,
                    order.Comments ?? string.Empty
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(order))
                 .ToArray());
        }
Esempio n. 2
0
        protected override object[] GetDtoValues(Brand brand)
        {
            var values =
                new object[]
            {
                brand.Name,
                brand.Active.ToYesNo()
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(brand))
                 .ToArray());
        }
        protected override object[] GetMasterDtoValues(Category category)
        {
            var values =
                new object[]
            {
                category.Name,
                category.Active.ToYesNo()
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(category))
                 .ToArray());
        }
Esempio n. 4
0
        protected override object[] GetDtoValues(SubCategory subCategory)
        {
            var values =
                new object[]
            {
                subCategory.Name,
                subCategory.Active.ToYesNo(),
                subCategory.Category.ToString()
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(subCategory))
                 .ToArray());
        }
        protected override object[] GetDetailDtoValues(ProductSize productSize)
        {
            var values =
                new object[]
            {
                productSize.Product.ToString(),
                productSize.Size.ToString(),
                productSize.Price,
                productSize.Active.ToYesNo()
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(productSize))
                 .ToArray());
        }
        protected override object[] GetDtoValues(DistributorTransfer distributorTransfer)
        {
            var values =
                new object[]
            {
                distributorTransfer.Date.ToString("d"),
                distributorTransfer.Amount,
                distributorTransfer.RublesPerDollar,
                distributorTransfer.Active.ToYesNo()
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(distributorTransfer))
                 .ToArray());
        }
Esempio n. 7
0
        protected override object[] GetDtoValues(User user)
        {
            var values =
                new object[]
            {
                user.FirstName,
                user.LastName,
                user.Email,
                user.Login,
                user.Active.ToYesNo()
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(user))
                 .ToArray());
        }
        protected override object[] GetMasterDtoValues(DTO.Product product)
        {
            var values =
                new object[]
            {
                product.Name,
                product.SubCategory.ToString(),
                product.Brand.ToString(),
                product.Description,
                product.VendorShopURL,
                product.Active.ToYesNo()
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(product))
                 .ToArray());
        }
Esempio n. 9
0
        protected override object[] GetDtoValues(DTO.Size size)
        {
            var values =
                new object[]
            {
                size.Name,
                size.Active.ToYesNo(),
                size.SubCategory.ToString(),
                size.Brand.ToString(),
                size.Height,
                size.Weight
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(size))
                 .ToArray());
        }
Esempio n. 10
0
        protected override object[] GetDetailDtoValues(OrderItem orderItem)
        {
            var values =
                new object[]
            {
                orderItem.Order.ToString(),
                orderItem.ProductSize.Product.ToString(),
                orderItem.ProductSize.Size.ToString(),
                orderItem.Quantity,
                orderItem.Price,
                orderItem.TotalPrice,
                orderItem.Active.ToYesNo(),
                orderItem.PurchaserPaid
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(orderItem))
                 .ToArray());
        }
Esempio n. 11
0
        protected override object[] GetMasterDtoValues(Parcel parcel)
        {
            var values =
                new object[]
            {
                parcel.ParcelNumber,
                parcel.TotalPrice,
                parcel.TrackingNumber,
                parcel.SentDate.HasValue ? parcel.SentDate.Value.ToString("d") : string.Empty,
                parcel.ReceivedDate.HasValue ? parcel.ReceivedDate.Value.ToString("d") : string.Empty,
                parcel.Distributor != null?parcel.Distributor.ToString() : string.Empty,
                    parcel.PurchaserSpentOnDelivery,
                    parcel.RublesPerDollar,
                    parcel.Comments ?? string.Empty
            };

            return
                (values
                 .Concat(TrackableDtoListFormHelper.GetValues(parcel))
                 .ToArray());
        }