protected void Button1_Click(object sender, EventArgs e) { try { string msj; msj = Datos.InsertarCliente(Convert.ToInt32(TextBox1.Text), TextBox2.Text, TextBox4.Text, txtEdad.Text, Convert.ToInt32(txtTelefono.Text), Convert.ToInt32(TextBox5.Text), TextBox6.Text, TextBox7.Text, 0); Response.Redirect("ClienteV.aspx"); } catch { Response.Write("<script>alert('Error, revise los campos')</script>"); } }
protected void Button5_Click(object sender, EventArgs e) { try { string msj; msj = DatosCl.InsertarCliente(Convert.ToInt32(TextBox5.Text), TextBox6.Text, TextBox7.Text, txtEdad.Text, Convert.ToInt32(txtTelefono.Text), 0, "", "", 0); Label2.Text = msj; tabla = DatosCl.ListaUncliente(Convert.ToInt32(TextBox1.Text)); IDc = Convert.ToInt32(tabla.Rows[0][0]); nom = tabla.Rows[0][7].ToString(); TextBox3.Text = nom; Label1.Text = IDc.ToString(); } catch { Label2.Text = "Error, revise los campos"; } }