private DBCheckoutAttributeValueLocalized GetCheckoutAttributeValueLocalizedFromReader(IDataReader dataReader)
        {
            var item = new DBCheckoutAttributeValueLocalized();

            item.CheckoutAttributeValueLocalizedId = NopSqlDataHelper.GetInt(dataReader, "CheckoutAttributeValueLocalizedID");
            item.CheckoutAttributeValueId          = NopSqlDataHelper.GetInt(dataReader, "CheckoutAttributeValueID");
            item.LanguageId = NopSqlDataHelper.GetInt(dataReader, "LanguageID");
            item.Name       = NopSqlDataHelper.GetString(dataReader, "Name");
            return(item);
        }
        /// <summary>
        /// Gets localized checkout attribute value by checkout attribute value id and language id
        /// </summary>
        /// <param name="checkoutAttributeValueId">Checkout attribute value identifier</param>
        /// <param name="languageId">Language identifier</param>
        /// <returns>Localized checkout attribute value</returns>
        public override DBCheckoutAttributeValueLocalized GetCheckoutAttributeValueLocalizedByCheckoutAttributeValueIdAndLanguageId(int checkoutAttributeValueId, int languageId)
        {
            DBCheckoutAttributeValueLocalized item = null;
            Database  db        = NopSqlDataHelper.CreateConnection(_sqlConnectionString);
            DbCommand dbCommand = db.GetStoredProcCommand("Nop_CheckoutAttributeValueLocalizedLoadByCheckoutAttributeValueIDAndLanguageID");

            db.AddInParameter(dbCommand, "CheckoutAttributeValueID", DbType.Int32, checkoutAttributeValueId);
            db.AddInParameter(dbCommand, "LanguageID", DbType.Int32, languageId);
            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
                if (dataReader.Read())
                {
                    item = GetCheckoutAttributeValueLocalizedFromReader(dataReader);
                }
            }
            return(item);
        }
        /// <summary>
        /// Update a localized checkout attribute value
        /// </summary>
        /// <param name="checkoutAttributeValueLocalizedId">Localized checkout attribute value identifier</param>
        /// <param name="checkoutAttributeValueId">Checkout attribute value identifier</param>
        /// <param name="languageId">Language identifier</param>
        /// <param name="name">Name text</param>
        /// <returns>Localized checkout attribute value</returns>
        public override DBCheckoutAttributeValueLocalized UpdateCheckoutAttributeValueLocalized(int checkoutAttributeValueLocalizedId,
                                                                                                int checkoutAttributeValueId, int languageId, string name)
        {
            DBCheckoutAttributeValueLocalized item = null;
            Database  db        = NopSqlDataHelper.CreateConnection(_sqlConnectionString);
            DbCommand dbCommand = db.GetStoredProcCommand("Nop_CheckoutAttributeValueLocalizedUpdate");

            db.AddInParameter(dbCommand, "CheckoutAttributeValueLocalizedID", DbType.Int32, checkoutAttributeValueLocalizedId);
            db.AddInParameter(dbCommand, "CheckoutAttributeValueID", DbType.Int32, checkoutAttributeValueId);
            db.AddInParameter(dbCommand, "LanguageID", DbType.Int32, languageId);
            db.AddInParameter(dbCommand, "Name", DbType.String, name);
            if (db.ExecuteNonQuery(dbCommand) > 0)
            {
                item = GetCheckoutAttributeValueLocalizedById(checkoutAttributeValueLocalizedId);
            }

            return(item);
        }