public List <List <string> > TimerSendRecords(string userid) { var msgSendReocrd = _msgProvider.TimerSendRecords(userid).Where(a => a.OutStateID == "05" || a.OutStateID == "06"); var body = new List <List <string> >(); foreach (var item in msgSendReocrd) { body.Add(new List <string>() { item.OutState.StateName, _permissionProvider.UserInfo(item.ReceiverID).NickName, item.Msg.Subjects, item.Msg.TimerMsgs.FirstOrDefault().SetSendTime == null?"":item.Msg.TimerMsgs.FirstOrDefault().RealSendTime.Value.ToString(), item.Msg.TimerMsgs.FirstOrDefault().RealSendTime == null?"":item.Msg.TimerMsgs.FirstOrDefault().RealSendTime.Value.ToString(), item.MsgSendRecordID, item.OutStateID }); } return(body); }