guneysus
8/1/2015 - 3:22 PM

Maşide

Maşide

diff --git a/ProjectTemplate.Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProjectTemplate.Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 664a1b3..83a7d20 100644
Binary files a/ProjectTemplate.Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ProjectTemplate.Application/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/ProjectTemplate.Application/obj/Debug/ProjectTemplate.Application.csprojResolveAssemblyReference.cache b/ProjectTemplate.Application/obj/Debug/ProjectTemplate.Application.csprojResolveAssemblyReference.cache
index 62256e8..a0a5b9f 100644
Binary files a/ProjectTemplate.Application/obj/Debug/ProjectTemplate.Application.csprojResolveAssemblyReference.cache and b/ProjectTemplate.Application/obj/Debug/ProjectTemplate.Application.csprojResolveAssemblyReference.cache differ
diff --git a/ProjectTemplate.Business/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProjectTemplate.Business/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 2ff307d..ac9ca3d 100644
Binary files a/ProjectTemplate.Business/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ProjectTemplate.Business/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/ProjectTemplate.Business/obj/Debug/ProjectTemplate.Business.csprojResolveAssemblyReference.cache b/ProjectTemplate.Business/obj/Debug/ProjectTemplate.Business.csprojResolveAssemblyReference.cache
index 3a7b5c0..1f66600 100644
Binary files a/ProjectTemplate.Business/obj/Debug/ProjectTemplate.Business.csprojResolveAssemblyReference.cache and b/ProjectTemplate.Business/obj/Debug/ProjectTemplate.Business.csprojResolveAssemblyReference.cache differ
diff --git a/ProjectTemplate.Core/EF/ProjectTemplateConfiguration.cs b/ProjectTemplate.Core/EF/ProjectTemplateConfiguration.cs
index 2e6bbf2..e3ef361 100644
--- a/ProjectTemplate.Core/EF/ProjectTemplateConfiguration.cs
+++ b/ProjectTemplate.Core/EF/ProjectTemplateConfiguration.cs
@@ -16,72 +16,71 @@ namespace ProjectTemplate.Core.EF
             AutomaticMigrationDataLossAllowed = true;
         }
 
