コード例 #1
0
        protected void BindGrid()
        {
            DateTime?startDate = ctrlStartDatePicker.SelectedDate;
            DateTime?endDate   = ctrlEndDatePicker.SelectedDate;

            if (startDate.HasValue)
            {
                startDate = DateTimeHelper.ConvertToUtcTime(startDate.Value, DateTimeHelper.CurrentTimeZone);
            }
            if (endDate.HasValue)
            {
                endDate = DateTimeHelper.ConvertToUtcTime(endDate.Value, DateTimeHelper.CurrentTimeZone).AddDays(1);
            }

            OrderStatusEnum?orderStatus   = null;
            int             orderStatusId = int.Parse(ddlOrderStatus.SelectedItem.Value);

            if (orderStatusId > 0)
            {
                orderStatus = (OrderStatusEnum)Enum.ToObject(typeof(OrderStatusEnum), orderStatusId);
            }

            PaymentStatusEnum?paymentStatus = null;
            int paymentStatusId             = int.Parse(ddlPaymentStatus.SelectedItem.Value);

            if (paymentStatusId > 0)
            {
                paymentStatus = (PaymentStatusEnum)Enum.ToObject(typeof(PaymentStatusEnum), paymentStatusId);
            }
            int billingCountryID = int.Parse(ddlBillingCountry.SelectedItem.Value);

            var report = OrderManager.OrderProductVariantReport(startDate, endDate, orderStatus, paymentStatus, billingCountryID);

            if (report.Count == 0)
            {
                chartOrders.Visible = false;
            }
            else
            {
                chartOrders.Series[0].Points.Clear();
                chartOrders.Visible = true;
                foreach (OrderProductVariantReportLine repLine in report)
                {
                    var dp = new DataPoint();
                    dp.YValues = new double[1] {
                        (double)repLine.PriceExclTax
                    };
                    dp.LegendText = GetProductVariantName(repLine.ProductVariantId);
                    dp.ToolTip    = dp.LegendText;
                    chartOrders.Series[0].Points.Add(dp);
                }
                chartOrders.DataBind();
            }

            gvOrders.DataSource = report;
            gvOrders.DataBind();
        }
コード例 #2
0
        protected OrderCollection GetOrders()
        {
            DateTime?startDate    = null;
            DateTime?endDate      = null;
            DateTime startDateTmp = DateTime.Now;

            if (DateTime.TryParse(txtStartDate.Text, out startDateTmp))
            {
                startDate = DateTime.SpecifyKind(startDateTmp, DateTimeKind.Utc);
            }
            DateTime endDateTmp = DateTime.Now;

            if (DateTime.TryParse(txtEndDate.Text, out endDateTmp))
            {
                endDate = DateTime.SpecifyKind(endDateTmp, DateTimeKind.Utc);
            }

            OrderStatusEnum?orderStatus   = null;
            int             orderStatusID = int.Parse(ddlOrderStatus.SelectedItem.Value);

            if (orderStatusID > 0)
            {
                orderStatus = (OrderStatusEnum)Enum.ToObject(typeof(OrderStatusEnum), orderStatusID);
            }

            PaymentStatusEnum?paymentStatus = null;
            int paymentStatusID             = int.Parse(ddlPaymentStatus.SelectedItem.Value);

            if (paymentStatusID > 0)
            {
                paymentStatus = (PaymentStatusEnum)Enum.ToObject(typeof(PaymentStatusEnum), paymentStatusID);
            }

            ShippingStatusEnum?shippingStatus = null;
            int shippingStatusID = int.Parse(ddlShippingStatus.SelectedItem.Value);

            if (shippingStatusID > 0)
            {
                shippingStatus = (ShippingStatusEnum)Enum.ToObject(typeof(ShippingStatusEnum), shippingStatusID);
            }

            OrderCollection orders = OrderManager.SearchOrders(startDate, endDate, txtCustomerEmail.Text, orderStatus, paymentStatus, shippingStatus);

            return(orders);
        }
