clsImportClassNotificationText Class |
Namespace: MARIInterface
The clsImportClassNotificationText type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportClassNotificationText | Initializes a new instance of the clsImportClassNotificationText class |
| Name | Description | |
|---|---|---|
| ChangeDate | ChangeDate | |
| ChangeUser | ChangeUser | |
| ClassID | ClassID Dimension of the class, where the notification is used to | |
| CreateDate | CreateDate (Automatically handled) | |
| CreateUser | CreateUser. Automatically login user to MARIInterface | |
| DefaultLanguage | DefaultLanguage. When the customer does not have a language, or the language of the customer is not in clsImportClassNotificationTextLang this language will be used.
List of languages are managed by clsImportSysCustomerLanguages. | |
| Description | Description for the internal user in the notification event selection combo box | |
| EMailFormat | Handling of the text creation. | |
| ICSNotifcationTextID | Defines Text for the iCal Attachment by linking another clsImportClassNotificationText for the text in the iCal Attachment. | |
| ImageHandling | ImageHandling of the embedded images in the html source. (Only for EMailFormat other than 0.) | |
| NotifcationTextID | Unique key for the notification text definition. Can be empty for the import. | |
| NotificationTextLanguages |
Collection to process the text by language to the notification text.
Add at least on Language definition of the text is required. This should be the DefaultLanguage defined here at the header | |
| UpdateStamp | UpdateStamp |
| Name | Description | |
|---|---|---|
| bReadFromDB |
Load a specific Notification Text from the database. Includes the subtable MPSysClassNotificationTextLang
(Overrides clsImportBasebReadFromDB(MPInterface, String).) | |
| bSaveRSToMDB |
Writes content to MS Access table
(Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) | |
| sKeyMatchcode | (Overrides clsImportBasesKeyMatchcode.) |
private int CreateNotificationText() { string sErrordetails; int lLangEN = 100004; //select CustomerLanguageID FROM MPSysKundenSprachen WHERE LanguageKey='en-US'; int lLangDE = 100001;//select CustomerLanguageID FROM MPSysKundenSprachen WHERE LanguageKey='en-US'; //Create a notification Text for project master clsImportClassNotificationText oNotivText = new clsImportClassNotificationText(); oNotivText.ClassID = clsImportBase.eCoreDataClassID.Projects; // oNotivText.Description = "Project Creation Notification"; oNotivText.DefaultLanguage = lLangEN; oNotivText.EMailFormat = clsImportClassNotificationText.eEMailRenderMethod.PlainText; oNotivText.ImageHandling = clsImportClassNotificationText.eImageHandling.DownloadAndInline; //English Text clsImportClassNotificationTextLang oEng = new clsImportClassNotificationTextLang(); oEng.LanguageCode = lLangEN; oEng.Subject = "New project #24# #56# created"; oEng.Message = "The project #24# has been created. Have fun"; oNotivText.NotificationTextLanguages.Add(oEng); //English Text clsImportClassNotificationTextLang oGerman = new clsImportClassNotificationTextLang(); oGerman.LanguageCode = lLangDE; oGerman.Subject = "Projekt #24# #56# wurde angelegt"; oGerman.Message = "<!DOCTYPE HTML>Das Projekt #24# <font color=\"yellow\">angelegt</font>!"; oNotivText.NotificationTextLanguages.Add(oGerman); if (oMPInterface.bImportClassNotificationText(oNotivText, clsImportBase.eImportMode.ValidateAndImport)) { //Link the new text to the project creation event clsImportClassNotification oEventLink = new clsImportClassNotification(); oEventLink.ClassID = clsImportBase.eCoreDataClassID.Projects; oEventLink.EventID = 40001; // special id for Project Creation oEventLink.Audience = 100; // special code for Project Manager oEventLink.Active = true; oEventLink.TextID = oNotivText.NotifcationTextID; oEventLink.MethodID = clsImportClassNotification.eMethodTypes.EMail_Reminder; if (oMPInterface.bImportClassNotificationEventLink(oEventLink, clsImportBase.eImportMode.ValidateAndImport)) { //Done } else { sErrordetails = oMPInterface.oErrors.PrintErrors(true); Assert.False(true, sErrordetails); return 0; } return oNotivText.NotifcationTextID; } else { sErrordetails = oMPInterface.oErrors.PrintErrors(true); Assert.False(true, sErrordetails); return 0; } }