コード例 #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string user = (string)Session["userName"];
        string pass = (string)Session["passWord"];

        if (RadioButtonList1.SelectedItem.Value.Equals("Altutil"))
        {
            GridView1.Visible    = true;
            GridView2.Visible    = false;
            Label2.Visible       = false;
            Label3.Visible       = false;
            DetailsView1.Visible = false;
            GWSiteClassLibrary.IUser ualt = GWSiteClassLibrary.Factory.CreateUserService();
            DataSet dsalt = ualt.GetAll(user, pass);
            GridView1.DataSource = dsalt;
            GridView1.DataBind();
        }
        else
        if (RadioButtonList1.SelectedItem.Value.Equals("Rutl"))
        {
            GridView1.Visible    = false;
            GridView2.Visible    = true;
            Label2.Visible       = false;
            Label3.Visible       = false;
            DetailsView1.Visible = false;
            GWSiteClassLibrary.IUser udel = GWSiteClassLibrary.Factory.CreateUserService();
            DataSet dsdel = udel.GetAll(user, pass);
            GridView2.DataSource = dsdel;
            GridView2.DataBind();
        }
    }
コード例 #2
0
    private void bindusers()
    {
        string user = (string)Session["userName"];
        string pass = (string)Session["passWord"];

        GridView1.Visible = true;
        GWSiteClassLibrary.IUser bu = GWSiteClassLibrary.Factory.CreateUserService();
        DataSet dsbu = bu.GetAll(user, pass);

        GridView1.DataSource = dsbu;
        GridView1.DataBind();
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            string user = (string)Session["userName"];
            string pass = (string)Session["passWord"];

            ////////////////Listagens Scores//////////////
            GridView5.DataSource = getDataSet();
            GridView5.DataBind();

            /*
             * GWSiteClassLibrary.IScore sc = GWSiteClassLibrary.Factory.CreateScoreService();
             * DataSet ds = null;
             * ds = sc.GetAll(user, pass);
             * GridView5.DataSource = ds;
             * GridView5.DataBind();
             * */
            /*GWSiteClassLibrary.IUser ustest = GWSiteClassLibrary.Factory.CreateUserService();
             * //DataSet ds = null;
             * DataSet ds = ustest.FindByName(user, pass, username);
             * GridView5.DataSource = ds;
             * GridView5.DataBind();*/


            ////////////////Listagens Mapas//////////////
            GWSiteClassLibrary.IMap m = GWSiteClassLibrary.Factory.CreateMapService();
            DataSet dsP1 = null;
            dsP1 = m.GetAll(user, pass);
            GridView3.DataSource = dsP1;
            // GridView1.DataTextField = "Name";
            // GridView1.DataValueField = "PlayerID";
            GridView3.DataBind();

            ////////////////Listagens Users//////////////
            GWSiteClassLibrary.IUser u = GWSiteClassLibrary.Factory.CreateUserService();
            DataSet dsP2 = null;
            dsP2 = u.GetAll(user, pass);
            GridView2.DataSource = dsP2;
            // GridView1.DataTextField = "Name";
            // GridView1.DataValueField = "PlayerID";
            GridView2.DataBind();

            ////////////////Listagens Players//////////////
            GWSiteClassLibrary.IPlayer p = GWSiteClassLibrary.Factory.CreatePlayerService();
            DataSet dsP3 = null;
            dsP3 = p.GetAll(user, pass);
            GridView4.DataSource = dsP3;
            GridView4.DataBind();
        }
    }
コード例 #4
0
    protected void DetailsView1_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
    {
        string user = (string)Session["userName"];
        string pass = (string)Session["passWord"];


        GWSiteClassLibrary.IUser dvuser = GWSiteClassLibrary.Factory.CreateUserService();
        int    id      = int.Parse(DetailsView1.Rows[0].Cells[1].Text);
        string passnew = ((TextBox)DetailsView1.Rows[2].Cells[1].Controls[0]).Text;

        GWSiteClassLibrary.GWSiteStatusEnum status = dvuser.UpdateUserPass(user, pass, id, passnew);
        Label3.Visible       = true;
        Label3.Text          = status.ToString();
        DetailsView1.Visible = false;
        DataSet ds = dvuser.GetAll(user, pass);

        GridView1.DataSource = ds;
        GridView1.DataBind();
    }