Exemple #1
0
 public ChatLogViewModel(ChatLog log)
     : this()
 {
     Id = log.Id;
     DateCreated = log.DateCreated;
     Messages = log.GetUserMessages(null);
 }
Exemple #2
0
 public ChatLogViewModel(ChatLog log, string userId)
     : this()
 {
     Messages = log.GetUserMessages(userId);
 }
 public ActionResult Delete(ChatLog model)
 {
     string errorText;
     TempData["Error"] = context.Delete(model, out errorText) ? null : errorText;
     return RedirectToAction("Index");
 }
Exemple #4
0
        public void AddMessageToLog(ChatMessage message)
        {
            if (Log == null)
            {
                Log = new ChatLog(Id);
            }

            Log.Messages.Add(message);
        }