コード例 #1
0
    private void GetList()
    {
        DiamondProcessCode _dm = new DiamondProcessCode();

        rpLastestPost.DataSource = _dm.GetTopPost(10, "", true);
        rpLastestPost.DataBind();
    }
コード例 #2
0
    private DataTable dataSource()
    {
        DiamondProcessCode _db = new DiamondProcessCode();

        try
        {
            string[] ids      = Request.QueryString["code"].Split(',');
            string   idString = Request.QueryString["code"];
            if (ids.Length > 1)
            {
                idString = ids[0];
            }
            string[] sKey = idString.Split('-');
            if (sKey.Length > 0)
            {
                idString = "";
                for (int i = 1; i < sKey.Length; i++)
                {
                    idString += sKey[i] + "-";
                }
            }

            return(_db.GetTopPost(10, idString, true));
        }
        catch
        {
            return(_db.GetListPost("", null, null, true));
        }
    }