Beispiel #1
0
        public JsonResult ReplyMailItems(int pageNumber)
        {
            // basing the user on the referrer, this will be blank if it uses SSL, change then

            string referrring = Request.UrlReferrer.ToString();
            string[] partsOfreferring = referrring.Split('/');
            UserAccount ua = new UserAccount(partsOfreferring[partsOfreferring.Length - 1]);

            mu = Membership.GetUser();

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

            model.GetMailPageWiseToUser(pageNumber, pageSize,
                Convert.ToInt32(mu.ProviderUserKey), ua.UserAccountID);

            StringBuilder sb = new StringBuilder();

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

            return Json(new
            {
                ListItems = sb.ToString()
            });
        }
Beispiel #2
0
        public ActionResult Reply(string userName)
        {
            ViewBag.DisplayName = userName;

            mu = Membership.GetUser();
            ua = new UserAccount(userName);

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

            ViewBag.RecordCount = model.GetMailPageWiseToUser(1, pageSize, Convert.ToInt32(mu.ProviderUserKey), ua.UserAccountID);

            ViewBag.DirectMessages = model.ToUnorderdList;

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

            return View();
        }