fchrEmployees 是前端传过来多个员工编号拼接出来的字符串,由于是前端传的所以我们没办法保证是我们想要的字符串,我们可以进行下面的代码处理

fchrEmployees = fchrEmployees.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "");
fchrEmployees.Trim();

 

这个是我们想要的字符串

string[] strs = fchrEmployees.Split(',');

 posted on 2018-11-22 16:19  Children_邱振  阅读(389)  评论(2编辑  收藏  举报