protected void Handle(Input.SaveAndMessageTrigger action) { action.Cancel(); this.ErrorMessage = string.Empty; this.SuccessMessage = string.Empty; System.Threading.Thread.CurrentThread.Join(Timeout); if (DateTime.Now.Ticks % 2 == 0) { this.SuccessMessage = "The changes are successfully saved"; } else { this.ErrorMessage = "Failed to save changes"; } }
protected void Handle(Input.SaveAndMessageTrigger action) { action.Cancel(); this.ErrorMessage = string.Empty; this.SuccessMessage = string.Empty; System.Threading.Thread.CurrentThread.Join(Timeout); if (DateTime.Now.Ticks % 2 == 0) { this.SuccessMessage = "This is a random success alert from the server"; } else { this.ErrorMessage = "This is a random danger alert from the server"; } }