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
int

Returns the id to the pricelist.

GetSuperOfficeProductProvider(int)

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

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

InsertImage(int, Image, int)

Will insert an image in SuperOffice

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

InsertProducts(int, ProductInfo[])

Insert a set of products into the SuperOffice database.

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

Returns the products updated with their new ids.

RemoveImage(int)

Will remove an image from SuperOffice

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

RemovePriceList(int, bool)

Remove a pricelist and any associated products.

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

RemoveProduct(int)

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
int 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