-        //protected override void Seed(ProjectTemplateContext context)
-        //{
-        //    Student newStudent = context.Students.FirstOrDefault(x => x.Firstname == "ogrenci");
-        //    if (newStudent == null)
-        //    {
-        //        context.Students.Add(new Student
-        //                {
-        //                    Firstname = "ogrenci",
-        //                    Lastname = "soyadı",
-        //                    UserName = "kullanıcıadi",
-        //                    Email = "serkann.demirhan@gmail.com",
-        //                    Password = "123456",
-        //                    Active = true,
-        //                    Address = "bakırköy",
-        //                    Phone = "5976184545",
-        //                    Md5 = "37693cfc748049e45d87b8c7d8b9aacd",
-        //                    Industry = "deneme",
-        //                    Date = DateTime.Now
-        //                });
-        //        context.SaveChanges();
-        //    }
-        //    bool deger;
-        //    int tag;
-        //    for (int i = 0; i < 40; i++)
-        //    {
-        //        if (i % 2 == 0)
-        //        {
-        //            deger = true;
-        //            tag = 1;
-        //        }
-        //        else
-        //        {
-        //            tag = 2;
-        //            deger = false;
-        //        }
-        //        Mail newMail = context.Mails.FirstOrDefault(x => x.SenderFullName == "Serkan Demirhan" + i.ToString());
-        //        if (newMail == null)
-        //        {
-        //            context.Mails.Add(new Mail
-        //            {
-        //                SenderMailAddress = "serkann.demirhan" + i + "@gmail.com",
-        //                SenderFullName = "Serkan Demirhan" + i,
-        //                ReceiverUserName = "Kadriye Doğutaş" + i,
-        //                Subject = "Konu Deneme" + i + "",
-        //                Context = "Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel.Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel. Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel. Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel.",
+        protected override void Seed(ProjectTemplateContext context)
+        {
+            Student newStudent = context.Students.FirstOrDefault(x => x.Firstname == "ogrenci");
+            if (newStudent == null)
+            {
+                context.Students.Add(new Student
+                        {
+                            Firstname = "ogrenci",
+                            Lastname = "soyadı",
+                            UserName = "kullanıcıadi",
+                            Email = "serkann.demirhan@gmail.com",
+                            Password = "123456",
+                            Active = true,
+                            Address = "bakırköy",
+                            Phone = "5976184545",
+                            Md5 = "37693cfc748049e45d87b8c7d8b9aacd",
+                            Industry = "deneme",
+                            Date = DateTime.Now
+                        });
+                context.SaveChanges();
+            }
+            bool deger;
+            int tag;
+            for (int i = 0; i < 40; i++)
+            {
+                if (i % 2 == 0)
+                {
+                    deger = true;
+                    tag = 1;
+                }
+                else
+                {
+                    tag = 2;
+                    deger = false;
+                }
+                Mail newMail = context.Mails.FirstOrDefault(x => x.SenderFullName == "Serkan Demirhan" + i.ToString());
+                if (newMail == null)
+                {
+                    context.Mails.Add(new Mail
+                    {
+                        SenderMailAddress = "serkann.demirhan" + i + "@gmail.com",
+                        SenderFullName = "Serkan Demirhan" + i,
+                        ReceiverUserName = "Kadriye Doğutaş" + i,
+                        Subject = "Konu Deneme" + i + "",
+                        Context = "Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel.Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel. Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel. Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel.",
 
-        //                Attachments = i + " dosya",
-        //                StudentId = 1,
-        //                IsRead = deger,
-        //                IsImportant = deger,
-        //                SenderTag = (SenderTag)tag,
-        //                IsDeleted = false,
-        //                IsChecked = false,
-        //                SendTime = DateTime.Now
-        //            });
-        //            context.SaveChanges();
-        //        }
-        //        else
-        //        {
-        //            context.Mails.AddOrUpdate(new Mail
-        //            {
-        //                IsDeleted = false,
-        //            });
-        //        }
-        //    }
-        //    base.Seed(context);
-        //}
+                        Attachments = i + " dosya",
+                        StudentId = 1,
+                        IsRead = deger,
+                        IsImportant = deger,
+                        SenderTag = (SenderTag)tag,
+                        IsDeleted = false,
+                        SendTime = DateTime.Now
+                    });
+                    context.SaveChanges();
+                }
+                else
+                {
+                    context.Mails.AddOrUpdate(new Mail
+                    {
+                        IsDeleted = false,
+                    });
+                }
+            }
+            base.Seed(context);
+        }
     }
 }
