示例#1
0
 public bool commitInsert( string _src, string _name)
 {
     card_imagesDataContext objCardImageDC = new card_imagesDataContext();
     //to ensure all data will be disposed when finished
     using (objCardImageDC)
     {
         //create an instance of the table
         card_image objNewCardImage = new card_image();
         //set table column to new values being passed from *.aspx card_image
         //objNewCardImage.id = _id;
         objNewCardImage.src = _src;
         objNewCardImage.name = _name;
         //insert command
         objCardImageDC.card_images.InsertOnSubmit(objNewCardImage);
         //commit insert against db
         objCardImageDC.SubmitChanges();
         return true;
     }
 }
 partial void Deletecard_image(card_image instance);
 partial void Updatecard_image(card_image instance);
 partial void Insertcard_image(card_image instance);