コード例 #1
0
            private void LoadLiveReportTransactionCategory(DateTime dateFrom, DateTime dateTo, int transTypeId,
                                                            Action<Dictionary<Category, double>, Exception> callback)
            {
                try
                {
                    var client = new MainClient();
                    client.ReportTransactionCategoryAsync(dateFrom, dateTo, transTypeId, App.Instance.User.UserId);

                    client.ReportTransactionCategoryCompleted += (sender, e) =>
                    {
                        if (e.Error == null)
                            callback(e.Result, null);
                        else
                            callback(null, e.Error);
                    };
                }
                catch (Exception)
                {

                    throw;
                }
            }