Пример #1
0
        /// <summary>
        /// 手动同步异常的数据
        /// </summary>
        /// <param name="syncDay"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public void syncExceptionData(List <lifesense.Model.t_failrequestInfo> listModel, out string msg)
        {
            msg = string.Empty;
            string temp = string.Empty;

            if (listModel.Count > 0)
            {
                listModel.ForEach(failModel =>
                {
                    lifesense.Model.t_userinfo userModel       = new lifesense.Model.t_userinfo();
                    lifesense.BLL.t_userinfo userinfoBll       = new lifesense.BLL.t_userinfo();
                    List <lifesense.Model.t_userinfo> listUser = userinfoBll.GetModelList(string.Format("UserID={0}", failModel.UserID));
                    if (listUser != null && listUser.Count == 1)
                    {
                        userModel = listUser[0];
                        syncData(userModel, failModel.WriteTime.ToString("yyyy-MM-dd"));
                    }
                    else
                    {
                        temp += string.Format("不存在用户:{0}", failModel.UserID);
                    }
                });
                if (!string.IsNullOrEmpty(temp))
                {
                    msg = temp;
                }
            }
        }
Пример #2
0
        private void syncData(string syncDay)
        {
            lifesense.BLL.t_userinfo          userBll  = new lifesense.BLL.t_userinfo();
            List <lifesense.Model.t_userinfo> listUser = userBll.GetModelList("");

            listUser.ForEach(userModel =>
            {
                syncData(userModel, syncDay);
            });
        }