public static List<Core.Dto.MessengerDto> GetMessages()
        {
            String moduleSettings = ModuleConfig.GetSettings();
            Data.Messenger c = new Data.Messenger(moduleSettings);
            var ds = c.GetMessages();

            return (from DataRow rdr in ds.Tables[0].Rows
                select new Core.Dto.MessengerDto
                {
                    Id = Convert.ToInt32(rdr["Id"]), Message = Convert.ToString(rdr["Message"]), EndDate = Convert.ToDateTime(rdr["EndDate"]), CreatedDate = Convert.ToDateTime(rdr["CreatedDate"])
                }).ToList();
        }
        public static List<Core.Models.Messenger> GetMessages()
        {
            var list = new List<Core.Models.Messenger>();
            String moduleSettings = ModuleConfig.GetSettings();
            Data.Messenger c = new Data.Messenger(moduleSettings);
            var ds = c.GetMessages();
            foreach (DataRow rdr in ds.Tables[0].Rows)
            {
                list.Add(new Core.Models.Messenger {
                    Id = Convert.ToInt32(rdr["Id"]),
                    Message = Convert.ToString(rdr["Message"]),
                    EndDate = Convert.ToDateTime(rdr["EndDate"]),
                    CreatedDate = Convert.ToDateTime(rdr["CreatedDate"])
                });
            }

            return list;
        }
 public static void Delete(int Id)
 {
     String moduleSettings = ModuleConfig.GetSettings();
     Data.Messenger c = new Data.Messenger(moduleSettings);
     c.Delete(Id);
 }
 public static int Add(string message, DateTime endDate)
 {
     String moduleSettings = ModuleConfig.GetSettings();
     Data.Messenger c = new Data.Messenger(moduleSettings);
     return c.Add(message, endDate);
 }