\ No newline at end of file
diff --git a/ProjectTemplate.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProjectTemplate.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 6e14199..b372502 100644
Binary files a/ProjectTemplate.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ProjectTemplate.Core/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/ProjectTemplate.Core/obj/Debug/ProjectTemplate.Core.csprojResolveAssemblyReference.cache b/ProjectTemplate.Core/obj/Debug/ProjectTemplate.Core.csprojResolveAssemblyReference.cache
index 0e27ac4..3ab5abf 100644
Binary files a/ProjectTemplate.Core/obj/Debug/ProjectTemplate.Core.csprojResolveAssemblyReference.cache and b/ProjectTemplate.Core/obj/Debug/ProjectTemplate.Core.csprojResolveAssemblyReference.cache differ
diff --git a/ProjectTemplate.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProjectTemplate.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 3a77830..3bd7e50 100644
Binary files a/ProjectTemplate.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ProjectTemplate.Repository/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/ProjectTemplate.Repository/obj/Debug/ProjectTemplate.Repository.csprojResolveAssemblyReference.cache b/ProjectTemplate.Repository/obj/Debug/ProjectTemplate.Repository.csprojResolveAssemblyReference.cache
index 3a7b5c0..1f66600 100644
Binary files a/ProjectTemplate.Repository/obj/Debug/ProjectTemplate.Repository.csprojResolveAssemblyReference.cache and b/ProjectTemplate.Repository/obj/Debug/ProjectTemplate.Repository.csprojResolveAssemblyReference.cache differ
diff --git a/ProjectTemplate.Service/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ProjectTemplate.Service/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index e1dcd65..d8c5197 100644
Binary files a/ProjectTemplate.Service/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ProjectTemplate.Service/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/ProjectTemplate.Service/obj/Debug/ProjectTemplate.Service.csprojResolveAssemblyReference.cache b/ProjectTemplate.Service/obj/Debug/ProjectTemplate.Service.csprojResolveAssemblyReference.cache
index 8a0e1fa..be194b7 100644
Binary files a/ProjectTemplate.Service/obj/Debug/ProjectTemplate.Service.csprojResolveAssemblyReference.cache and b/ProjectTemplate.Service/obj/Debug/ProjectTemplate.Service.csprojResolveAssemblyReference.cache differ
diff --git a/ProjectTemplate.v12.suo b/ProjectTemplate.v12.suo
index ea6f7c0..f865248 100644
Binary files a/ProjectTemplate.v12.suo and b/ProjectTemplate.v12.suo differ
diff --git a/UI/ConsoleApplication1/obj/Debug/ConsoleApplication1.csprojResolveAssemblyReference.cache b/UI/ConsoleApplication1/obj/Debug/ConsoleApplication1.csprojResolveAssemblyReference.cache
index a2c1e41..9da35c5 100644
Binary files a/UI/ConsoleApplication1/obj/Debug/ConsoleApplication1.csprojResolveAssemblyReference.cache and b/UI/ConsoleApplication1/obj/Debug/ConsoleApplication1.csprojResolveAssemblyReference.cache differ
diff --git a/UI/ConsoleApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/UI/ConsoleApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 44f94e0..e6d7ec1 100644
Binary files a/UI/ConsoleApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/UI/ConsoleApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/UI/WebApplication1/Controllers/AccountController.cs b/UI/WebApplication1/Controllers/AccountController.cs
index 6e95ca4..5835710 100644
--- a/UI/WebApplication1/Controllers/AccountController.cs
+++ b/UI/WebApplication1/Controllers/AccountController.cs
@@ -50,13 +50,14 @@ namespace WebApplication1.Controllers
                Session.Add("userId", stu.Id.ToString());
                return RedirectToAction("Index", "Linkedin");
           }
-          private XElement ReadXML()
+
+          private XElement ReadXml()
           {
                XElement xElement = XElement.Load(HttpContext.Server.MapPath("~/App_Data/xml.xml"));
                return xElement;
           }
 
-          private XmlDocument ReadXMLDoc()
+          private XmlDocument ReadXmlDoc()
           {
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.Load(HttpContext.Server.MapPath("~/App_Data/xml.xml"));
@@ -66,7 +67,7 @@ namespace WebApplication1.Controllers
           private void GetCityList()
           {
                IList<SelectListItem> result = new List<SelectListItem>();
-               XmlNodeList defaults = ReadXMLDoc().GetElementsByTagName("tbl_il");
+               XmlNodeList defaults = ReadXmlDoc().GetElementsByTagName("tbl_il");
 
                foreach (XmlNode node in defaults)
                {
@@ -80,10 +81,11 @@ namespace WebApplication1.Controllers
 
                ViewBag.City = result;
           }
+
           private string GetCity(int id)
           {
 
-               XmlNodeList defaults = ReadXMLDoc().GetElementsByTagName("tbl_il");
+               XmlNodeList defaults = ReadXmlDoc().GetElementsByTagName("tbl_il");
 
                foreach (XmlNode node in defaults)
                {
@@ -96,10 +98,11 @@ namespace WebApplication1.Controllers
 
                return ilAdi;
           }
+
           private string GetCounty(int id)
           {
 
-               XmlNodeList defaults = ReadXMLDoc().GetElementsByTagName("tbl_ilce");
+               XmlNodeList defaults = ReadXmlDoc().GetElementsByTagName("tbl_ilce");
 
                foreach (XmlNode node in defaults)
                {
@@ -112,13 +115,14 @@ namespace WebApplication1.Controllers
 
                return ilceAdi;
           }
+
           [HttpPost]
           public JsonResult GetCountyList(string cityCode)
           {
 
                IList<SelectListItem> result = new List<SelectListItem>();
 
-               IEnumerable<XElement> defaults = ReadXML().Descendants("tbl_ilce");
+               IEnumerable<XElement> defaults = ReadXml().Descendants("tbl_ilce");
 
                var nodes = defaults.Where(x =>
                {
@@ -156,6 +160,7 @@ namespace WebApplication1.Controllers
                if (students != null)
                {
                     Session.Add("loggedStudent", students);
+                   ViewBag.isSession = true;
                     return RedirectToAction("Index", "Home");
                }
                ViewBag.Msg = "Lütfen bilgilerinizi tekrar kontrol ediniz!";
@@ -166,6 +171,7 @@ namespace WebApplication1.Controllers
           {
                return View();
           }
+
           [HttpPost]
           public ActionResult ForgetPassword(string email)
           {
@@ -191,8 +197,6 @@ namespace WebApplication1.Controllers
                     return View("Index", _serviceStudent.GetStudentsByMd5(id));
                }
                return RedirectToAction("Login");
-
-
           }
      }
 }
diff --git a/UI/WebApplication1/Controllers/EmailController.cs b/UI/WebApplication1/Controllers/EmailController.cs
index 4dc20d2..a9d4353 100644
--- a/UI/WebApplication1/Controllers/EmailController.cs
+++ b/UI/WebApplication1/Controllers/EmailController.cs
@@ -20,7 +20,6 @@ namespace WebApplication1.Controllers
         }
         public ActionResult Index()
         {
-
             var viewMail = new List<ModelMail>();
             var student = (Session["loggedStudent"] as Student);
             if (student == null) throw new Exception("Önce giriş yapılmalıdır");
@@ -73,15 +72,11 @@ namespace WebApplication1.Controllers
             }
 
             return View("Details", viewMail);
-
-            
         }
 
         [HttpPost]
         public ActionResult Delete(int id)
         {
-
-
             var deletemail = _serviceMail.GetById(id);
             deletemail.IsDeleted = true;
             _serviceMail.Update(deletemail);
@@ -94,7 +89,6 @@ namespace WebApplication1.Controllers
         {
             bool starCheck = StarCheckControl(id);
             return Json(starCheck);
-
         }
 
         [HttpPost]
@@ -116,9 +110,6 @@ namespace WebApplication1.Controllers
 
             _serviceMail.Update(mail);
             return mail.IsImportant;
-        
         }
-
-
     }
 }
\ No newline at end of file
diff --git a/UI/WebApplication1/Controllers/NotificationController.cs b/UI/WebApplication1/Controllers/NotificationController.cs
index c59ed88..9229099 100644
--- a/UI/WebApplication1/Controllers/NotificationController.cs
+++ b/UI/WebApplication1/Controllers/NotificationController.cs
@@ -16,14 +16,26 @@ namespace WebApplication1.Controllers
         public JsonResult GetMessageCount()
         {
             var student = (Student)Session["loggedStudent"];
-            var mailCount = _serviceMail.GetMailCountByStudentId(student.Id);
-            return Json(mailCount, JsonRequestBehavior.AllowGet);
+
+            if (student != null)
+            {
+                var mailCount = _serviceMail.GetMailCountByStudentId(student.Id);
+                return Json(mailCount, JsonRequestBehavior.AllowGet);
+            }
+
+            return Json(0, JsonRequestBehavior.AllowGet);
         }
         public ActionResult GetMessages()
         {
             var student = (Student)Session["loggedStudent"];
-            var mails = _serviceMail.GetMailsByStudent(student.Id);
-            return PartialView(mails);
+
+            if (student != null)
+            {
+                var mails = _serviceMail.GetMailsByStudent(student.Id);
+                return PartialView(mails);
+            }
+
+            return RedirectToAction("Index", "Account");
         }
-    } 
+    }
 }
