Exemple #1
0
        /// <summary>
        /// 获取新闻列表信息
        /// </summary>
        /// <returns></returns>
        private Hashtable GetUpdateLog(HttpContext context)
        {
            Hashtable htRet   = new Hashtable();
            Hashtable rowData = new Hashtable();

            try
            {
                FastReadServer.admin.UserInfo user = (FastReadServer.admin.UserInfo)context.Session[FastReadServer.admin.CConst.CSession.C_UserInfoKey];
                if (user == null || user.UserId == "")
                {
                    htRet["msg"] = "用户信息超时,请重新登录!";
                    htRet["ok"]  = false;
                    return(htRet);
                }

                string sVerCode = CConvert.ToString(context.Request["vercode"]);
                int    iLimit   = CConvert.ToInt32(context.Request["limit"]);
                int    iPage    = CConvert.ToInt32(context.Request["page"]);

                int     allRows = 0;
                DBIndex dbm     = new DBIndex();
                DataSet ds      = dbm.GetVercodeUpdateLog(sVerCode, iPage, iLimit, ref allRows);
                if (ds.Tables[0].Rows.Count == 0)
                {
                    htRet["ok"]  = true;
                    htRet["cnt"] = 0;
                    htRet["msg"] = "无数据!";
                }
                else
                {
                    ArrayList lst = new ArrayList();
                    foreach (DataRow dr in ds.Tables[0].Rows)
                    {
                        Hashtable htItem = new Hashtable();

                        htItem["code"]      = CConvert.ToString(dr["code"]);
                        htItem["last_time"] = CConvert.ToString(dr["last_time"]);
                        lst.Add(htItem);
                    }

                    htRet["ok"]      = true;
                    htRet["lst"]     = lst;
                    htRet["cnt"]     = allRows;
                    htRet["curpage"] = iPage;
                }
            }
            catch (Exception ex)
            {
                htRet["err"] = true;
                htRet["msg"] = "获取轮播信息失败!" + ex.Message;
            }
            return(htRet);
        }