private async void Save() { try { var amount = decimal.Parse(this.SimpleExpense.Amount); var expense = this.expensesFactory.Create(Guid.NewGuid(), this.Date, amount, this.SimpleExpense.Side, this.SimpleExpense.Description, this.PaymentType, this.CategoryType); var responseExpense = JsonConvert.DeserializeObject <GeneralResponse>(await HttpRequestHelper.CreateExpenseRemote(ViewBag.Email, expense)); if (responseExpense.Status == "0") { throw new Exception(); } var user = JsonConvert.DeserializeObject <User>(await HttpRequestHelper.GetUserByEmailRemote(ViewBag.Email)); ViewBag.Balance = user.LocalizedBalance; this.Message = Constants.SuccessfulfulExpenseCreation; this.MessageColor = Constants.MessagePositiveColor; this.SuccessfulExpenseRequested(); this.SimpleExpense = this.modelFactory.CreateSimpleExpense(); this.Date = DateTime.Today; } catch { this.Message = Constants.UnsuccessfulExpenseCreation; this.MessageColor = Constants.MessageNegativeColor; } finally { await Task.Factory.StartNew(() => Thread.Sleep(2 * 1000)) .ContinueWith((t) => { this.Message = string.Empty; }); } }