Ejemplo n.º 1
0
        private SEC012P001DTO GetAll(SEC012P001DTO dto)
        {
            var strList = new string[] { "FTP_SERVER", "FTP_PORT", "FTP_FOLDER", "FTP_USER_NAME", "FTP_PASSWORD" };

            dto.Models = _DBManger.VSMS_CONFIG_FTP.Where(m => strList.Contains(m.NAME))
                         .Select(m => new SEC012P001Model
            {
                NAME      = m.NAME,
                STR_VALUE = m.STR_VALUE
            }).ToList();

            foreach (var item in dto.Models)
            {
                if (item.NAME == "FTP_SERVER")
                {
                    dto.Model.FTP_SERVER = item.STR_VALUE;
                }
                else if (item.NAME == "FTP_PORT")
                {
                    dto.Model.FTP_PRT = item.STR_VALUE;
                }
                else if (item.NAME == "FTP_FOLDER")
                {
                    dto.Model.FTP_FOLDER = item.STR_VALUE;
                }
                else if (item.NAME == "FTP_USER_NAME")
                {
                    dto.Model.USER_NAME = item.STR_VALUE;
                }
                else if (item.NAME == "FTP_PASSWORD")
                {
                    dto.Model.PASSWORD = item.STR_VALUE;
                }
            }

            return(dto);
        }
Ejemplo n.º 2
0
 public SEC012P001DA()
 {
     DTO = new SEC012P001DTO();
 }