Ejemplo n.º 1
0
 public Boolean deleteCategories(Category oldCategory)
 {
     try
     {
         this.DataContext.Categories.DeleteOnSubmit(oldCategory);
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
Ejemplo n.º 2
0
 public Boolean insertCategories(Category newCategory)
 {
     try
     {
         this.DataContext.Categories.InsertOnSubmit(newCategory);
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
Ejemplo n.º 3
0
 public Boolean editCategories(String oldName, Category newCategory)
 {
     try
     {
         Category editableCategory = this.DataContext.Categories.Single(c => c.Nom == oldName);
         editableCategory.Nom = newCategory.Nom;
         editableCategory.Description = newCategory.Description;
         this.DataContext.SubmitChanges();
         return true;
     }
     catch (Exception) /*FIXME*/
     {
         return false;
     }
 }
Ejemplo n.º 4
0
 partial void DeleteCategory(Category instance);
Ejemplo n.º 5
0
 partial void UpdateCategory(Category instance);
Ejemplo n.º 6
0
 partial void InsertCategory(Category instance);