Пример #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()
            });
        }
Пример #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();
        }
Пример #3
0
        public JsonResult OutboxMailItems(int pageNumber)
        {
            mu = Membership.GetUser();

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

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

            StringBuilder sb = new StringBuilder();

            model.AllInInbox = false;

            return Json(new
            {
                ListItems = model.ToUnorderdList
            });
        }
Пример #4
0
        public ActionResult Outbox()
        {
            mu = Membership.GetUser();

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

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

            StringBuilder sb = new StringBuilder();

            model.AllInInbox = false;

            ViewBag.DirectMessages = model.ToUnorderdList;

            return View();
        }
Пример #5
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()
            });
        }
Пример #6
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();
        }