コード例 #1
0
    public List<ReportDataNode> FetchReportData()
    {
        // Assemble the query
        var query = ExigoApiContext.CreateODataContext().PeriodVolumes
            .Where(c => c.CustomerID == Identity.Current.CustomerID)
            .Where(c => c.Period.StartDate < DateTime.Now)
            .Where(c => c.PeriodTypeID == PeriodTypes.Default);


        // Apply ordering and filtering
        var helper = new GridReportHelper();
        query = helper.ApplyFiltering<PeriodVolume>(query);
        query = helper.ApplyOrdering<PeriodVolume>(query);


        // Fetch the nodes
        var nodes = query.Select(c => new ReportDataNode
        {
            PeriodID               = c.PeriodID,
            PeriodTypeID           = c.PeriodTypeID,
            PeriodDescription      = c.Period.PeriodDescription,
            StartDate              = c.Period.StartDate,
            EndDate                = c.Period.EndDate,
            HighestRankAchieved    = c.Rank.RankDescription,
            PaidAsRank             = c.PaidRank.RankDescription,
            Volume1                 = c.Volume1, //Current Month PCV
            Volume2                 = c.Volume3, //Current Month OCV
            Volume3                 = c.Volume75, //3 Month PCV
            Volume4                 = c.Volume79, //3 Month OCV
        }).Skip((helper.Page - 1) * helper.RecordCount).Take(helper.RecordCount).ToList();
       

        // Return the nodes
        return nodes;
    }
コード例 #2
0
    public List<ReportDataNode> FetchReportData()
    {
        // Assemble the query
        var query = ExigoApiContext.CreateODataContext().EnrollerTree
            .Where(c => c.TopCustomerID == Identity.Current.CustomerID)
            .Where(c => c.Customer.CustomerTypeID == CustomerTypes.PreferredCustomer);


        // Apply ordering and filtering
        var helper = new GridReportHelper();
        query = helper.ApplyFiltering<EnrollerNode>(query);
        query = helper.ApplyOrdering<EnrollerNode>(query);


        // Fetch the nodes
        var nodes = query.Select(c => new ReportDataNode
            {
                CustomerID             = c.CustomerID,
                Level                  = c.Level,
                FirstName              = c.Customer.FirstName,
                LastName               = c.Customer.LastName,
                Company                = c.Customer.Company,
                Email                  = c.Customer.Email,
                Phone                  = c.Customer.Phone,
                Phone2                 = c.Customer.Phone2,
                CustomerType           = c.Customer.CustomerType.CustomerTypeDescription,
                CustomerStatus         = c.Customer.CustomerStatus.CustomerStatusDescription,
                JoinedDate             = c.Customer.CreatedDate
            }).Skip((helper.Page - 1) * helper.RecordCount).Take(helper.RecordCount).ToList();


        // Return the nodes
        return nodes;
    }
