EPolWS
EPolES
Home
Account
ep_test.txt
SerializableBase
DbConnectionBase
EPolESForm
DbSTable
EmailFactory.cs
epmain
EPolES
DbVariableView.cs
ProfileView
EPolLOcal Main
Page Main Example
EPolWS EPolWS.asmx
EPolWS EPolWS.cs
CommandManager
CommandFactory
CommandFactoryBase
OrganisationView
EPolConsole Main
DbEPBase.cs
DbRecordArray
DbTable

Enter subhead content here

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Diagnostics; using EXDb97; //###8 namespace EPol { public partial class EPolES : Form { public EPolES() { InitializeComponent(); } private void EPolES_Load(object sender, EventArgs e) { } private void profileDbToolStripMenuItem_Click(object sender, EventArgs e) { CDbConnectionManagement.CreateDatabase("EPOL_PROD4"); CProfileTable oProfileTable = new CProfileTable("EPOL_PROD4"); Debug.WriteLine("oProfileTable = " + oProfileTable.ToString()); int dParentProfile = oProfileTable.dAddProfileFromEmail("profile@yahoo.co.uk", CCommandFactoryBase.ENGLISH); Trace.WriteLine("dAddProfile = " + dParentProfile); int dAvatar1 = oProfileTable.dAddAvatar("Avatar1", dParentProfile, 0, CCommandFactoryBase.ENGLISH); Trace.WriteLine("bAddAvatar= " + dAvatar1); Trace.WriteLine("bIsUserExist Profile Name = " + oProfileTable.bIsUserExist("Profile1")); Trace.WriteLine("bIsUserExist Test avatar = " + oProfileTable.bIsUserExist("Avatar1")); int dAvatar2 = oProfileTable.dAddAvatar("Avatar2", dParentProfile, 0, CCommandFactoryBase.FRENCH); int dAvatar1_2 = oProfileTable.dAddAvatar("Avatar1_2", dParentProfile, dAvatar2, CCommandFactoryBase.FRENCH); Trace.WriteLine("bIsUserExist dAvatar1_2 = " + dAvatar1_2); int dAvatar2_2 = oProfileTable.dAddAvatar("Avatar2_2", dParentProfile, dAvatar2, CCommandFactoryBase.FRENCH); int dAvatar3_2_2 = oProfileTable.dAddAvatar("Avatar3_2_2", dParentProfile, dAvatar2_2, CCommandFactoryBase.FRENCH); int dAvatar1_2_2 = oProfileTable.dAddAvatar("Avatar1_2_2", dParentProfile, dAvatar2_2, CCommandFactoryBase.FRENCH); bool bRet = oProfileTable.bUpdateAttribute(dParentProfile, dAvatar1, "Email", "myemail@electronicdemocracy.co.uk"); Trace.WriteLine("bUpdateAttribute = " + bRet); string myEmail = oProfileTable.sGetAttribute(dParentProfile, dAvatar1, "Email"); Trace.WriteLine("myEmail = " + myEmail); } private void eProfTestToolStripMenuItem_Click(object sender, EventArgs e) { CReceivedEmail oRecievedEmail = new CReceivedEmail("recieved@yahoo.co.uk", DateTime.Now); oRecievedEmail.vAddRecipient("sent@yahoo.co.uk"); oRecievedEmail.vAddSubject("create avatar achille -language:eng"); oRecievedEmail.vAddText("create avatar avatar1_of_achille -parent:achille"); oRecievedEmail.vAddText("create avatar avatar1_of_1 -parent:avatar1_of_achille"); oRecievedEmail.vAddText("create avatar avatar2_of_1 -parent:avatar1_of_achille"); oRecievedEmail.vAddText("create avatar avatar3_of_1_1 -parent:avatar1_of_1 -language:fr"); oRecievedEmail.vAddText("create avatar avatar4_of_1_1 -parent:avatar1_of_1 -language:fr"); oRecievedEmail.vAddText("list avatar -language"); Debug.WriteLine("oRecievedEmail.csDump() = " + oRecievedEmail.csDump()); CStatusEmail oStatusEmail; int dStatus = oRecievedEmail.dExecute(out oStatusEmail); Debug.WriteLine("oStatusEmail dStatus = " + dStatus + " " + oStatusEmail.csDump()); } private void avatarCreateEmailToolStripMenuItem_Click(object sender, EventArgs e) { CReceivedEmail oRecievedEmail = new CReceivedEmail("recieved@yahoo.co.uk", DateTime.Now); oRecievedEmail.vAddRecipient("sent@yahoo.co.uk"); oRecievedEmail.vAddSubject("list avatar -language"); Debug.WriteLine(oRecievedEmail.csDump()); CStatusEmail oStatusEmail; int dStatus = oRecievedEmail.dExecute(out oStatusEmail); Debug.WriteLine("dStatus = " + dStatus + " " + oStatusEmail.csDump()); } private void updateAvatarToolStripMenuItem_Click(object sender, EventArgs e) { CReceivedEmail oRecievedEmail = new CReceivedEmail("recieved@yahoo.co.uk", DateTime.Now); oRecievedEmail.vAddRecipient("sent@yahoo.co.uk"); oRecievedEmail.vAddSubject("update avatar avatar3_of_1_1 -language:eng -name:new3_of_1_1"); oRecievedEmail.vAddText("list avatar -language"); Debug.WriteLine(oRecievedEmail.csDump()); CStatusEmail oStatusEmail; int dStatus = oRecievedEmail.dExecute(out oStatusEmail); Debug.WriteLine("dStatus = " + dStatus + " " + oStatusEmail.csDump()); } private void deleteAvatarToolStripMenuItem_Click(object sender, EventArgs e) { CReceivedEmail oRecievedEmail = new CReceivedEmail("recieved@yahoo.co.uk", DateTime.Now); oRecievedEmail.vAddRecipient("sent@yahoo.co.uk"); oRecievedEmail.vAddSubject("list avatar -language"); // oRecievedEmail.vAddText("delete avatar new3_of_1_1"); oRecievedEmail.vAddText("delete avatar avatar4_of_1_1"); oRecievedEmail.vAddText("delete avatar achille"); oRecievedEmail.vAddText("list avatar"); Debug.WriteLine(oRecievedEmail.csDump()); CStatusEmail oStatusEmail; int dStatus = oRecievedEmail.dExecute(out oStatusEmail); Debug.WriteLine("dStatus = " + dStatus + " " + oStatusEmail.csDump()); } } }

Enter supporting content here