private void ClientOnCompProfCompletedEx(object sender, GetCompProfileCompletedEventArgs e) { string msg = null; bool success = true; if (e.Error != null) { msg = e.Error.Message; success = false; } else if (e.Cancelled) { msg = CallingActivity.Resources.GetString(Resource.String.msg_reqcancel); success = false; } else { CompanyProfile pro = (CompanyProfile)e.Result; RunOnUiThread(() => InsertCompProfIntoDbEx(pro)); } if (!success) { RunOnUiThread(() => Downloadhandle.Invoke(CallingActivity, 0, msg)); } }
private void ClientOnCompProfCompletedEx(object sender,GetCompProfileCompletedEventArgs e) { string msg = null; bool success = true; if ( e.Error != null) { msg = e.Error.Message; success = false; } else if ( e.Cancelled) { msg = "Request was cancelled."; success = false; } else { CompanyProfile pro = (CompanyProfile)e.Result; RunOnUiThread (() => InsertCompProfIntoDbEx( pro)); } if (!success) { RunOnUiThread (() => Downloadhandle.Invoke(CallingActivity,0,msg)); } }
private void ClientOnCompProfCompleted(object sender,GetCompProfileCompletedEventArgs e) { string msg = null; bool success = true; if ( e.Error != null) { msg = e.Error.Message; success = false; } else if ( e.Cancelled) { msg = CallingActivity.Resources.GetString(Resource.String.msg_reqcancel); success = false; } else { CompanyProfile pro = (CompanyProfile)e.Result; RunOnUiThread (() => InsertCompProfIntoDb( pro)); } if (!success) { RunOnUiThread (() => Downloadhandle.Invoke(CallingActivity,0,msg)); if (_downloadAll) { _downloadAll = false; FireEvent (EventID.LOGIN_DOWNCOMPLETE); } } }