예제 #1
0
 public bool commitInsert(string _imageFile, string _FileName)
 {
     //create an insteance of the data context class called objGalleryImageDC
     NorthBayDataContext objGalleryImageDC = new NorthBayDataContext();
     //to ensure all data will be disposed when finished
     using (objGalleryImageDC)
     {
         //create an instance of the table
         ImageClass objNewGalleryImage = new ImageClass();
         //set table column to new values being passed from *.aspx card_image
         //objNewCardImage.id = _id;
         objNewGalleryImage.FilePath = _imageFile;
         objNewGalleryImage.FileName = _FileName;
         //insert command
         objGalleryImageDC.ImageClasses.InsertOnSubmit(objNewGalleryImage);
         //commit insert against db
         objGalleryImageDC.SubmitChanges();
         return true;
     }
 }
예제 #2
0
 partial void DeleteImageClass(ImageClass instance);
예제 #3
0
 partial void UpdateImageClass(ImageClass instance);
예제 #4
0
 partial void InsertImageClass(ImageClass instance);