示例#1
0
        public ActionResult Edit([Bind(Include = "Id,PhoneTypeId,PhoneNumber,ClientId")] Phone phone)
        {
            if (ModelState.IsValid)
            {
                db.Entry(phone).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index", new { cId = phone.ClientId }));
            }
            ViewBag.ClientId = new SelectList(db.Clients, "Id", "Name", phone.ClientId);
            parId            = phone.ClientId;

            return(View(phone));
        }