public async Task <IActionResult> Edit(string id, [Bind("Userid,Userpassword,Usercode,Usergroup,Userentry,UserNomore,Userlanguage,ModifLastupdate,Mitemsys,Branchcode,Userdate,Userno,Storecode,Entryuser")] Users users) { if (id != users.Userid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(users); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UsersExists(users.Userid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(users)); }
public async Task <IActionResult> Edit(string id, [Bind("Familycode,Itemcode,Itemname,Unitcode,Itemcostprice,Itemsaleprice,ItemcodeAlt1,ItemcodeAlt2,ItemcodeAlt3,Itemclassifcode,Itemsalestax,ItemsalepriceTax,Itembarcode,Pharmacydiscp,Additionaldiscp,Specialdiscp,Itemshapecode,Itemorigincode,Itemeffectcode,Suppcode,ItemnameScientific,Itemexpiry,Itemcomment,ItemsalepriceExtrap,Usercode,Itemnomoreuse,PrintBarcode,HiTypecode,Fmi,Itemsaleprice2,Itemslevel,Itemproducercode,Suppitemcode,Itemsort,Itemmodified,Packqty,Unitsaleprice,Fridgeitem,Hasdifforigin,Hasdiffpacks,Itemtrans,Itemsalestaxp,Itemmedicine,Itemstoreclassif,ItemupdtMonthlyqty,Itemlastupdate,Itemtrans1,Itemtrans2,Itemtrans3,Itemsearchkey,Itemarchive,Itemeffectcode2,Itempartno,Itemnosaleclassif,Itemonweb,Itemrefcode,Itemperformrate,Itempointsys,Itemexpcode,Costcentercode,Itemmanuf,Itemglobalcode,Testcode,Posdiscp")] Items items) { if (id != items.Itemcode) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(items); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ItemsExists(items.Itemcode)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(items)); }