public PartialViewResult CreatePhoneConfirmed( PhoneInput model ) { //todo Finish Method if(ModelState.IsValid) { Phone Phone = new Phone(db.Carriers.Find(model.CarrierID), model.AreaCode, model.Prefix, model.Line); Account.Phones.Add(Phone); if(model.defaultMethod) Account.DefaultPhone = Phone; db.SaveChanges(); } else { } return PartialView( "_Contact", Account ); }
public PartialViewResult EditPhoneConfirmed( PhoneInput model ) { //todo Finish Method if ( ModelState.IsValid ) { } else { } return PartialView( "_Contact", Account ); }
public PartialViewResult EditPhone( Guid id ) { Phone Phone = db.Phones.Find(id); PhoneInput model = new PhoneInput(Phone.RID, Phone.Carrier.RID, Phone.AreaCode, Phone.Prefix, Phone.Line, Phone.OrderUpdates, this.Account.DefaultPhone == Phone); ViewBag.Carriers = new SelectList( db.Carriers.ToList(), "RID", "Title", Phone.Carrier); return PartialView( "_EditPhone", model ); }