Example #1
0
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        protected string GetList()
        {
            ChangeHope.WebPage.Table table = new ChangeHope.WebPage.Table();
            // 得到所有记录
            string strWhere = "1=1";

            if (q.Text.Trim() != string.Empty)
            {
                strWhere += " and isnull(Keyword,'') + isnull(EventDescription,'') like '%" + q.Text.Trim().Replace("'", "") + "%' ";
            }
            if (t.Text.Trim() != string.Empty)
            {
                strWhere += " and convert(char(10),OperateTime,120)='" + t.Text.Trim().Replace("'", "") + "' ";
            }
            ChangeHope.DataBase.DataByPage dataPage = new ChangeHope.DataBase.DataByPage();
            dataPage.Sql = "[select] * [from] yxs_SysLog  [where] " + strWhere + " [order by] id desc";
            dataPage.GetRecordSetByPage();
            //第一步先添加表头
            table.AddHeadCol("5", "<input type=\"checkbox\" id=\"chkAll\" onclick=\"CheckAll(this.form)\" alt=\"全选/取消\" title=\"全选/取消\" />");
            table.AddHeadCol("70", "关键词");
            table.AddHeadCol("120", "系统模块");
            table.AddHeadCol("", "事件描述");
            table.AddHeadCol("45", "用户ID");
            table.AddHeadCol("", "来源");
            table.AddHeadCol("115", "时间");
            //table.AddHeadCol("", "操作");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                while (dataPage.DataReader.Read())
                {
                    table.AddCol("<input ID=\"cBox\" type=\"checkbox\" name=\"chk\" value=\"" + dataPage.DataReader["ID"].ToString() + "\" />");
                    table.AddCol(dataPage.DataReader["Keyword"].ToString());
                    table.AddCol(dataPage.DataReader["SubModule"].ToString());
                    table.AddCol(dataPage.DataReader["EventDescription"].ToString());
                    string UID     = dataPage.DataReader["UID"].ToString();
                    string AdminID = dataPage.DataReader["AdminID"].ToString();
                    table.AddCol(string.IsNullOrEmpty(UID) ? (string.IsNullOrEmpty(AdminID) ? "" : "" + new SOSOshop.BLL.Db().ExecuteScalar("select name from yxs_administrators where adminid=" + AdminID)) : "" + new SOSOshop.BLL.Db().ExecuteScalar("select isnull(TrueName,IncName) from yxs_memberinfo where UID=" + UID));
                    table.AddCol(dataPage.DataReader["Source"].ToString());
                    table.AddCol(dataPage.DataReader["OperateTime"].ToString());
                    //table.AddCol("");
                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;

            dataPage.Dispose();
            dataPage = null;
            return(view);
        }
Example #2
0
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        protected string GetList()
        {
            ChangeHope.WebPage.Table table                 = new ChangeHope.WebPage.Table();
            YXShop.BLL.Accessories.Hailhellowlink bll      = new YXShop.BLL.Accessories.Hailhellowlink();
            ChangeHope.DataBase.DataByPage        dataPage = bll.GetList();
            //第一步先添加表头
            table.AddHeadCol("", "序号");
            table.AddHeadCol("", "会员名称");
            table.AddHeadCol("", "优先级");
            table.AddHeadCol("", "点击数");
            table.AddHeadCol("", "会员类型");
            table.AddHeadCol("", "审核状态");
            table.AddHeadCol("", "操作");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                int count = 0;
                while (dataPage.DataReader.Read())
                {
                    count++;
                    string No = (15 * (curpage - 1) + count).ToString();
                    table.AddCol(No);
                    table.AddCol(string.Format("<a href='?id={0}'>{1}</a>", dataPage.DataReader["id"].ToString(), dataPage.DataReader["sitename"].ToString()));
                    table.AddCol(string.Format("<input id='leavel{0}' value='{1}' size='5' onblur='SetLeavel({0})'/>", dataPage.DataReader["id"].ToString(), dataPage.DataReader["sitelevel"].ToString()));
                    table.AddCol(dataPage.DataReader["siteclickcount"].ToString());
                    table.AddCol(dataPage.DataReader["putouttyid"].ToString() == "0" ? "管理员" : "会员");
                    table.AddCol(string.Format("<img src='../images/{0}.gif' alt='审核与否'/>", dataPage.DataReader["sitestate"].ToString()));
                    table.AddCol(string.Format("<a href=hailhellowlink_edit.aspx?id={0}>编辑</a> <a href='javascript:void(0)' onclick='Del({0})'>删除</a>", dataPage.DataReader["id"].ToString()));
                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;

            dataPage.Dispose();
            dataPage = null;
            return(view);
        }
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        protected string GetList()
        {
            SOSOshop.BLL.SysParameter           sp       = new SOSOshop.BLL.SysParameter();
            ChangeHope.WebPage.Table            table    = new ChangeHope.WebPage.Table();
            YXShop.BLL.Accessories.Top_Searches data     = new YXShop.BLL.Accessories.Top_Searches();
            ChangeHope.DataBase.DataByPage      dataPage = data.GetList();
            //第一步先添加表头
            table.AddHeadCol("10%", "序号");
            table.AddHeadCol("40%", "关键词");
            table.AddHeadCol("15%", "排序");
            table.AddHeadCol("20%", "状态");
            table.AddHeadCol("25%", "操作");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                int count = 0;
                while (dataPage.DataReader.Read())
                {
                    count++;
                    string No = (15 * (curpage - 1) + count).ToString();
                    table.AddCol("No." + No);
                    table.AddCol("<a href=\"" + dataPage.DataReader["linkad"].ToString() + "\">" + dataPage.DataReader["name"].ToString() + "</a>");
                    table.AddCol(string.Format("<input id='sort{0}' value='{1}' size='5' onblur='Sort({0},{1})'/>", dataPage.DataReader["id"].ToString(), dataPage.DataReader["sort"].ToString()));
                    table.AddCol(string.Format("<img src='../images/{0}.gif'/>", dataPage.DataReader["isshow"].ToString()));
                    table.AddCol(string.Format("<a href=topsearchesseting_edit.aspx?id={0}>编辑</a> <a href='#' onclick='Del({0})'>删除</a>", dataPage.DataReader["id"].ToString()));

                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;

            dataPage.Dispose();
            dataPage = null;
            return(view);
        }
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        protected string GetList()
        {
            SOSOshop.BLL.SysParameter      sp       = new SOSOshop.BLL.SysParameter();
            ChangeHope.WebPage.Table       table    = new ChangeHope.WebPage.Table();
            SOSOshop.BLL.Role              data     = new SOSOshop.BLL.Role();
            ChangeHope.DataBase.DataByPage dataPage = data.GetList();
            //第一步先添加表头
            table.AddHeadCol("10%", "序号");
            table.AddHeadCol("25%", "角色名");
            table.AddHeadCol("40%", "描述");
            table.AddHeadCol("25%", "操作");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                int count = 0;
                while (dataPage.DataReader.Read())
                {
                    count++;
                    string No = (15 * (curpage - 1) + count).ToString();
                    table.AddCol("No." + No);
                    table.AddCol(dataPage.DataReader["name"].ToString());
                    table.AddCol(dataPage.DataReader["description"].ToString());
                    table.AddCol(string.Format("<a href=role_edit.aspx?id={0}>编辑</a> <a href='role_setmember.aspx?id={0}'>设置成员</a> <a href='popedom_manage.aspx?id={0}'>权限管理</a> <a href='#' onclick='Del({0})'>删除</a>", dataPage.DataReader["id"].ToString()));

                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;

            dataPage.Dispose();
            dataPage = null;
            return(view);
        }
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        protected string GetList()
        {
            ChangeHope.WebPage.Table   table = new ChangeHope.WebPage.Table();
            YXShop.BLL.Accessories.Sms bll   = new YXShop.BLL.Accessories.Sms();
            string sqlWhere = "1=1";

            #region 时间
            DateTime now = DateTime.Now; DateTime from = now; DateTime to = now;
            try { if (fromOrderDate.Text != null && fromOrderDate.Text.Trim() != "")
                  {
                      from = DateTime.Parse(fromOrderDate.Text.Trim());
                  }
            }
            catch { }
            try { if (toOrderDate.Text != null && toOrderDate.Text.Trim() != "")
                  {
                      to = DateTime.Parse(toOrderDate.Text.Trim());
                  }
            }
            catch { }
            if (from != now && to != now)
            {
                sqlWhere += string.Format(" and OperateTime >= '{0}' and OperateTime <= '{1}' ", from.ToString("yyyy/MM/dd"), to.ToString("yyyy/MM/dd"));
            }
            else if (from != now)
            {
                sqlWhere += string.Format(" and OperateTime >= '{0}' ", from.ToString("yyyy/MM/dd"));
            }
            else if (to != now)
            {
                sqlWhere += string.Format(" and OperateTime <= '{0}' ", to.ToString("yyyy/MM/dd"));
            }
            #endregion

            ChangeHope.DataBase.DataByPage dataPage = bll.GetList(sqlWhere);
            //第一步先添加表头
            table.AddHeadCol("5", "<input type=\"checkbox\" id=\"chkAll\" onclick=\"CheckAll(this.form)\" alt=\"全选/取消\" title=\"全选/取消\" />");
            table.AddHeadCol("80", "发件人");
            table.AddHeadCol("80", "收件人");
            table.AddHeadCol("80", "发送手机");
            table.AddHeadCol("", "发送内容");
            table.AddHeadCol("120", "发送时间");
            table.AddHeadCol("30", "状态");
            table.AddRow();
            //添加表的内容
            if (dataPage.DataReader != null)
            {
                int curpage = ChangeHope.WebPage.PageRequest.GetInt("pageindex");
                if (curpage < 0)
                {
                    curpage = 1;
                }
                int count = 0; string state = "";
                while (dataPage.DataReader.Read())
                {
                    count++;
                    string No = (15 * (curpage - 1) + count).ToString();

                    table.AddCol("<input ID=\"cBox\" type=\"checkbox\" name=\"chk\" value=\"" + dataPage.DataReader["id"].ToString() + "\" />");

                    table.AddCol(dataPage.DataReader["fromUID"].ToString());
                    table.AddCol(dataPage.DataReader["toUID"].ToString());
                    table.AddCol(dataPage.DataReader["Mobile"].ToString());
                    table.AddCol("<textarea rows=\"5\" cols=\"8\" style=\"border: 0pt none; width: 100%; height: 41px;\">" + dataPage.DataReader["Msg"].ToString() + "</textarea>");
                    table.AddCol(dataPage.DataReader["OperateTime"].ToString());
                    state = dataPage.DataReader["State"].ToString();
                    if (state == "1")
                    {
                        table.AddCol(string.Format("<img src='../images/{0}.gif' style='cursor:pointer;' title='{1}'  />", state, "成功"));
                    }
                    else
                    {
                        table.AddCol(string.Format("<img src='../images/{0}.gif' style='cursor:pointer;' title='{1}'  />", state, "失败"));
                    }
                    table.AddRow();
                }
            }
            string view = table.GetTable() + dataPage.PageToolBar;
            dataPage.Dispose();
            dataPage = null;
            return(view);
        }