public static void Save(EMailRouterPop3BoxSettings document)
        {
            EMailRouterPop3BoxRow row = new EMailRouterPop3BoxRow(document.OwnerEmailBoxId);

            row.Settings = document.GetDocumentString();

            row.Update();
        }
Example #2
0
        /// <summary>
        /// Creates the internal.
        /// </summary>
        /// <param name="InternalEMailAddress">The internal E mail address.</param>
        /// <param name="Server">The server.</param>
        /// <param name="Port">The port.</param>
        /// <param name="Login">The login.</param>
        /// <param name="Password">The password.</param>
        public static int CreateInternal(string Name, string EMailAddress, string Server, int Port, string Login, string Password, Pop3SecureConnectionType SecureConnectionType)
        {
            if(!CanModify())
                throw new AccessDeniedException();

            EMailRouterPop3BoxRow newRow = new EMailRouterPop3BoxRow();

            newRow.IsInternal = true;
            newRow.Name = Name;
            newRow.InternalEMailAddress = EMailAddress;
            newRow.Server = Server;
            newRow.Port = Port;
            newRow.Login = Login;
            newRow.Pass = Password;
            newRow.UseSecureConnection = (int)SecureConnectionType;

            newRow.Update();

            return newRow.PrimaryKeyId;
        }
        /// <summary>
        /// Loads the specified incident box id.
        /// </summary>
        /// <param name="EMailRouterPop3BoxId">The incident box id.</param>
        /// <returns></returns>
        public static EMailRouterPop3BoxSettings Load(int EMailRouterPop3BoxId)
        {
            EMailRouterPop3BoxSettings retVal = new EMailRouterPop3BoxSettings(EMailRouterPop3BoxId);

            EMailRouterPop3BoxRow row = new EMailRouterPop3BoxRow(EMailRouterPop3BoxId);

            if(row.Settings!=string.Empty)
            {
                retVal.Load(row.Settings);
            }

            return retVal;
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EMailRouterPop3Box"/> class.
 /// </summary>
 /// <param name="row">The row.</param>
 private EMailRouterPop3Box(EMailRouterPop3BoxRow row)
 {
     _srcRow = row;
 }