Strict Standards: Redefining already defined constructor for class Object in /cake/libs/object.php on line 54

Strict Standards: Non-static method Configure::getInstance() should not be called statically in /cake/bootstrap.php on line 38
Example | api.r24h.pl

Przykład użycia

C#

Obszar deklaracji zmiennych

public event OnGetResultDelegate OnAccountLogin;

Obszar konstruktora

webService.AccountLoginCompleted += new [web_service]
.GetUserCompletedEventHandler(AccountManager_ OnAccountLogin);

Implementacja

public string AccountLogin(string Login, string Password, 
OnGetResultDelegate onAccountLogin )
        {
            string userState = string.Empty;
            if (onAccountLogin != null)
		OnAccountLogin  =  onAccountLogin;
            DataSet dataset = null;
            if (UseCache)
            {
                string cacheId = string.Format("userwebservice.AccountLogin
.{0}.{1}", Login, Password); dataset = (DataSet)GetCached(cacheId); } if (dataset == null) { userState = System.Guid.NewGuid().ToString(); webService. AccountLoginAsync(Login, Password, userState); } else { if ( OnAccountLogin != null) { DaoEventArgs _args = new DaoEventArgs(dataset, null, false); OnAccountLogin(this, _args); } } return userState; } private void AccountManager_ OnAccountLogin(object sender,
[web_service].GetUserCompletedEventArgs args) { if ( OnAccountLogin != null) { DataSet dataset = null; if (args.Error != null) { ExceptionHandler.HandleException(args.Error); DaoEventArgs _errArgs = new DaoEventArgs(null,
args.Error, true); OnAccountLogin(this, _errArgs); return; } if (!args.Cancelled) { if (args.Result.Compressed) { dataset = DecodeDataSet(args.Result.XmlDataSet); } else { dataset = XmlToDataSet(args.Result.XmlDataSet); } if (UseCache) { AddToCache(args.Result.CacheIdentifier, dataset); } } DaoEventArgs _args = new DaoEventArgs(dataset, null,
args.Cancelled); OnAccountLogin (this, _args); } }



DOTACJE NA INNOWACJE

PROJEKT WSPÓŁFINANSOWANY PRZEZ UNIĘ EUROPEJSKĄ Z EUROPEJSKIEGO FUNDUSZU ROZWOJU REGIONALNEGO