예제 #1
0
        public static void Save(EMailRouterPop3BoxSettings document)
        {
            EMailRouterPop3BoxRow row = new EMailRouterPop3BoxRow(document.OwnerEmailBoxId);

            row.Settings = document.GetDocumentString();

            row.Update();
        }
예제 #2
0
        /// <summary>
        /// Deletes the specified E mail router POP3 box id.
        /// </summary>
        /// <param name="EMailRouterPop3BoxId">The E mail router POP3 box id.</param>
        public static void Delete(int EMailRouterPop3BoxId)
        {
            if (!CanModify())
            {
                throw new AccessDeniedException();
            }

            EMailRouterPop3BoxRow.Delete(EMailRouterPop3BoxId);
        }
예제 #3
0
        /// <summary>
        /// Lists the internal.
        /// </summary>
        /// <returns></returns>
        public static EMailRouterPop3Box ListInternal()
        {
            EMailRouterPop3BoxRow[] rows = EMailRouterPop3BoxRow.List(true);

            if (rows.Length == 0)
            {
                return(null);
            }

            return(new EMailRouterPop3Box(rows[0]));
        }
예제 #4
0
        /// <summary>
        /// Lists the external.
        /// </summary>
        /// <returns></returns>
        public static EMailRouterPop3Box[] ListExternal()
        {
            ArrayList retVal = new ArrayList();

            foreach (EMailRouterPop3BoxRow row in EMailRouterPop3BoxRow.List(false))
            {
                retVal.Add(new EMailRouterPop3Box(row));
            }

            return((EMailRouterPop3Box[])retVal.ToArray(typeof(EMailRouterPop3Box)));
        }
예제 #5
0
        /// <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);
        }
예제 #6
0
        /// <summary>
        /// Creates the external.
        /// </summary>
        /// <param name="Server">The server.</param>
        /// <param name="Port">The port.</param>
        /// <param name="Login">The login.</param>
        /// <param name="Password">The password.</param>
        /// <returns></returns>
        public static int CreateExternal(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           = false;
            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);
        }
예제 #7
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;
 }