Search website

BCE.AutoCount.Notification Namespace

Introduction

This post will discuss the BCE.AutoCount.Notification namespace available in AutoCount Accounting. It will cover the methods and properties of the classes used in creating and maintaining the Notification records and display.

Classes

CallbackEventArgs Class

Provides event data for the Callback event.

Namespace:BCE.AutoCount.Notification
Constructor:CallbackEvent(int unreadNotif, int newNotif)
Properties:
NameTypeDescription
NewNotifintReturn the number of new notification
UnreadNotifintReturn the number of unread notification

FormInbox Class

Form displaying the notification inbox.

Namespace:BCE.AutoCount.Notification
Constructor:FormInbox(BCE.Data.DBSetting dbSetting)
Methods:
NameParameterDescription
ShowInbox(BCE.Data.DBSetting dbSetting)dbSetting: A DBSetting objectShow the notification inbox.

FormNotif Class

Displays a notification in the AutoCount Accounting window.

Namespace:BCE.AutoCount.Notification
Constructor:FormNotif(long id, System.Data.DataView notifList, BCE.Data.DBSetting dbSetting)

FormNotifCmd Class

The notification command form.

Namespace:BCE.AutoCount.Notification
Constructor:FormNotifCmd(BCE.Data.DBSetting dbSetting)

FormNotifEntry Class

Form for entering data for the notification.

Namespace:BCE.AutoCount.Notification
Constructor:FormNotifEntry(BCE.Data.DBSetting dbSetting, BCE.AutoCount.Notification.Notif notif)

FormPreviewHtml Class

Form to preview the created html for the notification.

Namespace:BCE.AutoCount.Notification
Constructor:FormPreviewHtml(string html, BCE.Data.DBSetting dbSetting)

FormRecipients Class

Form to set the recipients of the notification.

Namespace:BCE.AutoCount.Notification
Constructor:FormRecipients(BCE.Data.DBSetting dbSetting, System.Collections.ArrayList recipients)

Notif Class

Class that holds the notification record.

Namespace:BCE.AutoCount.Notification
Constructor:Notif(BCE.Data.DBSetting dbSetting)
Properties:
NameTypeDescription
CreatedTimeSystem.DateTimeReturn or Set the message creation time
DetailstringReturn or Set the detail text
HeaderstringReturn or Set the header text
IdlongReturn or Set the record id
IsNewboolReturn or Set the IsNew flag
RecipientsSystem.Collections.ArrayListReturns the array of string containing recipients
UserNamestringReturn or Set the user who create the message
Methods:
NameParameterDescription
Save()Saves the notification record.

NotifCommand Class

Class to maintain the notification records.

Namespace:BCE.AutoCount.Notification
Constructor:NotifCommand(BCE.Data.DBSetting dbSetting)
Methods:
NameParameterDescription
Delete(long id)id: The record idDeletes the notification record. Returns true if the record is exists and has been deleted.
Get(long id)id: The record idGets the notification record. Returns the Notif object or null if record not found.
New()Create a new notification record. Returns the Notif object.

NotifHelper Class

Helper class to use with notifications

Namespace:BCE.AutoCount.Notification
Methods:
NameParameterDescription
AddNewNotif(BCE.Data.DBSetting dbSetting, string header, string detail, string[] allowUsers)dbSetting: A DBSetting object
header: Header text
detail: Detail text
allowUsers: Allowed users
Adds a new notification.
BuildHyperlink(string displayText, System.Type type, string methodName, object[] parameters)displayText: Display text
type: Type that contains the method
methodName: Method name
parameters: Parameters (The items inside must be serializable)
Builds a hyperlink that calls a method in assembly. Returns a hyperlink html code.

NotifMonitor Class

Class with events that monitor and display any new notifications to the user.

Namespace:BCE.AutoCount.Notification
Constructor:NotifMonitor(BCE.Data.DBSetting dbSetting)
Properties:
NameTypeDescription
FormSystem.Windows.Forms.FormReturn or Set the background form.
IntervalintReturn or Set the interval to check the database. (in seconds)
Methods:
NameParameterDescription
Start()Start the monitoring
Stop()Stop the monitoring

Delegates

CallbackEventHandler Delegate

Represents the method that will handle the Callback event. This is use in the NotifMonitor class Callback event.