コード例 #3
0
    public List<ReportDataNode> FetchReportData()
    {
        // Create our query
        var query = ExigoApiContext.CreateODataContext().UniLevelTreePeriodVolumes
            .Where(c => c.TopCustomerID == 10005) //Identity.Current.CustomerID)
            .Where(c => c.PeriodTypeID == PeriodTypes.Weekly)
            .Where(c => c.Period.IsCurrentPeriod)
            .Where(c => c.PeriodVolume.Volume98 != 0);
        

        // Apply ordering and filtering
        var helper = new GridReportHelper();
        query = helper.ApplyFiltering<UniLevelNodePeriodVolume>(query);
        query = helper.ApplyOrdering<UniLevelNodePeriodVolume>(query);


        // Fetch the nodes
        var nodes = query.Select(c => new ReportDataNode
            {
                CustomerID      = c.CustomerID,
                Level           = c.Level,
                FirstName       = c.Customer.FirstName,
                LastName        = c.Customer.LastName,
                Company         = c.Customer.Company,

                CustomerType    = c.Customer.CustomerType.CustomerTypeDescription,
                CustomerStatus  = c.Customer.CustomerStatus.CustomerStatusDescription,
                CustomerRank    = c.Customer.Rank.RankDescription,


                VolumeColumn4   = c.PeriodVolume.Volume99,  // Weekly GPR Credits
                VolumeColumn5   = c.PeriodVolume.Volume98,  // Lifetime GPR Credits
                VolumeColumn6   = c.PeriodVolume.Volume99,  // Weekly GPR Credits
                VolumeColumn7   = c.PeriodVolume.Volume98,  // Lifetime GPR Credits
                                
                VolumeColumn8   = c.PeriodVolume.Volume1,   // Lifetime GPR Credits
                VolumeColumn9   = c.PeriodVolume.Volume79,  // 
                VolumeColumn10  = c.PeriodVolume.Volume56   //Home Transaction Credits
            }).Skip((helper.Page - 1) * helper.RecordCount).Take(helper.RecordCount).ToList();


        // Return the nodes
        return nodes;
    }
コード例 #4
0
    public List<ReportDataNode> FetchReportData()
    {
        // Assemble the query
        var query = ExigoApiContext.CreateODataContext().EnrollerTreePeriodVolumes
            .Where(c => c.TopCustomerID == Identity.Current.CustomerID)
            .Where(c => c.Level  == 1) //Fix this on refactor, should be a Default.
            .Where(c => c.PeriodTypeID == PeriodTypes.Default)
            .Where(c => c.Period.IsCurrentPeriod);


        // Apply ordering and filtering
        var helper = new GridReportHelper();
        query = helper.ApplyFiltering<EnrollerNodePeriodVolume>(query);
        query = helper.ApplyOrdering<EnrollerNodePeriodVolume>(query);


        // Fetch the nodes
        var nodes = query.Select(c => new ReportDataNode
            {
                CustomerID              = c.CustomerID,
                Level                   = c.Level,
                FirstName               = c.Customer.FirstName,
                LastName                = c.Customer.LastName,
                Company                 = c.Customer.Company,
                Email                   = c.Customer.Email,
                Phone                   = c.Customer.Phone,
                Phone2                  = c.Customer.Phone2,
                CustomerType            = c.Customer.CustomerType.CustomerTypeDescription,
                CustomerStatus          = c.Customer.CustomerStatus.CustomerStatusDescription,
                CustomerRank            = c.Customer.Rank.RankDescription,
                JoinedDate              = c.Customer.CreatedDate,
                Volume1                 = c.PeriodVolume.Volume1, //Current Month PCV
                Volume2                 = c.PeriodVolume.Volume3, //Current Month OCV
                Volume3                 = c.PeriodVolume.Volume75, //3 Month PCV
                Volume4                 = c.PeriodVolume.Volume79, //3 Month OCV
                Volume5                 = c.PeriodVolume.Volume56 //Home Transaction Credits
            }).Skip((helper.Page - 1) * helper.RecordCount).Take(helper.RecordCount).ToList();


        // Return the nodes
        return nodes;
    }
コード例 #5
0
    public List<ReportDataNode> FetchReportData()
    {
        var helper = new GridReportHelper();
        int custID;

        if(Request.QueryString["id"] != "undefined")
        {
            custID = Convert.ToInt32(Request.QueryString["id"]);
        }
        else
        {
            custID = Identity.Current.CustomerID;            
        }
        // Assemble the query
        var query = ExigoApiContext.CreateODataContext().Orders
            .Where(c => c.CustomerID == Convert.ToInt32(custID));
        


        // Apply ordering and filtering
        
        query = helper.ApplyFiltering<Order>(query);
        query = helper.ApplyOrdering<Order>(query);


        // Fetch the nodes
        var nodes = query.Select(c => new ReportDataNode
            {
                OrderID             = c.OrderID,
                OrderStatus         = c.OrderStatus.OrderStatusDescription,
                OrderType           = c.OrderType.OrderTypeDescription,
                OrderDate           = c.OrderDate,
                Total               = c.Total,
                BV                  = c.BusinessVolumeTotal,
                TrackingNumber      = c.TrackingNumber1
            }).Skip((helper.Page - 1) * helper.RecordCount).Take(helper.RecordCount).ToList();


        // Return the nodes
        return nodes;
    }
