示例#1
0
        public List <EmailServerModel> GetEmailServerList()
        {
            EmailServerDAL          _dal       = new EmailServerDAL();
            List <EmailServerModel> serverList = null;

            DataTable dt = _dal.GetSystemEmailServer(userId);

            if (dt == null)
            {
                return(null);
            }

            serverList = new List <EmailServerModel>();
            EmailServerModel entity = null;

            foreach (DataRow row in dt.Rows)
            {
                entity = new EmailServerModel();

                entity.IsActive              = (Boolean)(row["IsActive"]);
                entity.EmailPort             = (int)(row["EmailPort"]);
                entity.EnableSSL             = (Boolean)(row["EnableSSL"]);
                entity.ServerId              = (Int64)(row["ServerId"]);
                entity.ServerIP              = (string)(row["ServerIP"]);
                entity.ServerName            = (string)(row["ServerName"]);
                entity.UseDefaultCredentials = (Boolean)(row["UseDefaultCredentials"]);
                entity.UserName              = Convert.ToString(row["UserName"]);
                entity.UserPswd              = Convert.ToString((row["UserPswd"]));
                entity.Priority              = Convert.ToByte((row["Priority"]));

                serverList.Add(entity);
            }

            return(serverList);
        }
示例#2
0
 public EmailServerSearchService()
 {
     _dal    = new EmailServerDAL();
     _ddlDal = new DropDownListDAL();
 }
示例#3
0
 public EmailServerService()
 {
     _dal = new EmailServerDAL();
 }