Programmer:Member List and Point Balance v2

From AutoCount Resource Center

Technical Specification

  1. Customer's account book must enable Bonus Point module.
  2. To learn how AutoCount Bonus Point works, click Bonus Point

Columns Specification

Columns Table
Column Name Data Type Size Mandatory Remark
MemberNo string 20 Yes
MemberType string 20 Yes Value must be maintained at Bonus Point > Member Type Maintenance
ID string 20 No Can be used for member identification
Name string 100 No Name of the membership
Address1 string 40 No
Address2 string 40 No
Address3 string 40 No
Address4 string 40 No
AreaCode string 12 No Value is maintained at General Maintenance > Area Maintenance
Individual string 1 Yes Though is a bool type, applicable value is "T" or "F"
Default: "T"
Race string 10 No Value is maintained at Bonus Point > Race Maintenance
DOB DateTime No
DebtorCode string 12 No Value is maintained at A/R > Debtor Maintenance
Company Name string 100 No
Department string 30 No
Title string 40 No
MobilePhone string 25 No
EmailAddress string 80 No
OpeningPoints decimal 19,2 Yes Total carry forward points that has no transaction
Default:0
Gender string 1 No null, "M" or "F"
RegisterDate DateTime No
ExpiryDate DateTime No
IsActive string 1 Yes Though is a bool type, applicable value is "T" or "F"
Default: "T"

Assemblies version 2.0

AutoCount.Accounting.dll
AutoCount.Accounting.UI.dll
AutoCount.dll
AutoCount.MainEntry.dll
AutoCount.UI.dll
AutoCount.GeneralMaint.dll
AutoCount.Invoicing.dll
AutoCount.Invoicing.Sales.dll

Load Member data

Retrieve single record of a member

public AutoCount.GeneralMaint.MemberMaintenance.MemberEntity LoadAMemberData(string memberNo, AutoCount.Authentication.UserSession userSession)
{
    AutoCount.GeneralMaint.MemberMaintenance.MemberCommand cmd =
        AutoCount.GeneralMaint.MemberMaintenance.MemberCommand.Create(userSession, userSession.DBSetting);
    return cmd.GetMember(memberNo);
}

Load all members data in a table

public DataTable LoadMemberData(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.GeneralMaint.MemberMaintenance.MemberCommand cmd =
        AutoCount.GeneralMaint.MemberMaintenance.MemberCommand.Create(userSession, userSession.DBSetting);
    return cmd.LoadBrowseTable();
}


Load Member Transaction Listing by Date Range with Member Point

public DataSet LoadAllMemberListingByDateWithPoint(DateTime fromDate, DateTime toDate, AutoCount.Authentication.UserSession userSession)
{
    AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing report
        = AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing.Create(userSession);

    //5 filters are required by report.Inquire
    AutoCount.SearchFilter.Filter filterMember = new AutoCount.SearchFilter.Filter("B", "MemberNo");
    AutoCount.SearchFilter.Filter filterMemberType = new AutoCount.SearchFilter.Filter("B", "MemberType");
    AutoCount.SearchFilter.Filter filterAgent = new AutoCount.SearchFilter.Filter("C", "SalesAgent");
    AutoCount.SearchFilter.Filter filterArea = new AutoCount.SearchFilter.Filter("B", "AreaCode");
    AutoCount.SearchFilter.Filter filterDebtor = new AutoCount.SearchFilter.Filter("B", "DebtorCode");

    //the value true indicates whether to load member whom point balance is zero;
    //set to true to load zero balance;
    report.Inquire(fromDate, toDate,
        filterMember, filterMemberType, filterAgent, filterArea, filterDebtor,
        true);
    DataSet ds = report.DsBonusPointTransactionListing;

    return ds;
}
  • Contains 2 Tables in the DataSet
    1. Master
      Table of member listing and transactions with earning points by date range.
    2. BalanceBF
      List of members and Balance Point until the toDate.


Load All Member and Member Point Balance

