コード例 #1
0
        public static Category CreateCategory(string code, string name, string dealerCode)
        {
            Category cat = CategoryDAO.GetCategory(code, dealerCode);
            if (cat != null) return null;

            cat = new Category() { DealerCode = dealerCode, Name = name, Code = code };
            DC.Categories.InsertOnSubmit(cat);
            DC.SubmitChanges();

            return cat;
        }
コード例 #2
0
 private void detach_Categories(Category entity)
 {
     this.SendPropertyChanging();
     entity.Dealer = null;
 }
コード例 #3
0
 private void attach_Categories(Category entity)
 {
     this.SendPropertyChanging();
     entity.Dealer = this;
 }