Esempio n. 1
0
 public ProductGroupRule(ProductGroup group) {
   this.group = group;
 }
Esempio n. 2
0
 protected override void OnLoadObjectData(DataRow row) {
   this.group = ProductGroup.Parse((int) row["ProductGroupId"]);
   this.productTerm = ProductClass.Parse((int) row["ProductTypeId"]);
   this.productPosition = ProductClass.Parse((int) row["ProductPositionId"]);
   this.postedBy = Contact.Parse((int) row["PostedById"]);
   this.status = (GeneralObjectStatus) Convert.ToChar(row["ProductGroupRuleStatus"]);
 }
Esempio n. 3
0
    public void RemoveChild(ProductGroup child) {
      ProductGroup readedChild = this.GetChild(child);

      readedChild.Status = GeneralObjectStatus.Deleted;
      readedChild.Save();
    }
Esempio n. 4
0
    public ProductGroup GetChild(ProductGroup child) {
      ProductGroup readedChild = this.GetChilds().Find((x) => x.Equals(child));

      if (readedChild != null) {
        return readedChild;
      } else {
        throw new ProductManagementException(ProductManagementException.Msg.InvalidChildCategory, child.Id, this.Id);
      }
    }
Esempio n. 5
0
    public ProductGroup CreateChild() {
      ProductGroup child = new ProductGroup();
      child.Parent = this;

      return child;
    }