Exemplo n.º 1
0
        public DataTable GetVendorChangeLog(TableChangeLogQuery query, out int totalCount)
        {
            try
            {
                DataTable _dt = _tclDao.GetVendorChangeLog(query, out totalCount);
                _dt.Columns.Add("kuser_name");
                _dt.Columns.Add("muser_name");
                if (_dt.Rows.Count > 0)
                {
                    foreach (DataRow item in _dt.Rows)
                    {
                        Dao.ManageUserDao _muDao = new Dao.ManageUserDao(connStr);
                        if (!string.IsNullOrEmpty(item["kuser"].ToString()) && item["kuser"].ToString() != "0")
                        {
                            item["kuser_name"] = _muDao.GetManageUser(new Model.ManageUser { user_id = Convert.ToUInt32(item["kuser"].ToString()) }).FirstOrDefault().user_username;
                        }
                        if (!string.IsNullOrEmpty(item["muser"].ToString()) && item["muser"].ToString() != "0")
                        {
                            item["muser_name"] = _muDao.GetManageUser(new Model.ManageUser { user_id = Convert.ToUInt32(item["muser"].ToString()) }).FirstOrDefault().user_username;
                        }
                    }
                }
                return _dt;
            }
            catch (Exception ex)
            {
                throw new Exception("TableChangeLogMgr-->GetVendorChangeLog-->" + ex.Message, ex);
            }

        }
Exemplo n.º 2
0
 public DataTable GetChangeLogList(ProductCommentQuery query, out int totalCount)
 {
     try
     {
         DataTable _dt = _proCommentDao.GetChangeLogList(query, out totalCount);
         _dt.Columns.Add("user_name");
         if (_dt.Rows.Count > 0)
         {
             foreach (DataRow item in _dt.Rows)
             {
                 Dao.ManageUserDao _muDao = new Dao.ManageUserDao(connStr);
                 if (!string.IsNullOrEmpty(item["create_user"].ToString()) && item["create_user"].ToString() != "0")
                 {
                     item["user_name"] = _muDao.GetManageUser(new Model.ManageUser { user_id = Convert.ToUInt32(item["create_user"].ToString()) }).FirstOrDefault().user_username;
                 }
             }
         }
         return _dt;
         //return _proCommentDao.GetChangeLogList(query, out totalCount);
     }
     catch (Exception ex)
     {
         throw new Exception("ProductCommentMgr.GetChangeLogList-->" + ex.Message, ex);
     }
 }