IAccounts::AddToShopBalance

Salesmate +

Add amount to the shop balance

Example code

CComPtr<IAccounts>m_IAccountsInterface;
HRESULT hr;
hr=m_IAccountsInterface.CoCreateInstance(CLSID_Accounts);
if(FAILED(hr))
{
	AfxMessageBox(_T("IAccountsInterface initialisation failed"));
	return FALSE;
}
double dVal;
CString strAddVal;
m_EditAddVal.GetWindowText(strAddVal);
if(strAddVal!="")
{
#ifdef UNICODE
		dVal = wcstod((strAddVal), NULL);
#else
		dVal=atof((LPCTSTR)strAddVal);
#endif
BOOL bet=m_IAccountsInterface->AddToShopBalance(dVal);
if(bet)
{
	AfxMessageBox(_T("Value successfully added to the shop balance"));
}
else
{
	AfxMessageBox(_T("Failed too add value to the shop balance"));
}

(C) 1999-2001 My Company All rights reserved