Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string user = (string)Session["userName"];
        string pass = (string)Session["passWord"];

        string pais = DropDownList1.SelectedValue;



        GWSiteClassLibrary.IPlayer p = GWSiteClassLibrary.Factory.CreatePlayerService();
        DataSet ds1 = p.FindByName(user, pass, "Country", pais);

        GridView1.DataSource = ds1;
        GridView1.DataBind();
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         string user = (string)Session["userName"];
         string pass = (string)Session["passWord"];
         int    uid  = int.Parse(Session["UserID"].ToString());
         GWSiteClassLibrary.IPlayer pl = GWSiteClassLibrary.Factory.CreatePlayerService();
         DataSet ds = pl.FindByName(user, pass, "UserID", uid.ToString());
         GridView1.DataSource = ds;
         GridView1.DataBind();
         int plid = int.Parse(GridView1.Rows[0].Cells[0].Text);
         Label2.Text = plid.ToString();
         bindDetalhesPlayers(plid);
     }
 }
    protected void gvmaps_SelectedIndexChanged(object sender, EventArgs e)
    {
        string user = (string)Session["userName"];
        string pass = (string)Session["passWord"];
        int    uid  = int.Parse(Session["UserID"].ToString());

        int idmap = int.Parse(gvmaps.SelectedDataKey.Value.ToString());

        GWSiteClassLibrary.IPlayer pl = GWSiteClassLibrary.Factory.CreatePlayerService();
        DataSet ds = pl.FindByName(user, pass, "UserID", uid.ToString());

        GridView1.DataSource = ds;
        GridView1.DataBind();
        int plid = int.Parse(GridView1.Rows[0].Cells[0].Text);

        GWSiteClassLibrary.IScore score = GWSiteClassLibrary.Factory.CreateScoreService();
        DataSet ds3 = score.GetPlayerRank(user, pass, idmap, plid, 1000, "DESC");// .GetAll(user, pass);

        GridView2.DataSource = ds3;
        GridView2.DataBind();
    }