コード例 #6
0
    public List<ReportDataNode> FetchPriorCommissionBonusReportData()
    {
        var report = new SqlReportDataHelper();

        var commissionRunID = Convert.ToInt32(Request.QueryString["rid"]);
        var bonusID = Convert.ToInt32(Request.QueryString["bid"]);


        // Assemble the query
        var query = ExigoApiContext.CreateODataContext().CommissionDetails
            .Where(c => c.CommissionRunID == commissionRunID)
            .Where(c => c.BonusID == bonusID)
            .Where(c => c.CustomerID == Identity.Current.CustomerID);


        // Apply ordering and filtering
        var helper = new GridReportHelper();
        query = helper.ApplyOrdering<CommissionDetail>(query);

                
        // Get the nodes
        var nodes = query.Select(c => new ReportDataNode
            {
                FromCustomerID = c.FromCustomerID,
                FromCustomerName = GlobalUtilities.Coalesce(c.FromCustomer.Company, c.FromCustomer.FirstName + " " + c.FromCustomer.LastName),
                OrderID = c.OrderID,
                Level = c.Level,
                PaidLevel = c.PaidLevel,
                SourceAmount = c.SourceAmount,
                Percentage = c.Percentage,
                CommissionAmount = c.CommissionAmount
            }).ToList(); 
        

        // Return the nodes
        return nodes;
    }
コード例 #7
0
    public List<ReportDataNode> FetchReportData()
    {
        // Assemble the query for Personal Volumes
        var query = ExigoApiContext.CreateODataContext().PeriodVolumes
            .Where(c => c.CustomerID == 10005) // Identity.Current.CustomerID)
            .Where(c => c.Period.StartDate < DateTime.Now)
            .Where(c => c.PeriodTypeID == PeriodTypes.Weekly);


        // Apply ordering and filtering
        var helper = new GridReportHelper();
        query = helper.ApplyFiltering<PeriodVolume>(query);
        query = helper.ApplyOrdering<PeriodVolume>(query);


        // Fetch the nodes
        var nodes = query.Select(c => new ReportDataNode
        {
            
            PeriodID               = c.PeriodID,
            PeriodTypeID           = c.PeriodTypeID,
            PeriodDescription      = c.Period.PeriodDescription,
            StartDate              = c.Period.StartDate,
            EndDate                = c.Period.EndDate,
            HighestRankAchieved    = c.Rank.RankDescription,
            PaidAsRank             = c.PaidRank.RankDescription,
            VolumeColumn1          = c.Volume99,  // Personal GPR Credits Weekly
            VolumeColumn2          = c.Volume98,  // Personal GPR Credits in Lifetime
            AverageDownlineGPRsubmissions          = c.Volume75, // Total Game Plan Reports Submitted In This Week By Your Downline
            VolumeColumn6          = c.Volume100 // GPRR Credits Monthly
        }).Skip((helper.Page - 1) * helper.RecordCount).Take(helper.RecordCount).ToList();
       

        // Return the nodes
        return nodes;
    }
コード例 #8
0
ファイル: FrmHistotyOrder.cs プロジェクト: lemurmu/txgl
 private void ReportList_FetchRecord()
 {
     GridReportHelper.FillRecordToReport <pedidokehu>(Report, orderList);
 }
コード例 #9
0
 private void ReportList_FetchRecord()
 {
     GridReportHelper.FillRecordToReport <articulo>(Report, Goods);
 }