コード例 #1
0
 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);
     }
 }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
 private Boolean CanSaveChanges()
 {
     //Custom Equals implementation in Category class
     return(!EditedCategory.Equals(CurrentCategory));
 }