BCE.AutoCount.Notification Namespace
Posted on July 1, 2016 | By Mohd Imran
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: | ||
Name | Type | Description |
NewNotif | int | Return the number of new notification |
UnreadNotif | int | Return the number of unread notification |
FormInbox Class
Form displaying the notification inbox.
Namespace: | BCE.AutoCount.Notification | |
Constructor: | FormInbox(BCE.Data.DBSetting dbSetting) | |
Methods: | ||
Name | Parameter | Description |
ShowInbox(BCE.Data.DBSetting dbSetting) | dbSetting: A DBSetting object | Show 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: | ||
Name | Type | Description |
CreatedTime | System.DateTime | Return or Set the message creation time |
Detail | string | Return or Set the detail text |
Header | string | Return or Set the header text |
Id | long | Return or Set the record id |
IsNew | bool | Return or Set the IsNew flag |
Recipients | System.Collections.ArrayList | Returns the array of string containing recipients |
UserName | string | Return or Set the user who create the message |
Methods: | ||
Name | Parameter | Description |
Save() | Saves the notification record. |
NotifCommand Class
Class to maintain the notification records.
Namespace: | BCE.AutoCount.Notification | |
Constructor: | NotifCommand(BCE.Data.DBSetting dbSetting) | |
Methods: | ||
Name | Parameter | Description |
Delete(long id) | id: The record id | Deletes the notification record. Returns true if the record is exists and has been deleted. |
Get(long id) | id: The record id | Gets 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: | ||
Name | Parameter | Description |
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: | ||
Name | Type | Description |
Form | System.Windows.Forms.Form | Return or Set the background form. |
Interval | int | Return or Set the interval to check the database. (in seconds) |
Methods: | ||
Name | Parameter | Description |
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.