Exemple #1
0
    public List<string> Util_GetDateLabels(OrderReportData reportData)
    {
        List<string> dateLabels = new List<string>();

        for (int i = 0; i <= Intervals; i++)
        {
            string currentPeriod = "";
            currentPeriod = DateTime.Now.Subtract(new TimeSpan(i, 0, 0, 0)).Day.ToString();
            dateLabels.Add(currentPeriod);

        }

        return dateLabels;
    }
Exemple #2
0
 public void Util_BindData()
 {
     DateTime firstItemDate = DateTime.Now;
     List<List<int>> dataset = new List<List<int>>();
     List<string> labels = new List<string>();
     OrderApi orderApi = new OrderApi();
     OrderReportData report = new OrderReportData();
     Criteria<OrderProperty> orderCriteria = new Criteria<OrderProperty>();
     orderCriteria.PagingInfo = new PagingInfo(orderApi.RequestInformationRef.PagingSize);
     orderCriteria = Util_GetDates(orderCriteria);
     report = orderApi.GetReport(orderCriteria);
     dataset.Add(Util_GetDateValues(report));
     labels = Util_GetDateLabels(report);
     TrendTimeLineChart.LoadSplitData(StartDate, StartDate, labels.ToArray(), dataset.ToArray());
 }
Exemple #3
0
    public void Util_BindData()
    {
        DateTime firstItemDate = DateTime.Now;
        List<List<int>> dataset = new List<List<int>>();
        List<string> labels = new List<string>();
        OrderApi orderApi = new OrderApi();
        OrderReportData report = new OrderReportData();
        Criteria<OrderProperty> orderCriteria = new Criteria<OrderProperty>();
        orderCriteria.PagingInfo = new PagingInfo(orderApi.RequestInformationRef.PagingSize);

        orderCriteria = Util_GetDates(orderCriteria);

        report = orderApi.GetReport(orderCriteria);

        ltr_count.Text = report.TotalOrders.ToString() + " " + GetMessage("lbl total orders with a value of") + " " + orderApi.RequestInformationRef.CommerceSettings.CurrencyAlphaISO + orderApi.RequestInformationRef.CommerceSettings.CurrencySymbol + report.Dates.OrderValue(orderApi.RequestInformationRef.CommerceSettings.CurrencyId);

        dataset.Add(Util_GetDateValues(report));
        labels = Util_GetDateLabels(report);

        TrendTimeLineChart.LoadSplitData(StartDate, StartDate, labels.ToArray(), dataset.ToArray());
    }
Exemple #4
0
    public void Util_BindData()
    {
        OrderReportData report = new OrderReportData();
        Criteria<OrderProperty> orderCriteria = new Criteria<OrderProperty>();
        orderCriteria.PagingInfo = new PagingInfo(_orderApi.RequestInformationRef.PagingSize);
        orderCriteria = Util_GetDates(orderCriteria);
        report = _orderApi.GetReport(orderCriteria, _qty, EkEnumeration.TopProductsSortType.TotalSold);
        _data = report.TopProducts;

        if (_data.Count > 0)
        {
            Util_LoadData();
            lblNoRecords.Visible = false;
            pnlData.Visible = true;
        }
        else
        {
            lblNoRecords.Visible = true;
            pnlData.Visible = false;
        }
    }
Exemple #5
0
    public List<string> Util_GetDateLabels(OrderReportData reportData)
    {
        List<string> dateLabels = new List<string>();

        for (int i = 0; i <= Intervals; i++)
        {
            string currentPeriod = "";

            if (hdn_filter.Value == "#monthly")
            {
                currentPeriod = (new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)).AddMonths(-i).ToString("MMM");
                dateLabels.Add(currentPeriod);
            }
            else
            {

                currentPeriod = DateTime.Now.Subtract(new TimeSpan(i, 0, 0, 0)).Day.ToString();
                dateLabels.Add(currentPeriod);
            }
        }

        return dateLabels;
    }
Exemple #6
0
    public List<int> Util_GetDateValues(OrderReportData reportData)
    {
        List<int> dateValues = new List<int>();

        for (int i = Intervals; i >= 0; i--)
        {
            int periodTotal = 0;

            if (hdn_filter.Value == "#monthly")
            {
                periodTotal = (int)reportData.Dates.MonthTotal((new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)).AddMonths(-i));
                dateValues.Add(periodTotal);
            }
            else
            {
                periodTotal = (int)reportData.Dates.DayTotal(DateTime.Now.Subtract(new TimeSpan(i, 0, 0, 0)));
                dateValues.Add(periodTotal);
            }
        }

        return dateValues;
    }
Exemple #7
0
    public List<int> Util_GetDateValues(OrderReportData reportData)
    {
        List<int> dateValues = new List<int>();

        for (int i = Intervals; i >= 0; i--)
        {
            int periodTotal = 0;
            periodTotal = (int)reportData.Dates.DayTotal(DateTime.Now.Subtract(new TimeSpan(i, 0, 0, 0)));
            dateValues.Add(periodTotal);
        }

        return dateValues;
    }