public void editCar(tblCars car) { using (var db = new CSCbelgiumDatabaseEntities()) { db.Entry(car).State = EntityState.Modified; db.SaveChanges(); } }
public void UpdateSlide(tblSlides slide) { using (var db = new CSCbelgiumDatabaseEntities()) { db.Entry(slide).State = EntityState.Modified; db.SaveChanges(); } }
public void UpdateImage(tblImages image) { using (var db = new CSCbelgiumDatabaseEntities()) { db.Entry(image).State = EntityState.Modified; db.SaveChanges(); } }
public void UpdatePost(tblPosts post) { using (var db = new CSCbelgiumDatabaseEntities()) { db.Entry(post).State = EntityState.Modified; db.SaveChanges(); } }
public void deleteColor(int colorid) { using (var db = new CSCbelgiumDatabaseEntities()) { tblColors color = getColor(colorid); db.Entry(color).State = EntityState.Deleted; db.SaveChanges(); } }
public void deleteSlide(int slideID) { using (var db = new CSCbelgiumDatabaseEntities()) { tblSlides slide = getSlide(slideID); db.Entry(slide).State = EntityState.Deleted; db.SaveChanges(); } }
public void deletePost(int postID) { using (var db = new CSCbelgiumDatabaseEntities()) { tblPosts post = getPost(postID); db.Entry(post).State = EntityState.Deleted; db.SaveChanges(); } }
public void deleteBrand(int brandid) { using (var db = new CSCbelgiumDatabaseEntities()) { tblBrands brand = getBrand(brandid); db.Entry(brand).State = EntityState.Deleted; db.SaveChanges(); } }
public void SellCar(tblCars car, bool sold) { using (var db = new CSCbelgiumDatabaseEntities()) { if (sold) { car.Sold = (byte)1; db.Entry(car).State = EntityState.Modified; db.SaveChanges(); } else { car.Sold = (byte)0; db.Entry(car).State = EntityState.Modified; db.SaveChanges(); } } }
public void SellRim(tblRims rim, bool sold) { using (var db = new CSCbelgiumDatabaseEntities()) { if (sold) { rim.Sold = (byte)1; db.Entry(rim).State = EntityState.Modified; db.SaveChanges(); } else { rim.Sold = (byte)0; db.Entry(rim).State = EntityState.Modified; db.SaveChanges(); } } }
public void UpdateOrder(tblSlides slide, int txtOrder) { using (var db = new CSCbelgiumDatabaseEntities()) { System.Diagnostics.Debug.WriteLine(txtOrder); slide.SlideOrder = txtOrder; db.Entry(slide).State = EntityState.Modified; db.SaveChanges(); } }
public void deleteRim(int rimID) { using (var db = new CSCbelgiumDatabaseEntities()) { deleteImagesOfRim(rimID); tblRims rim = getRim(rimID); db.Entry(rim).State = EntityState.Deleted; db.SaveChanges(); } }
public void deleteCar(int CarID) { using (var db = new CSCbelgiumDatabaseEntities()) { tblImagesDAO imagesdao = new tblImagesDAO(); imagesdao.DeleteAllImagesOfCar(getCar(CarID)); tblCars car = getCar(CarID); db.Entry(car).State = EntityState.Deleted; db.SaveChanges(); } }
public void updateAlignment(tblSlides slide, int ddlID) { using (var db = new CSCbelgiumDatabaseEntities()) { switch (ddlID) { case 0: slide.CaptionAlignment = "Links"; break; case 1: slide.CaptionAlignment = "Midden"; break; case 2: slide.CaptionAlignment = "Rechts"; break; } db.Entry(slide).State = EntityState.Modified; db.SaveChanges(); } }