示例#1
0
    private void BindList()
    {
        DataSet ds = DbSession.Default.FromProc("Web_pGetDataPager")
                     .AddInputParameter("@PageSize", DbType.Int32, anpPageIndex.PageSize)
                     .AddInputParameter("@CurrentPage", DbType.Int32, PageIndex)
                     .AddInputParameter("@Columns", DbType.String, "*")
                     .AddInputParameter("@TableName", DbType.String, "Web_VLotterLog")
                     .AddInputParameter("@Wheres", DbType.String, "")
                     .AddInputParameter("@KeyName", DbType.String, "ID")
                     .AddInputParameter("@OrderBy", DbType.String, "ID desc")
                     .ToDataSet();

        if (ds.Tables.Count > 0)
        {
            anpPageIndex.RecordCount      = (int)ds.Tables[0].Rows[0][0];
            anpPageIndex.CurrentPageIndex = PageIndex;

            if (ds.Tables[1].Rows.Count > 0)
            {
                PrizesList.Visible    = true;
                NoPrizesList.Visible  = false;
                PrizesList.DataSource = ds.Tables[1];
                PrizesList.DataBind();
            }
            else
            {
                PrizesList.Visible   = false;
                NoPrizesList.Visible = true;
            }
        }
        ds.Clear();
    }
示例#2
0
    protected void BindList()
    {
        if (UserID != null && UserID != "")
        {
            DataSet ds = DbSession.Default.FromProc("Web_pGetDataPager")
                         .AddInputParameter("@PageSize", DbType.Int32, anpPageIndex.PageSize)
                         .AddInputParameter("@CurrentPage", DbType.Int32, PageIndex)
                         .AddInputParameter("@Columns", DbType.String, "*")
                         .AddInputParameter("@TableName", DbType.String, "Web_VUserGameMoney")
                         .AddInputParameter("@Wheres", DbType.String, " and Userid=" + UserID)
                         .AddInputParameter("@KeyName", DbType.String, "GameID")
                         .AddInputParameter("@OrderBy", DbType.String, "GameID desc")
                         .ToDataSet();

            if (ds.Tables.Count > 0)
            {
                anpPageIndex.RecordCount      = (int)ds.Tables[0].Rows[0][0];
                anpPageIndex.CurrentPageIndex = PageIndex;

                if (ds.Tables[1].Rows.Count > 0)
                {
                    PrizesList.Visible    = true;
                    NoPrizesList.Visible  = false;
                    PrizesList.DataSource = ds.Tables[1];
                    PrizesList.DataBind();
                }
                else
                {
                    PrizesList.Visible   = false;
                    NoPrizesList.Visible = true;
                }
            }
        }
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminPopedom.IsHoldModel("11");

        DataSet ds = DbSession.Default.FromProc("Web_pGetDataPager")
                     .AddInputParameter("@PageSize", DbType.Int32, anpPageIndex.PageSize)
                     .AddInputParameter("@CurrentPage", DbType.Int32, PageIndex)
                     .AddInputParameter("@Columns", DbType.String, "*")
                     .AddInputParameter("@TableName", DbType.String, "Web_Award")
                     .AddInputParameter("@Wheres", DbType.String, "")
                     .AddInputParameter("@KeyName", DbType.String, "Award_id")
                     .AddInputParameter("@OrderBy", DbType.String, "Award_id desc")
                     .ToDataSet();

        if (ds.Tables.Count > 0)
        {
            anpPageIndex.RecordCount      = (int)ds.Tables[0].Rows[0][0];
            anpPageIndex.CurrentPageIndex = PageIndex;

            if (ds.Tables[1].Rows.Count > 0)
            {
                PrizesList.Visible    = true;
                NoPrizesList.Visible  = false;
                PrizesList.DataSource = ds.Tables[1];
                PrizesList.DataBind();
            }
            else
            {
                PrizesList.Visible   = false;
                NoPrizesList.Visible = true;
            }
        }

        /*
         * DataTable sd = new DataTable();
         * string para = "";
         * string[] sql = new string[2];
         * sql[0] = "select * from Web_Award order by Award_id desc";
         * sql[1] = "select count(*) from Web_Award";
         * string url = "Prizes.aspx";
         * PageLink page_set = new PageLink(url, 20, 10, para, sql);
         * page_set.paraLinkType = paraLinkShow.middling.ToString();
         * sd = page_set.get_table();
         * if (sd.Rows.Count > 0)
         * {
         * Repeater Vista = (Repeater)Page.FindControl("PrizesList");
         * Vista.DataSource = sd;
         * Vista.DataBind();
         * this.pageList.Text = page_set.pageList();
         * }
         * else
         * this.NoPrizesList.Visible = true;
         * sd.Clear();
         */
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdminPopedom.IsHoldModel("18");
        if (!IsPostBack)
        {
            if (CommonManager.Web.Request("act", "") == "")
            {
                DataSet ds = DbSession.Default.FromProc("Web_pGetDataPager")
                             .AddInputParameter("@PageSize", DbType.Int32, anpPageIndex.PageSize)
                             .AddInputParameter("@CurrentPage", DbType.Int32, PageIndex)
                             .AddInputParameter("@Columns", DbType.String, "*")
                             .AddInputParameter("@TableName", DbType.String, "Web_VLotterSpecial")
                             .AddInputParameter("@Wheres", DbType.String, "")
                             .AddInputParameter("@KeyName", DbType.String, "ID")
                             .AddInputParameter("@OrderBy", DbType.String, "ID desc")
                             .ToDataSet();

                if (ds.Tables.Count > 0)
                {
                    anpPageIndex.RecordCount      = (int)ds.Tables[0].Rows[0][0];
                    anpPageIndex.CurrentPageIndex = PageIndex;

                    if (ds.Tables[1].Rows.Count > 0)
                    {
                        PrizesList.Visible    = true;
                        NoPrizesList.Visible  = false;
                        PrizesList.DataSource = ds.Tables[1];
                        PrizesList.DataBind();
                    }
                    else
                    {
                        PrizesList.Visible   = false;
                        NoPrizesList.Visible = true;
                    }
                }
                ds.Clear();
            }
            else
            {
                DeleteLog();
            }
        }
    }