public void AddMessage(Messages message) { message.MessageNumber = dal.GetMessageCode(); dal.AddMessage(message); dal.AddMessageCode(); }