示例#1
0
        public ActionResult BandNewMessage(int? MessageId)
        {
            NewMessageViewModel model = new NewMessageViewModel();

            if (MessageId.HasValue)
            {
                model = msgService.GetNewMessageViewModel(MessageId);
            }

            return View(model);
        }
示例#2
0
        public ActionResult BandNewMessage(NewMessageViewModel model)
        {
            model.AuthorEmail = Session["band"].ToString();

            if (ModelState.IsValid)
            {
                if (msgService.MessageRecipientsValid(model.Recipients))
                {
                    msgService.SendMessage(model);

                    return RedirectToAction("BandSentMessages");
                }
                else
                {
                    model.RecipientsErrorMsg = "Some of recipients doeas not exists";
                }

            }
            return View(model);
        }
示例#3
0
        public ActionResult SendBandMessage(string Recipient)
        {
            NewMessageViewModel model = new NewMessageViewModel();
            model.Recipients = Recipient;

            if (Session["user"] != null)
            {
                model.AuthorEmail = Session["user"].ToString();
            }
            else
            {
                model.AuthorEmail = Session["band"].ToString();
            }

            return View(model);
        }
示例#4
0
        public ActionResult SendBandMessage(NewMessageViewModel model)
        {
            if (ModelState.IsValid)
            {
                if (msgService.MessageRecipientsValid(model.Recipients))
                {
                    msgService.SendMessage(model);
                    return View(model);
                }
                else
                {
                    model.RecipientsErrorMsg = "Some of recipients doeas not exists";
                }

            }

            return View(model);
        }