c# - Two webservices together in wp7 -


i want use result of webservice call in webservice call after it...but 2nd webservice getting called before result of 1st webservice.......i working on wp7 app.....

phoneservice.webservicesoapclient register = new phoneservice.webservicesoapclient();  register.insertnewcollegecompleted += register_insertnewcollegecompleted;                register.insertnewcollegeasync(newcollegename); register.insertnewcollegecompleted += register_insertnewcollegecompleted;  register.insertdatacompleted += register_insertdatacompleted;             register.insertdataasync(name.text, email.text, contact.text,         int.parse(partnerid.text.substring(2)), student_no.text, pass.text,         gender, branchid, yearid, collegeid, shirtreqd, accom); register.insertdatacompleted += register_insertdatacompleted;  void register_insertdatacompleted(object sender, phoneservice.insertdatacompletedeventargs e) {     messagebox.show("tt id is" + e.result); }  void register_insertnewcollegecompleted(object sender, phoneservice.insertnewcollegecompletedeventargs e) {     collegeid = e.result; } 

you can use asynccalls , wanted use register first , response in login api..
have done making asynchronous calls awaitable, can @ link. http://developer.nokia.com/community/wiki/asynchronous_programming_for_windows_phone_8 , help:
http://www.codeproject.com/articles/518856/task-parallel-library-and-async-await-functionalit


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -