示例#1
0
        public ActionResult Postcard(string recipient, string sender, string location, string item)
        {
            LetterVariable myLetterVariable = new LetterVariable();

            myLetterVariable.SetRecipient(recipient);
            myLetterVariable.SetSender(sender);
            myLetterVariable.SetLocation(location);
            myLetterVariable.SetItem(item);
            return(View(myLetterVariable));
        }
示例#2
0
        public ActionResult GreetingCard()
        {
            LetterVariable myLetterVariable = new LetterVariable();

            myLetterVariable.SetRecipient(Request.Query["recipient"]);
            myLetterVariable.SetSender(Request.Query["sender"]);
            myLetterVariable.SetLocation(Request.Query["location"]);
            myLetterVariable.SetItem(Request.Query["item-to-bring"]);

            return(View("Hello", myLetterVariable));
        }