protected void editOptionCategory_OnBeforeSave(object sender, EventArgs e) { if (SelectedCategoryType == OptionCategoryTypeEnum.Text) { // CategoryDefaultRecord column is not used for text category EditedCategory.SetValue("CategoryDefaultRecord", null); } else { // Delete default text length validation if option category type is not text EditedCategory.SetValue("CategoryTextMinLength", null); EditedCategory.SetValue("CategoryTextMaxLength", null); } }
protected void editOptionCategory_OnBeforeSave(object sender, EventArgs e) { if (SelectedCategoryType == OptionCategoryTypeEnum.Text) { // Check the license if (!SKUInfoProvider.LicenseVersionCheck(RequestContext.CurrentDomain, FeatureEnum.Ecommerce, ObjectActionEnum.Insert)) { LicenseHelper.GetAllAvailableKeys(FeatureEnum.Ecommerce); } // CategoryDefaultRecord column is not used for text category EditedCategory.SetValue("CategoryDefaultRecord", null); } else { // Delete default text length validation if option category type is not text EditedCategory.SetValue("CategoryTextMinLength", null); EditedCategory.SetValue("CategoryTextMaxLength", null); } }
private Boolean CanSaveChanges() { //Custom Equals implementation in Category class return(!EditedCategory.Equals(CurrentCategory)); }