public ActionResult Edit(int id) { using (BusinessLogicLayer.BLLContext ctx = new BusinessLogicLayer.BLLContext()) { var relatednumber = ctx.RelatedNumbers.FindRelatedNumber(id); var numbers = ctx.Numbers.GetAllNumbers(); Models.DropDownViewForRelatedNumbers m = new Models.DropDownViewForRelatedNumbers(); m.relatedNumber = relatednumber; m.SetValues(numbers); m.SelectedParentID = relatednumber.ParentNumberID; return(View(m)); } }
public ActionResult Edit(Models.DropDownViewForRelatedNumbers ddl) { int i = ddl.SelectedParentID; return(View()); }