示例#1
0
        public ActionResult Create(FormCollection form)
        {
            ApiPhone phone = new ApiPhone()
            {
                PhoneId     = Convert.ToInt32(form["PhoneId"]),
                PhoneNumber = form["PhoneNumber"].ToString(),
            };

            if (client.CreatePhone(phone))
            {
                return(RedirectToAction("Phones"));
            }
            else
            {
                return(View(phone));
            }
        }