public async Task <IActionResult> Edit(string id, [Bind("GoldTypeId,GoldCrt")] GoldKrtMst goldKrtMst) { if (id != goldKrtMst.GoldTypeId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(goldKrtMst); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GoldKrtMstExists(goldKrtMst.GoldTypeId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(goldKrtMst)); }
public ActionResult Gold(GoldKrtMst ab) { entities.GoldKrtMsts.Add(new GoldKrtMst { GoldType_ID = ab.GoldType_ID, Gold_Crt = ab.Gold_Crt }); entities.SaveChanges(); return(View()); }
public ActionResult Edit(GoldKrtMst gold) { if (ModelState.IsValid) { db.Edit(gold); return(RedirectToAction("Index")); } return(View()); }
public async Task <IActionResult> Create([Bind("GoldTypeId,GoldCrt")] GoldKrtMst goldKrtMst) { if (ModelState.IsValid) { _context.Add(goldKrtMst); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(goldKrtMst)); }