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); }
public EmailServerSearchService() { _dal = new EmailServerDAL(); _ddlDal = new DropDownListDAL(); }
public EmailServerService() { _dal = new EmailServerDAL(); }