Open main menu

Contents

Technical Specification

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


Assemblies version 2.0

AutoCount.Accounting.dll
AutoCount.Accounting.UI.dll
AutoCount.dll
AutoCount.MainEntry.dll
AutoCount.UI.dll
AutoCount.GeneralMaint.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);
}

LoadBrowseTable() method returns a table of members.

public DataTable LoadMemberData(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.GeneralMaint.MemberMaintenance.MemberCommand cmd =
        AutoCount.GeneralMaint.MemberMaintenance.MemberCommand.Create(userSession, userSession.DBSetting);
    return cmd.LoadBrowseTable();
}
Click Reporting - Member List and Point Balance v2 for more member data loading.

API Usage

New

public void NewMember(AutoCount.Authentication.UserSession userSession)
{
    AutoCount.GeneralMaint.MemberMaintenance.MemberCommand cmd =
        AutoCount.GeneralMaint.MemberMaintenance.MemberCommand.Create(userSession, userSession.DBSetting);
    AutoCount.GeneralMaint.MemberMaintenance.MemberEntity member = cmd.NewMember(false);

    //member.MemberNo = "M000001";
    //Assign auto running number
    member.MemberNo = cmd.GetNextMemberNo();

    member.Name = "THOMAS PETER 1";
    member.ID = "881122-11-1111";

    member.MemberType = "Default";
    member.Address1 = "91, Jalan Nanas,";
    member.Address2 = "Taman Gembira,";
    member.Address3 = "50000 Petaling Jaya,";
    member.Address4 = "Malaysia.";
    //member.DebtorCode = "300-A001";
    member.IsActive = "T";

    try
    {
        cmd.SaveMember(member);
        //Log success
        AutoCount.AppMessage.ShowMessage(
            string.Format("New member '{0}' is created.", member.Name));
    }
    catch (AutoCount.AppException ex)
    {
        //Log error
        AutoCount.AppMessage.ShowMessage(
            string.Format("Fail to create new member.\n{0}", ex.Message));
    }
}

Edit/Update

public void EditMember(AutoCount.Authentication.UserSession userSession)
{
    string memberNo = "M000001";
    AutoCount.GeneralMaint.MemberMaintenance.MemberCommand cmd =
        AutoCount.GeneralMaint.MemberMaintenance.MemberCommand.Create(userSession, userSession.DBSetting);
    AutoCount.GeneralMaint.MemberMaintenance.MemberEntity member = cmd.GetMember(memberNo);

    if (member == null)
        return;

    member.Name = "THOMAS PETER 1";
    member.ID = "881122-11-1234";

    member.MemberType = "Default";
    member.Address1 = "91, Jalan Nanas,";
    member.Address2 = "Taman Gembira,";
    member.Address3 = "50000 Petaling Jaya,";
    member.Address4 = "Malaysia.";
    member.DebtorCode = "300-A001";

    try
    {
        cmd.SaveMember(member);
        //Log success
        AutoCount.AppMessage.ShowMessage(
            string.Format("Member '{0}' is updated.", member.Name));
    }
    catch (AutoCount.AppException ex)
    {
        //Log error
        AutoCount.AppMessage.ShowMessage(
            string.Format("Fail to edit member.\n{0}", ex.Message));
    }
}

Delete

public void DeleteMember(AutoCount.Authentication.UserSession userSession)
{
    string memberNo = "M000001";
    AutoCount.GeneralMaint.MemberMaintenance.MemberCommand cmd =
        AutoCount.GeneralMaint.MemberMaintenance.MemberCommand.Create(userSession, userSession.DBSetting);

    try
    {
        cmd.DeleteMember(memberNo);
        //Log success
        AutoCount.AppMessage.ShowMessage(
            string.Format("Member '{0}' is deleted.", memberNo));
    }
    catch (AutoCount.AppException ex)
    {
        //Log error
        AutoCount.AppMessage.ShowMessage(
            string.Format("Fail to delete member '{0}'.\n{1}", memberNo, ex.Message));
    }
}


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