public static bool CheckUniquenessInt(Int32 flag, Int32 storeID, Int32 portalID, Int32 attributeID, Int32 attributeValue) { try { bool isUnique = AspxCommonProvider.CheckUniquenessInt(flag, storeID, portalID, attributeID, attributeValue); return(isUnique); } catch (Exception e) { throw e; } }
public static bool IsUnique(Int32 storeID, Int32 portalID, Int32 itemID, Int32 attributeID, Int32 attributeType, string attributeValue) { try { /* * 1 TextField * 2 TextArea * 3 Date * 4 Boolean * 5 MultipleSelect * 6 DropDown * 7 Price * 8 File * 9 Radio * 10 RadioButtonList * 11 CheckBox * 12 CheckBoxList */ bool isUnique = false; switch (attributeType) { case 1: isUnique = AspxCommonProvider.CheckUniquenessNvarchar(1, storeID, portalID, attributeID, attributeValue); break; case 2: isUnique = AspxCommonProvider.CheckUniquenessText(1, storeID, portalID, attributeID, attributeValue); break; case 3: isUnique = AspxCommonProvider.CheckUniquenessDate(1, storeID, portalID, attributeID, DateTime.Parse(attributeValue)); break; case 4: isUnique = AspxCommonProvider.CheckUniquenessBoolean(1, storeID, portalID, attributeID, bool.Parse(attributeValue)); break; case 5: isUnique = AspxCommonProvider.CheckUniquenessInt(1, storeID, portalID, attributeID, Int32.Parse(attributeValue)); break; case 6: isUnique = AspxCommonProvider.CheckUniquenessInt(1, storeID, portalID, attributeID, Int32.Parse(attributeValue)); break; case 7: isUnique = AspxCommonProvider.CheckUniquenessDecimal(1, storeID, portalID, attributeID, decimal.Parse(attributeValue)); break; case 8: isUnique = AspxCommonProvider.CheckUniquenessFile(1, storeID, portalID, attributeID, attributeValue); break; case 9: isUnique = AspxCommonProvider.CheckUniquenessInt(1, storeID, portalID, attributeID, Int32.Parse(attributeValue)); break; case 10: isUnique = AspxCommonProvider.CheckUniquenessInt(1, storeID, portalID, attributeID, Int32.Parse(attributeValue)); break; case 11: isUnique = AspxCommonProvider.CheckUniquenessInt(1, storeID, portalID, attributeID, Int32.Parse(attributeValue)); break; case 12: isUnique = AspxCommonProvider.CheckUniquenessInt(1, storeID, portalID, attributeID, Int32.Parse(attributeValue)); break; } return(isUnique); } catch (Exception) { return(false); } }