public ActionResult CreateEdit(int?AccountMasterId, int?CollectionId) { Collection collection = new Collection(); if (AccountMasterId != null) { collection.AccountMasterId = Convert.ToInt32(AccountMasterId); } if (CollectionId != null) { collection = CollectionDataLayer.Find(CollectionId); } ViewBag.AccountMasterId = new SelectList(AccountDataLayer.ToList(), "AccountMasterId", "AccountName", collection.AccountMasterId); return(View(collection)); }
// GET: AccountMasters public ActionResult Index() { return(View(accountDataLayer.ToList())); }