wcf - await async function C# -


i developing silverlight project using wcf.i need call function wcf after wcf function has finished.here code :

int32 id = convert.toint32(((textblock)datagrid1.columns[0].getcellcontent(datagrid1.selecteditem)).text.tostring());         service1client obj = new service1client();         obj.deletepersonasync(id);          //wait delete operation          obj.getpersonlistcompleted += new eventhandler<getpersonlistcompletedeventargs>(listpeople);         obj.getpersonlistasync(); 

how can that?

call function "getpersonlistasync" int callback of obj.deletepersonasync(id) function. code soemthing follows:

   private void somefunction() {     int32 id = convert.toint32(((textblock)datagrid1.columns[0].getcellcontent(datagrid1.selecteditem)).text.tostring());     service1client obj = new service1client();     obj.deletepersonasynccompleted += new eventhandler<deletepersoncompletedeventargs>(persondeleted);      obj.deletepersonasync(id); }       private void persondeleted(deletepersoncompletedeventargs serviceresponse)     {      //wait delete operation      obj.getpersonlistcompleted += new eventhandler<getpersonlistcompletedeventargs>(listpeople);     obj.getpersonlistasync();     } 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -