예제 #1
0
 public static void delete(int id)
 {
     DB sample = new DB();
     SliderImage deleteitem = sample.SliderImages.Single(item => item.ID == id);
     sample.SliderImages.Remove(deleteitem);
     sample.SaveChanges();
 }
예제 #2
0
 public static void updateimage(SliderImage slider)
 {
     DB sample = new DB();
     SliderImage oldimage = sample.SliderImages.Single(item => item.ID == slider.ID);
     oldimage.Title = slider.Title;
     oldimage.ImagePath = slider.ImagePath;
     oldimage.Status = slider.Status;
     sample.SaveChanges();
 }
예제 #3
0
 public static void insertcontact(contactu cmt)
 {
     DB person = new DB();
     person.contactus.Add(cmt);
     person.SaveChanges();
 }
예제 #4
0
 public static void Addimages(SliderImage slider)
 {
     DB sample = new DB();
     sample.SliderImages.Add(slider);
     sample.SaveChanges();
 }