/// <summary> /// 获取新闻列表信息 /// </summary> /// <returns></returns> private Hashtable GetVercodeList(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.GetVercodeList(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["id"] = CConvert.ToString(dr["id"]); htItem["code"] = CConvert.ToString(dr["code"]); htItem["mac"] = CConvert.ToString(dr["mac"]); htItem["use_time"] = CConvert.ToString(dr["use_time"]); if (CConvert.ToString(dr["state"]) == "1") { htItem["state_name"] = "正常"; } else { htItem["state_name"] = "停用"; } htItem["state"] = CConvert.ToString(dr["state"]); htItem["bak"] = CConvert.ToString(dr["bak"]); 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); }