public DataTable LoadAllMemberBalancePoint(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing report =
        AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing.Create(userSession);
    AutoCount.SearchFilter.Filter filterMember = new AutoCount.SearchFilter.Filter("B", "MemberNo");
    AutoCount.SearchFilter.Filter filterMemberType = new AutoCount.SearchFilter.Filter("B", "MemberType");
    AutoCount.SearchFilter.Filter filterAgent = new AutoCount.SearchFilter.Filter("C", "SalesAgent");
    AutoCount.SearchFilter.Filter filterArea = new AutoCount.SearchFilter.Filter("B", "AreaCode");
    AutoCount.SearchFilter.Filter filterDebtor = new AutoCount.SearchFilter.Filter("B", "DebtorCode");

    //Set the from and to date to future, so the BF Balance is actual member total balance 
    report.Inquire(new DateTime(9900, 12, 31), new DateTime(9900, 12, 31),
        filterMember, filterMemberType, filterAgent, filterArea, filterDebtor, true);

    return report.DsBonusPointTransactionListing.Tables["BalanceBF"];
}


Columns in return table of LoadAllMemberBalancePoint


Load selected Member(s) (filter member) and Member Point Balance

public DataTable LoadMemberBalPointByMultiSelectMember(List<string> memberNoList, AutoCount.Authentication.UserSession userSession)
{
    AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing report =
        AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing.Create(userSession);
    AutoCount.SearchFilter.Filter filterMember = new AutoCount.SearchFilter.Filter("B", "MemberNo");
    AutoCount.SearchFilter.Filter filterMemberType = new AutoCount.SearchFilter.Filter("B", "MemberType");
    AutoCount.SearchFilter.Filter filterAgent = new AutoCount.SearchFilter.Filter("C", "SalesAgent");
    AutoCount.SearchFilter.Filter filterArea = new AutoCount.SearchFilter.Filter("B", "AreaCode");
    AutoCount.SearchFilter.Filter filterDebtor = new AutoCount.SearchFilter.Filter("B", "DebtorCode");

    //Filter Member by multi-select
    filterMember.Type = AutoCount.SearchFilter.FilterType.ByIndividual;
    memberNoList.ForEach(s => filterMember.Add(s));

    //Set the from and to date to future, so the BF Balance is actual member total balance 
    report.Inquire(new DateTime(9900, 12, 31), new DateTime(9900, 12, 31),
        filterMember, filterMemberType, filterAgent, filterArea, filterDebtor, true);

    return report.DsBonusPointTransactionListing.Tables["BalanceBF"];
}
  • To call the method of LoadMemberBalPointByMultiSelectMember
string[] selectedMembers = { "M-0001", "M-0003" };
LoadMemberBalPointByMultiSelectMember(selectedMembers.ToList(), myUserSession);


Load a range of MemberType (filter MemberType) and Member Point Balance

public DataTable LoadMemberBalPointByRangeSelectMemberType(string fromMemberType, string toMemberType, AutoCount.Authentication.UserSession userSession)
{
    AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing report =
        AutoCount.Invoicing.Sales.BonusPointTransListing.BonusPointTransactionListing.Create(userSession);
    AutoCount.SearchFilter.Filter filterMember = new AutoCount.SearchFilter.Filter("B", "MemberNo");
    AutoCount.SearchFilter.Filter filterMemberType = new AutoCount.SearchFilter.Filter("B", "MemberType");
    AutoCount.SearchFilter.Filter filterAgent = new AutoCount.SearchFilter.Filter("C", "SalesAgent");
    AutoCount.SearchFilter.Filter filterArea = new AutoCount.SearchFilter.Filter("B", "AreaCode");
    AutoCount.SearchFilter.Filter filterDebtor = new AutoCount.SearchFilter.Filter("B", "DebtorCode");

    //Filter MemberType by range
    filterMemberType.Type = AutoCount.SearchFilter.FilterType.ByRange;
    filterMemberType.From = fromMemberType;
    filterMemberType.To = toMemberType;

    //Set the from and to date to future, so the BF Balance is actual member total balance 
    report.Inquire(new DateTime(9900, 12, 31), new DateTime(9900, 12, 31),
        filterMember, filterMemberType, filterAgent, filterArea, filterDebtor, true);

    return report.DsBonusPointTransactionListing.Tables["BalanceBF"];
}


See Also

Maintenance (Master Data)

Transactions

Reporting

  • Member List and Point Balance - [1.8, 1.9] [2.0]

    Go to menu

    Go to top
    Resources For AutoCount Software Developers