Example #1
0
 public void Delete(int Idx)
 {
     using (GalleryDataContext context = new GalleryDataContext(Settings.ConnectionString))
     {
         context.CommandTimeout         = Settings.CommandTimeout;
         context.DeferredLoadingEnabled = false;
         Gallery_Topic topic_obj = context.Gallery_Topics.Single(p => p.Gallery_TopicId == Idx);
         context.Gallery_Topics.DeleteOnSubmit(topic_obj);
         context.SubmitChanges();
     }
 }
Example #2
0
 public static int?InsertData(Gallery_Topic entity)
 {
     using (GalleryDataContext context = new GalleryDataContext(Settings.ConnectionString))
     {
         int?   o_return = 0;
         string UserLog  = Convert.ToString(entity.UserLog);
         var    q        = context.Gallery_Topics_Insert(UserLog, IP, entity.Gallery_TopicName,
                                                         entity.Alias, entity.ParentId, entity.Description, entity.Status, ref o_return);
         context.SubmitChanges();
         return(o_return);
     }
 }
Example #3
0
 partial void UpdateGallery_Topic(Gallery_Topic instance);
Example #4
0
 partial void DeleteGallery_Topic(Gallery_Topic instance);
Example #5
0
 partial void InsertGallery_Topic(Gallery_Topic instance);