public ActionResult SelectShopType(int shopid) { Type_Shop ts = new Type_Shop { IdShop = shopid, IdType = 1 }; return(View(ts)); }
public ActionResult SelectShopType(Type_Shop ts) { try { db.Type_Shop.Add(ts); db.SaveChanges(); return(RedirectToAction("Index")); } catch (Exception ex) { ModelState.AddModelError(string.Empty, ex); } return(View(ts)); }