コード例 #3
0
        protected List <Order> GetOrders()
        {
            DateTime?startDate = ctrlStartDatePicker.SelectedDate;
            DateTime?endDate   = ctrlEndDatePicker.SelectedDate;

            if (startDate.HasValue)
            {
                startDate = DateTimeHelper.ConvertToUtcTime(startDate.Value, DateTimeHelper.CurrentTimeZone);
            }
            if (endDate.HasValue)
            {
                endDate = DateTimeHelper.ConvertToUtcTime(endDate.Value, DateTimeHelper.CurrentTimeZone).AddDays(1);
            }

            OrderStatusEnum?orderStatus   = null;
            int             orderStatusId = int.Parse(ddlOrderStatus.SelectedItem.Value);

            if (orderStatusId > 0)
            {
                orderStatus = (OrderStatusEnum)Enum.ToObject(typeof(OrderStatusEnum), orderStatusId);
            }

            PaymentStatusEnum?paymentStatus = null;
            int paymentStatusId             = int.Parse(ddlPaymentStatus.SelectedItem.Value);

            if (paymentStatusId > 0)
            {
                paymentStatus = (PaymentStatusEnum)Enum.ToObject(typeof(PaymentStatusEnum), paymentStatusId);
            }

            ShippingStatusEnum?shippingStatus = null;
            int shippingStatusId = int.Parse(ddlShippingStatus.SelectedItem.Value);

            if (shippingStatusId > 0)
            {
                shippingStatus = (ShippingStatusEnum)Enum.ToObject(typeof(ShippingStatusEnum), shippingStatusId);
            }

            string orderGuid = txtOrderGuid.Text.Trim();

            var orders = this.OrderService.SearchOrders(startDate, endDate,
                                                        txtCustomerEmail.Text, orderStatus, paymentStatus, shippingStatus, orderGuid);

            return(orders);
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderPayment" /> class.
 /// </summary>
 /// <param name="check">check.</param>
 /// <param name="creditCard">creditCard.</param>
 /// <param name="echeck">echeck.</param>
 /// <param name="holdForFraudReview">True if order has been held for fraud review.</param>
 /// <param name="paymentDts">Date/time that the payment was successfully processed, for new orders, this field is only considered if channel_partner.skip_payment_processing is true.</param>
 /// <param name="paymentMethod">Payment method.</param>
 /// <param name="paymentMethodAccountingCode">Payment method QuickBooks code.</param>
 /// <param name="paymentMethodDepositToAccount">Payment method QuickBooks deposit account.</param>
 /// <param name="paymentStatus">Payment status.</param>
 /// <param name="purchaseOrder">purchaseOrder.</param>
 /// <param name="rotatingTransactionGatewayCode">Rotating transaction gateway code used to process this order.</param>
 /// <param name="surcharge">surcharge.</param>
 /// <param name="surchargeAccountingCode">Surcharge accounting code.</param>
 /// <param name="surchargeTransactionFee">Surcharge transaction fee.</param>
 /// <param name="surchargeTransactionPercentage">Surcharge transaction percentage.</param>
 /// <param name="testOrder">True if this is a test order.</param>
 /// <param name="transactions">Transactions associated with processing this payment.</param>
 public OrderPayment(OrderPaymentCheck check = default(OrderPaymentCheck), OrderPaymentCreditCard creditCard = default(OrderPaymentCreditCard), OrderPaymentECheck echeck = default(OrderPaymentECheck), bool?holdForFraudReview = default(bool?), string paymentDts = default(string), PaymentMethodEnum?paymentMethod = default(PaymentMethodEnum?), string paymentMethodAccountingCode = default(string), string paymentMethodDepositToAccount = default(string), PaymentStatusEnum?paymentStatus = default(PaymentStatusEnum?), OrderPaymentPurchaseOrder purchaseOrder = default(OrderPaymentPurchaseOrder), string rotatingTransactionGatewayCode = default(string), Currency surcharge = default(Currency), string surchargeAccountingCode = default(string), decimal?surchargeTransactionFee = default(decimal?), decimal?surchargeTransactionPercentage = default(decimal?), bool?testOrder = default(bool?), List <OrderPaymentTransaction> transactions = default(List <OrderPaymentTransaction>))
 {
     this.Check                          = check;
     this.CreditCard                     = creditCard;
     this.Echeck                         = echeck;
     this.HoldForFraudReview             = holdForFraudReview;
     this.PaymentDts                     = paymentDts;
     this.PaymentMethod                  = paymentMethod;
     this.PaymentMethodAccountingCode    = paymentMethodAccountingCode;
     this.PaymentMethodDepositToAccount  = paymentMethodDepositToAccount;
     this.PaymentStatus                  = paymentStatus;
     this.PurchaseOrder                  = purchaseOrder;
     this.RotatingTransactionGatewayCode = rotatingTransactionGatewayCode;
     this.Surcharge                      = surcharge;
     this.SurchargeAccountingCode        = surchargeAccountingCode;
     this.SurchargeTransactionFee        = surchargeTransactionFee;
     this.SurchargeTransactionPercentage = surchargeTransactionPercentage;
     this.TestOrder                      = testOrder;
     this.Transactions                   = transactions;
 }
コード例 #5
0
        protected IDataReader GetReportByNumberOfOrder()
        {
            DateTime?startDate = ctrlStartDatePickerByNumberOfOrder.SelectedDate;
            DateTime?endDate   = ctrlEndDatePickerByNumberOfOrder.SelectedDate;

            if (startDate.HasValue)
            {
                startDate = DateTimeHelper.ConvertToUtcTime(startDate.Value, DateTimeHelper.CurrentTimeZone);
            }
            if (endDate.HasValue)
            {
                endDate = DateTimeHelper.ConvertToUtcTime(endDate.Value, DateTimeHelper.CurrentTimeZone).AddDays(1);
            }

            OrderStatusEnum?orderStatus   = null;
            int             orderStatusId = int.Parse(ddlOrderStatusByNumberOfOrder.SelectedItem.Value);

            if (orderStatusId > 0)
            {
                orderStatus = (OrderStatusEnum)Enum.ToObject(typeof(OrderStatusEnum), orderStatusId);
            }

            PaymentStatusEnum?paymentStatus = null;
            int paymentStatusId             = int.Parse(ddlPaymentStatusByNumberOfOrder.SelectedItem.Value);

            if (paymentStatusId > 0)
            {
                paymentStatus = (PaymentStatusEnum)Enum.ToObject(typeof(PaymentStatusEnum), paymentStatusId);
            }

            ShippingStatusEnum?shippingStatus = null;
            int shippingStatusId = int.Parse(ddlShippingStatusByNumberOfOrder.SelectedItem.Value);

            if (shippingStatusId > 0)
            {
                shippingStatus = (ShippingStatusEnum)Enum.ToObject(typeof(ShippingStatusEnum), shippingStatusId);
            }

            return(CustomerManager.GetBestCustomersReport(startDate,
                                                          endDate, orderStatus, paymentStatus, shippingStatus, 2));
        }
コード例 #6
0
        protected List <CustomerBestReportLine> GetReportByOrderTotal()
        {
            DateTime?startDate = ctrlStartDatePickerByOrderTotal.SelectedDate;
            DateTime?endDate   = ctrlEndDatePickerByOrderTotal.SelectedDate;

            if (startDate.HasValue)
            {
                startDate = DateTimeHelper.ConvertToUtcTime(startDate.Value, DateTimeHelper.CurrentTimeZone);
            }
            if (endDate.HasValue)
            {
                endDate = DateTimeHelper.ConvertToUtcTime(endDate.Value, DateTimeHelper.CurrentTimeZone).AddDays(1);
            }

            OrderStatusEnum?orderStatus   = null;
            int             orderStatusId = int.Parse(ddlOrderStatusByOrderTotal.SelectedItem.Value);

            if (orderStatusId > 0)
            {
                orderStatus = (OrderStatusEnum)Enum.ToObject(typeof(OrderStatusEnum), orderStatusId);
            }

            PaymentStatusEnum?paymentStatus = null;
            int paymentStatusId             = int.Parse(ddlPaymentStatusByOrderTotal.SelectedItem.Value);

            if (paymentStatusId > 0)
            {
                paymentStatus = (PaymentStatusEnum)Enum.ToObject(typeof(PaymentStatusEnum), paymentStatusId);
            }

            ShippingStatusEnum?shippingStatus = null;
            int shippingStatusId = int.Parse(ddlShippingStatusByOrderTotal.SelectedItem.Value);

            if (shippingStatusId > 0)
            {
                shippingStatus = (ShippingStatusEnum)Enum.ToObject(typeof(ShippingStatusEnum), shippingStatusId);
            }

            return(this.CustomerService.GetBestCustomersReport(startDate,
                                                               endDate, orderStatus, paymentStatus, shippingStatus, 1));
        }
コード例 #7
0
        protected void BindGrid()
        {
            DateTime?startDate    = null;
            DateTime?endDate      = null;
            DateTime startDateTmp = DateTime.Now;

            if (DateTime.TryParse(txtStartDate.Text, out startDateTmp))
            {
                startDate = DateTime.SpecifyKind(startDateTmp, DateTimeKind.Utc);
            }
            DateTime endDateTmp = DateTime.Now;

            if (DateTime.TryParse(txtEndDate.Text, out endDateTmp))
            {
                endDate = DateTime.SpecifyKind(endDateTmp, DateTimeKind.Utc);
            }

            OrderStatusEnum?orderStatus   = null;
            int             orderStatusID = int.Parse(ddlOrderStatus.SelectedItem.Value);

            if (orderStatusID > 0)
            {
                orderStatus = (OrderStatusEnum)Enum.ToObject(typeof(OrderStatusEnum), orderStatusID);
            }

            PaymentStatusEnum?paymentStatus = null;
            int paymentStatusID             = int.Parse(ddlPaymentStatus.SelectedItem.Value);

            if (paymentStatusID > 0)
            {
                paymentStatus = (PaymentStatusEnum)Enum.ToObject(typeof(PaymentStatusEnum), paymentStatusID);
            }

            gvOrders.DataSource = OrderManager.OrderProductVariantReport(startDate, endDate, orderStatus, paymentStatus);
            gvOrders.DataBind();
        }
コード例 #8
0
        protected void BindGrid()
        {
            DateTime?startDate = ctrlStartDatePicker.SelectedDate;
            DateTime?endDate   = ctrlEndDatePicker.SelectedDate;

            if (startDate.HasValue)
            {
                startDate = DateTimeHelper.ConvertToUtcTime(startDate.Value, DateTimeHelper.CurrentTimeZone);
            }
            if (endDate.HasValue)
            {
                endDate = DateTimeHelper.ConvertToUtcTime(endDate.Value, DateTimeHelper.CurrentTimeZone).AddDays(1);
            }

            OrderStatusEnum?orderStatus   = null;
            int             orderStatusId = int.Parse(ddlOrderStatus.SelectedItem.Value);

            if (orderStatusId > 0)
            {
                orderStatus = (OrderStatusEnum)Enum.ToObject(typeof(OrderStatusEnum), orderStatusId);
            }

            PaymentStatusEnum?paymentStatus = null;
            int paymentStatusId             = int.Parse(ddlPaymentStatus.SelectedItem.Value);

            if (paymentStatusId > 0)
            {
                paymentStatus = (PaymentStatusEnum)Enum.ToObject(typeof(PaymentStatusEnum), paymentStatusId);
            }

            int billingCountryID = int.Parse(ddlBillingCountry.SelectedItem.Value);

            gvOrders.DataSource = OrderManager.OrderProductVariantReport(startDate,
                                                                         endDate, orderStatus, paymentStatus, billingCountryID);
            gvOrders.DataBind();
        }
コード例 #9
0
 public List <Order> SearchOrders(DateTime?startTime, DateTime?endTime, string customerEmail, OrderStatusEnum?os, PaymentStatusEnum?ps, ShippingStatusEnum?ss, string orderGuid)
 {
     throw new NotImplementedException();
 }
コード例 #10
0
 public List <OrderProductVariant> GetAllOrderProductVariants(int?orderId, int?customerId, DateTime?startTime, DateTime?endTime, OrderStatusEnum?os, PaymentStatusEnum?ps, ShippingStatusEnum?ss, bool loadDownloableProductsOnly)
 {
     throw new NotImplementedException();
 }
コード例 #11
0
ファイル: CustomerService.cs プロジェクト: dingjunyong/zwshop
 public List <CustomerBestReportLine> GetBestCustomersReport(DateTime?startTime, DateTime?endTime, OrderStatusEnum?os, PaymentStatusEnum?ps, ShippingStatusEnum?ss, int orderBy)
 {
     throw new NotImplementedException();
 }
コード例 #12
0
 public List <TransactionPayment> SearchTransactionPayments(DateTime?startTime, DateTime?endTime, string memberEmail, TransactionStatusEnum?os, PaymentStatusEnum?ps)
 {
     throw new NotImplementedException();
 }