Show / Hide Table of Contents

Interface IProductRegisterCache

SuperOffice has its own simple Product table. This table can be used by the ERP connectors as a cache for ERP data.

This interface will be implemented by SuperOffice. The implementation is passed to all connectors as an initialization parameter.

Namespace: SuperOffice.CRM
Assembly: SuperOffice.Plugins.dll
Syntax
public interface IProductRegisterCache

Methods

CreatePriceList(PriceListInfo)

Creates a pricelist in the SuperOffice database.

Declaration
int CreatePriceList(PriceListInfo pricelist)
Parameters
Type Name Description
PriceListInfo pricelist
Returns
Type Description
Int32

Returns the id to the pricelist.

GetSuperOfficeProductProvider(Int32)

Here you can get the data you have inserted into the SuperOffice tables.

Declaration
IQuoteConnector GetSuperOfficeProductProvider(int quoteConnectionId)
Parameters
Type Name Description
Int32 quoteConnectionId
Returns
Type Description
IQuoteConnector

InsertImage(Int32, Image, Int32)

Will insert an image in SuperOffice

Declaration
int InsertImage(int productId, Image img, int rank)
Parameters
Type Name Description
Int32 productId
Image img
Int32 rank
Returns
Type Description
Int32

InsertProducts(Int32, ProductInfo[])

Insert a set of products into the SuperOffice database.

Declaration
ProductInfo[] InsertProducts(int pricelistId, ProductInfo[] products)
Parameters
Type Name Description
Int32 pricelistId
ProductInfo[] products
Returns
Type Description
ProductInfo[]

Returns the products updated with their new ids.

RemoveImage(Int32)

Will remove an image from SuperOffice

Declaration
PluginResponseInfo RemoveImage(int imageId)
Parameters
Type Name Description
Int32 imageId
Returns
Type Description
PluginResponseInfo

RemovePriceList(Int32, Boolean)

Remove a pricelist and any associated products.

Declaration
PluginResponseInfo RemovePriceList(int pricelistId, bool alsoRemoveRelatedProducts)
Parameters
Type Name Description
Int32 pricelistId
Boolean alsoRemoveRelatedProducts
Returns
Type Description
PluginResponseInfo

RemoveProduct(Int32)

Will remove a product if it is in a pricelist related to the connection, and the pricelist is an ERP copy.

Declaration
PluginResponseInfo RemoveProduct(int productId)
Parameters
Type Name Description
Int32 productId
Returns
Type Description
PluginResponseInfo

UpdateProduct(ProductInfo)

Update a product in the cache with new information

Declaration
PluginResponseInfo UpdateProduct(ProductInfo newProd)
Parameters
Type Name Description
ProductInfo newProd
Returns
Type Description
PluginResponseInfo

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top