/// <summary> /// Gets the display order. /// </summary> /// <returns></returns> /// <exception cref="InvalidElementStateException">In order to use " + /// "this the product must be shown on the homepage.</exception> public virtual int GetDisplayOrder() { if (!GetShowOnHomePage()) { throw new InvalidElementStateException("In order to use " + "this the product must be shown on the homepage."); } return(DisplayOrderElement.GetValue <int>()); }
/// <summary> /// Sets the display order. /// </summary> /// <param name="displayOrder">The display order.</param> /// <returns></returns> /// <exception cref="InvalidElementStateException"> /// In order to use this the product must be shown on the homepage. /// </exception> public virtual GeneralInformationComponent SetDisplayOrder(int displayOrder) { if (!GetShowOnHomePage()) { throw new InvalidElementStateException("In order to use " + "this the product must be shown on the homepage."); } DisplayOrderElement.SetValue(displayOrder); return(this); }