/ContractController2.cs Secret
Last active
August 29, 2015 14:23
More messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ContractController : Controller | |
{ | |
//more actions.. | |
public ViewResult Details(int id) | |
{ | |
var contract = _contractService.Find(id); | |
var vm = new ContractView(contract); | |
if (contract.ContractTemplate == null) | |
{ | |
vm.AddMessage(Message.Error("This is the text", "This is the title")); | |
vm.AddMessage(Message.Warning("Warning text")); | |
vm.AddMessage(Message.Info("Info text")); | |
vm.AddMessage(Message.Success("This is a success!")); | |
//Or configure message manually | |
var msg = new Message(); | |
msg.Title = "Full title"; | |
msg.Text = "The text"; | |
msg.Closebutton = false; | |
msg.Timeout = 15; | |
vm.AddMessage(msg); | |
} | |
return View(vm); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment