示例#1
0
        public JsonResult MailItems(int pageNumber)
        {
            mu = Membership.GetUser();

            var model = new BootBaronLib.AppSpec.DasKlub.BOL.DirectMessages();

            model.GetMailPageWise(pageNumber, pageSize, Convert.ToInt32(mu.ProviderUserKey));

            StringBuilder sb = new StringBuilder();

            foreach (BootBaronLib.AppSpec.DasKlub.BOL.DirectMessage cnt in model)
            {
                sb.Append(cnt.ToUnorderdListItem);
            }

            foreach (DirectMessage dm in model)
            {
                if (!dm.IsRead)
                {
                    dm.IsRead = true;
                    dm.Update();
                }
            }

            return Json(new
            {
                ListItems = sb.ToString()
            });
        }
示例#2
0
        public ActionResult Inbox()
        {
            mu = Membership.GetUser();

            var model = new BootBaronLib.AppSpec.DasKlub.BOL.DirectMessages();

            ViewBag.RecordCount = model.GetMailPageWise(1, pageSize, Convert.ToInt32(mu.ProviderUserKey));

            StringBuilder sb = new StringBuilder();

            ViewBag.DirectMessages = model.ToUnorderdList;

            foreach (DirectMessage dm in model)
            {
                if (!dm.IsRead)
                {
                    dm.IsRead = true;
                    dm.Update();
                }
            }

            return View();
        }