Exemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ClientBussines clientBusines = new ClientBussines();

            Domain.Client client = new Domain.Client(tbUserClient.Text, tbPassClient.Text, tbNameClient.Text, tbBorn.Text);
            clientBusines.insertClient(client);
            Response.Redirect("~/ Clients / ViewClient.aspx");
        }
Exemplo n.º 2
0
        }//initSession

        public IHttpActionResult insert([FromBody] Client client)
        {
            ClientBussines busi = new ClientBussines();

            busi.insertClient(client);
            String json = JsonConvert.SerializeObject(client);

            return(Json(new { Id = client.Id, Name = client.Name, Email = client.Email, Birthday = client.Birthday, Password = client.Password }));
        }//insert
Exemplo n.º 3
0
        public int insertClient(string email, string password, string name, string birthday)
        {
            var client = new Client()
            {
                Email = email, Password = password, Name = name, Birthday = birthday
            };
            ClientBussines cliBusi = new ClientBussines();

            cliBusi.insertClient(client);

            return(1);
        }//insert