Example #1
0
 public ProductGroupRule(ProductGroup group) {
   this.group = group;
 }
Example #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"]);
 }
Example #3
0
    public void RemoveChild(ProductGroup child) {
      ProductGroup readedChild = this.GetChild(child);

      readedChild.Status = GeneralObjectStatus.Deleted;
      readedChild.Save();
    }
Example #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);
      }
    }
Example #5
0
    public ProductGroup CreateChild() {
      ProductGroup child = new ProductGroup();
      child.Parent = this;

      return child;
    }