\ No newline at end of file
diff --git a/UI/WebApplication1/Views/Home/Profil.cshtml b/UI/WebApplication1/Views/Home/Profil.cshtml
index 9f0b1e2..731ea3a 100644
--- a/UI/WebApplication1/Views/Home/Profil.cshtml
+++ b/UI/WebApplication1/Views/Home/Profil.cshtml
@@ -434,10 +434,6 @@
                                         </ul> <!-- list-wrapper -->
                                     </div> <!-- content-list -->
                                 </div> <!-- col-xs-12 col-sm-6 -->
-
-
-
-
                             </div> <!-- row -->
                         </div> <!-- pd-20 -->
                     </div>  <!-- groups tab -->
diff --git a/UI/WebApplication1/Views/Notification/GetMessages.cshtml b/UI/WebApplication1/Views/Notification/GetMessages.cshtml
index 532ffc3..5cf9e11 100644
--- a/UI/WebApplication1/Views/Notification/GetMessages.cshtml
+++ b/UI/WebApplication1/Views/Notification/GetMessages.cshtml
@@ -1,17 +1,31 @@
-@model IEnumerable<ProjectTemplate.Core.Entities.Mail>
+@using ProjectTemplate.Core.Enums
+@model IEnumerable<ProjectTemplate.Core.Entities.Mail>
 
 <ul class="list-wrapper pd-lr-10">
     @foreach (var item in Model.Take(4))
     {
+        var stil = String.Empty;
+        switch (item.SenderTag)
+        {
+            case SenderTag.BilgeAdam:
+                stil = "vd_bg-red ";
+                break;
+            case SenderTag.CareerCoach:
+                stil = "vd_bg-green ";
+                break;
+            case SenderTag.CareerCounselor:
+                stil = "vd_bg-blue";
+                break;
+        }
         <li style="background-color:whitesmoke;">
             <a href="/Email/Details/@item.Id">
                 <div class="menu-icon">
                     <!-- entitylerde mail gönderenin fotoğrafı olmadığı için bu alan daha sonra düzenlenecek
                         şimdilik default bir fotoğraf gösteriliyor -->
-                    <img alt="example image" src="../../Content/img/avatar/avatar.jpg">
+                    <img alt="example image" src="../../Content/img/avatar/avatar-8.jpg">
                 </div>
                 <div class="menu-text">
-                    <span class="label vd_bg-green append-icon">@item.SenderTag</span>
+                    <span class="label @stil append-icon">@item.SenderTag</span>
                     <b>@item.SenderFullName</b><br />
                     @if (item.Context.Length < 30)
                     {
diff --git a/UI/WebApplication1/Views/Shared/_Layout.cshtml b/UI/WebApplication1/Views/Shared/_Layout.cshtml
index 7448c9b..a82b6d0 100644
--- a/UI/WebApplication1/Views/Shared/_Layout.cshtml
+++ b/UI/WebApplication1/Views/Shared/_Layout.cshtml
@@ -102,7 +102,7 @@
                                                         </div>
                                                         <div class="content-list content-image">
                                                             <div data-rel="scroll" id="messageList">
-                                                           
+
                                                             </div>
                                                             <div class="closing text-center" style="">
                                                                 <a href="/Email/Index">Tüm Hareket Dökümünü Gör <i class="fa fa-angle-double-right"></i></a>
@@ -258,7 +258,7 @@
                                                                         </div>
                                                                         <div class="menu-text">Mesajlar</div>
                                                                         <div class="menu-badge">
-                                                                            <div class="badge vd_bg-red"></div>
+                                                                            <div class="badge vd_bg-red" id="messageNumber"></div>
                                                                         </div>
                                                                     </a>
                                                                 </li>
@@ -366,7 +366,7 @@
 
                                 </li>
                                 <li>
-                                    @Html.ActionLink("Özgeçmiş", "Ozgecmis", "Home", new {area = ""}, new {@class = "menu-text"})
+                                    @Html.ActionLink("Özgeçmiş", "Ozgecmis", "Home", new { area = "" }, new { @class = "menu-text" })
 
 
                                     <span class="menu-badge"><span class="badge vd_bg-black-30"></span></span>
@@ -374,9 +374,9 @@
                                 </li>
                                 <li>
                                     @Html.ActionLink("Email", "Index", "Email", new { area = "" }, new { @class = "menu-text" })
-                                        <span class="menu-badge"><span class="badge vd_bg-red"></span></span>
-                                    
-                                </li> 
+                                    <span class="menu-badge"><span class="badge vd_bg-red"></span></span>
+
+                                </li>
                                 <li>
                                     @Html.ActionLink("Takvimim", "Takvim", "Home", new { area = "" }, new { @class = "menu-text" })
                                     <span class="menu-badge"><span class="badge vd_bg-black-30"></span></span>
@@ -1273,7 +1273,6 @@
     </div>
     <!-- .vd_body END -->
     <a id="back-top" href="#" data-action="backtop" class="vd_back-top visible"> <i class="fa  fa-angle-up"> </i> </a>
-
     <!--
     <a class="back-top" href="#" id="back-top"> <i class="icon-chevron-up icon-white"> </i> </a> -->
     <!-- Javascript =============================================== -->
@@ -1286,45 +1285,57 @@
 
     @RenderSection("scripts", required: false)
 
-<script type="text/javascript">
-    function getMessageCount() {
-        $.ajax({
-            url: '/Notification/GetMessageCount',
-            dataType: 'json',
-            type: 'GET',
-            success: function (data) {
-                $('#messageCount').text(data);
-
-            },
-            error: function (err) { }
-        });
-    }
-
-    function getMessages() {
-        $.ajax({
-            url: '/Notification/GetMessages',
-            dataType: 'html',
-            type: 'GET',
-            success: function (data) {
-                $('#messageList').html(data);
-            },
-            error: function(err) {
+    <script type="text/javascript">
+        var count;
+        
+        $(document).ready(function () {
+            getMessageCount();
+            function refreshPartial() {
+                setTimeout(function () {
+                    getMessageCount();
+                    refreshPartial();
+                }, 30000);
             }
+            refreshPartial();
         });
-    }
 
-    $(document).ready(function () {
-        getMessageCount();
-        function refreshPartial() {
+        function soundPlay() {
+            var sound = new Audio();
+            sound.src = "notifysound.mp3";
+            sound.play();
+        }
 
-            setTimeout(function () {
-                getMessageCount();
-                refreshPartial();
-            }, 30000);
+        function getMessageCount() {
+            $.ajax({
+                url: '/Notification/GetMessageCount',
+                dataType: 'json',
+                type: 'GET',
+                success: function (data) {
+                    $('#messageCount').text(data);
+                    $('#messageNumber').text(data);
+                    if (data>count) {
+                        soundPlay();
+                    }
+                    count = data;
+                },
+                error: function (err) { }
+            });
         }
-        refreshPartial();
-    });
 
-</script>
+        function getMessages() {
+            $.ajax({
+                url: '/Notification/GetMessages',
+                dataType: 'html',
+                type: 'GET',
+                success: function (data) {
+                    if (data.indexOf("Login")<0) {
+                        $('#messageList').html(data);
+                    }
+                },
+                error: function (err) {
+                }
+            });
+        }
+    </script>
 </body>
 </html>
diff --git a/UI/WebApplication1/WebApplication1.csproj b/UI/WebApplication1/WebApplication1.csproj
index a4844b1..e3011d5 100644
--- a/UI/WebApplication1/WebApplication1.csproj
+++ b/UI/WebApplication1/WebApplication1.csproj
@@ -234,6 +234,7 @@
     <Content Include="favicon.ico" />
     <Content Include="fonts\glyphicons-halflings-regular.svg" />
     <Content Include="Global.asax" />
+    <Content Include="notifysound.mp3" />
     <Content Include="Scripts\bootstrap.min.js" />
     <Content Include="Scripts\calender.js" />
     <Content Include="Scripts\caroufredsel.js" />
diff --git a/UI/WebApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/UI/WebApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 8db909e..1a34787 100644
Binary files a/UI/WebApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/UI/WebApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/UI/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/UI/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index afd2ef5..f0e7e2b 100644
Binary files a/UI/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/UI/WindowsFormsApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