コード例 #1
0
        public IHttpActionResult GetClient()
        {
            ClientBussines busi = new ClientBussines();
            string         json = JsonConvert.SerializeObject(busi.clients());

            return(Json(busi.clients()));
        }//Get
コード例 #2
0
        private void LoadImages()
        {
            this.clients = clientBusiness.clients();

            foreach (Domain.Client client in clients)
            {
                Panel       pGame       = new Panel();
                ImageButton imageButton = new ImageButton();
                imageButton.ImageUrl = "/img/icons/People.png";
                imageButton.Style.Add("padding", "5px");
                imageButton.Height   = Unit.Pixel(100);
                imageButton.Width    = Unit.Pixel(100);
                imageButton.CssClass = "mx-auto rounded-circle";
                imageButton.Click   += new ImageClickEventHandler(delegate(object sender, ImageClickEventArgs e) {
                    Response.Redirect("~/Clients/ChangeClient.aspx?id=" + client.IdClient);
                });
                Label lblName1 = new Label();
                lblName1.Text     = client.Name;
                lblName1.CssClass = "h4";
                Label lblName2 = new Label();
                lblName2.Text     = client.Birthday;
                lblName2.CssClass = "text-muted";

                pGame.CssClass = "team-member";
                pGame.Controls.Add(imageButton);
                pGame.Controls.Add(new LiteralControl("<BR>"));
                pGame.Controls.Add(lblName1);
                pGame.Controls.Add(new LiteralControl("<BR>"));
                pGame.Controls.Add(lblName2);
                pGame.Controls.Add(new LiteralControl("<BR>"));
                PanelList.Controls.Add(pGame);
            }
            PanelList.CssClass = "row";
        }
コード例 #3
0
 private void charge()
 {
     this.clientBusiness = new ClientBussines();
     this.clients        = clientBusiness.clients();
     idClient            = Convert.ToString(Request.QueryString["id"]);
     foreach (Domain.Client game in this.clients)
     {
         if (this.idClient.Equals(game.IdClient))
         {
             tbNameClient.Text = game.Name;
             tbUserClient.Text = game.Email;
             tbPassClient.Text = game.Password;
             tbBorn.Text       = "" + game.Birthday;
             userClient        = game;
         }
     }
 }