private void btnCrearCuenta_Click(object sender, RoutedEventArgs e) { RegistroDeUsuario nuevoRegistro = new RegistroDeUsuario(); this.Hide(); nuevoRegistro.Show(); this.Close(); }
public async Task <JsonResponseInsert> RegistraNuevoUsuario(string Usuario, string Password, string Nombre, string Email) { var Url = new Uri(string.Format("http://esb.wisetrack.cl/BuscoProducto/Usuario", string.Empty)); RegistroDeUsuario Usu = new RegistroDeUsuario(Usuario, Password, Nombre, Email); var json = JsonConvert.SerializeObject(Usu); var content = new StringContent(json, Encoding.UTF8, "application/json"); var response = await client.PostAsync(Url, content); JsonResponseInsert Item; if (response.IsSuccessStatusCode) { var ContentResponse = await response.Content.ReadAsStringAsync(); Item = JsonConvert.DeserializeObject <JsonResponseInsert>(ContentResponse); } else { Item = new JsonResponseInsert(); } return(Item); }
private void Btn_Registrarse_Click(object sender, EventArgs e) { RegistroDeUsuario regristroDeUsuario = new RegistroDeUsuario(); regristroDeUsuario.ShowDialog(); }