Пример #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);
        }