コード例 #1
0
 public void Update(DS_ShopTheme ShopTheme)
 {
     using (var ct = new DS_ShopThemeDataContext(DbHelperSQL.Connection))
     {
         ct.DS_ShopTheme.Attach(ShopTheme, true);
         ct.SubmitChanges();
     }
 }
コード例 #2
0
 public void Add(DS_ShopTheme ShopTheme)
 {
     using (var ct = new DS_ShopThemeDataContext(DbHelperSQL.Connection))
     {
         ct.DS_ShopTheme.InsertOnSubmit(ShopTheme);
         ct.SubmitChanges();
     }
 }
コード例 #3
0
 public void Delete(int ID)
 {
     using (var ct = new DS_ShopThemeDataContext(DbHelperSQL.Connection))
     {
         DS_ShopTheme st = ct.DS_ShopTheme.Single(a => a.ID == ID);
         ct.DS_ShopTheme.DeleteOnSubmit(st);
         ct.SubmitChanges();
         var path = HttpContext.Current.Server.MapPath(ThemePath(ID));
         if (Directory.Exists(path))
         {
             Directory.Delete(path, true);
         }
     }
 }