Beispiel #1
0
        public void Delete(AttributeArticle Obj)
        {
            if (Obj.EnumereGamme1.AG_No.HasValue)
            {
                this.DBLocal.Attribute.DeleteAllOnSubmit(this.DBLocal.Attribute.Where(at => at.Sag_Id == Obj.EnumereGamme1.cbMarq));
            }
            if (Obj.EnumereGamme2.AG_No.HasValue)
            {
                this.DBLocal.Attribute.DeleteAllOnSubmit(this.DBLocal.Attribute.Where(at => at.Sag_Id == Obj.EnumereGamme2.cbMarq));
            }

            this.DBLocal.AttributeArticleImage.DeleteAllOnSubmit(this.DBLocal.AttributeArticleImage.Where(ati => ati.AttArt_Id == Obj.AttArt_Id));
            this.DBLocal.AttributeArticle.DeleteOnSubmit(Obj);
            this.Save();
        }
Beispiel #2
0
 public void Add(AttributeArticle Obj)
 {
     this.DBLocal.AttributeArticle.InsertOnSubmit(Obj);
     this.Save();
 }