public ActionResult Edit([Bind(Include = "CatID,BusinessType,BusinessCategory")] BusinessCategoryType businessCategoryType) { if (ModelState.IsValid) { db.Entry(businessCategoryType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(businessCategoryType)); }
public ActionResult Edit([Bind(Include = "Reference,Area,SubArea,Name,SubBuildingNumber,BuildingNumber,BuildingName,StreetName,Townland,Locality,CityTown,County,Postcode,FoodBusinessOperators,BusinessCategory,BusinessType,RiskCategory,Foodofficer")] NationalPremisesRegister nationalPremisesRegister) { if (ModelState.IsValid) { db.Entry(nationalPremisesRegister).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(nationalPremisesRegister)); }
public ActionResult Edit([Bind(Include = "InspectionNo,Date,PremisesRef,Officer,GeneralHygieneStatus")] InspectionDetails inspectionDetails) { if (ModelState.IsValid) { db.Entry(inspectionDetails).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(inspectionDetails)); }
public ActionResult Edit([Bind(Include = "Account,Name,hid")] GLaccounts gLaccounts, int?page, string ipp) { if (ModelState.IsValid) { gLaccounts.hid = (byte[])TempData["hid"]; db.Entry(gLaccounts).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); int pageNumber = (page ?? 1); ipp = ipp ?? (string)Session["DefaultItemsPerPage"]; ArrayList recolhidas = (ArrayList)Session["ContasCollapsedList"]; hidServices <GLaccounts> hs = new hidServices <GLaccounts>(db); var result = db.GLaccounts.OrderBy(c => c.hid).ToList().Where(c => c.IsNotCollapsed(hs, recolhidas)); return(View("Index", result.ToPagedList(pageNumber, int.Parse(ipp)))); } return(View(gLaccounts)); }
public ActionResult Edit([Bind(Include = "AspectsElementsID,Name,hid,Level,parent,LeglislationLINK,Comment,CommentLINK")] GLAspectsandElements gLaccounts, int?page, string ipp) { if (ModelState.IsValid) { gLaccounts.hid = (byte[])TempData["hid"]; db.Entry(gLaccounts).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); int pageNumber = (page ?? 1); ipp = ipp ?? (string)Session["DefaultItemsPerPage"]; ArrayList recolhidas = (ArrayList)Session["ContasCollapsedList"]; hidServices <GLAspectsandElements> hs = new hidServices <GLAspectsandElements>(db); string wc = hs.WhereClause(recolhidas); var result = db.Database.SqlQuery <GLAspectsandElements>("select * from GLAspectsandElements where " + wc + " order by hid").ToList(); // Sql server only //var result = db.GLaccounts.OrderBy(c => c.hid).ToList().Where(c => c.IsNotCollapsed(hs, recolhidas)); return(View("Index", result.ToPagedList(pageNumber, int.Parse(ipp)))); } return(View(gLaccounts)); }