Class ProductBackInStockNotification
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
Represents information about an product back in stock notification.
public class ProductBackInStockNotification : DbObject
- Inheritance
-
ProductBackInStockNotification
- Inherited Members
Constructors
ProductBackInStockNotification()
Initializes a new instance of the Notification class.
public ProductBackInStockNotification()
ProductBackInStockNotification(IDataReader)
Initializes a new instance of the Notification class from data reader.
public ProductBackInStockNotification(IDataReader dataReader)
Parameters
dataReader
IDataReader- The data reader.
Properties
ContextAreaId
Gets or sets the context area Id
public int ContextAreaId { get; set; }
Property Value
ContextLanguageId
Gets or sets the context language Id
public string ContextLanguageId { get; set; }
Property Value
Created
Gets the notification create time
public DateTime Created { get; set; }
Property Value
Gets or sets the user email
public string Email { get; set; }
Property Value
LanguageId
Gets or sets the product language Id
public string LanguageId { get; set; }
Property Value
ProductId
Gets or sets the product Id
public string ProductId { get; set; }
Property Value
SentTime
Gets the notification sent time
public DateTime? SentTime { get; set; }
Property Value
UnitId
Gets or sets the product unit Id
public string UnitId { get; set; }
Property Value
UserId
Gets the user Id
public int UserId { get; set; }
Property Value
VariantId
Gets or sets the product variant Id
public string VariantId { get; set; }
Property Value
Methods
BackInStockNotificationExists(Product, string)
Checks whether notification exists by product and unit id.
public static bool BackInStockNotificationExists(Product product, string unitId)
Parameters
Returns
DeleteById(int)
Deletes notification by id..
public static void DeleteById(int id)
Parameters
id
int- The notification id.
DeleteByProduct(string, string, string)
Deletes notifications by a product.
public static void DeleteByProduct(string productId, string variantId, string languageId)
Parameters
productId
string- The product id.
variantId
string- The product variant id.
languageId
string- The product language id.
Fill(IDataReader)
Fills the Notification properties from the specified data reader.
public override void Fill(IDataReader reader)
Parameters
reader
IDataReader- The data reader.
FillRow(DataRow)
Fills the given System.Data.DataRow object with property values of the current object.
protected override void FillRow(DataRow row)
Parameters
row
DataRow- An instance of the System.Data.DataRow object to write data to.
GetNotificationById(int)
Gets notification by the id.
public static ProductBackInStockNotification GetNotificationById(int notificationId)
Parameters
notificationId
int- The notification id.
Returns
GetNotificationsToSent(int)
Gets notification ready to sent.
public static IEnumerable<ProductBackInStockNotification> GetNotificationsToSent(int areaId)
Parameters
areaId
int- The area id.
Returns
RegisterNotification(string, Product, string)
Registers a new notification for the product and unit id with given email.
public static void RegisterNotification(string email, Product product, string unitId)
Parameters
SetMessageSent(IEnumerable<int>)
Updates notifications with given ids with message sent status.
public static void SetMessageSent(IEnumerable<int> notificationIds)
Parameters
notificationIds
IEnumerable<int>- The notifications ids.
UnsubscribeNotifications(string)
Unsubscribes the email from notification.
public static void UnsubscribeNotifications(string email)
Parameters
email
string