private void btnCRUDUsuarios_Click(object sender, EventArgs e) { this.Hide(); ABC_CLIENTE abc_cliente = new ABC_CLIENTE(); abc_cliente.Show(); }
private void button2_Click(object sender, EventArgs e) { ora.Open(); try { comando = new OracleCommand(); comando.Connection = ora; comando.CommandText = "SELECT firma,foto,dpi FROM CLIENTE WHERE codigo_cliente = (SELECT cliente FROM CLIENTE_CUENTA WHERE cuenta = :cuenta)"; comando.Parameters.Add("cuenta", OracleType.Number).Value = Convert.ToInt32(txt_cuenta_a.Text); OracleDataReader dr = comando.ExecuteReader(); dr.Read(); ABC_CLIENTE b = new ABC_CLIENTE(); byte[] firma = (byte[])(dr["firma"]); byte[] foto = (byte[])(dr["foto"]); String ruta = b.convert_blob_to_image(firma, "firmax"); pic_firma.Image = Image.FromFile(ruta); ruta = b.convert_blob_to_image(foto, "fotox"); pic_foto.Image = Image.FromFile(ruta); label7.Text = dr["dpi"].ToString(); this.btn_transf.Enabled = true; } catch (Exception ex) { this.btn_transf.Enabled = false; System.Windows.Forms.MessageBox.Show("Debe ingresar un numero de cuenta valida"); } finally { ora.Close(); } }
private void btn_verif_Click(object sender, EventArgs e) { if (!fillcamp(txt_nocuenta, "No Cuenta del cheque")) { return; } OracleConnection ora; ora = new OracleConnection( "DATA SOURCE = " + Properties.Settings.Default.nombre_db + ";" + "PASSWORD="******";" + "USER ID=" + Properties.Settings.Default.usuario_db + ";" ); OracleDataAdapter adaptador; OracleCommand comando; ora.Open(); try { comando = new OracleCommand(); comando.Connection = ora; comando.CommandText = "SELECT firma FROM CLIENTE WHERE codigo_cliente = (SELECT cliente FROM CLIENTE_CUENTA WHERE cuenta = :cuenta)"; comando.Parameters.Add("cuenta", OracleType.Number).Value = Convert.ToInt32(txt_nocuenta.Text); OracleDataReader dr = comando.ExecuteReader(); dr.Read(); ABC_CLIENTE b = new ABC_CLIENTE(); byte[] firma = (byte[])(dr["firma"]); String ruta = b.convert_blob_to_image(firma, "firma"); pic_firma.Image = Image.FromFile(ruta); this.local.Enabled = true; } catch (Exception ex) { this.local.Enabled = false; System.Windows.Forms.MessageBox.Show("Debe ingresar un numero de cuenta valido"); } finally { ora.Close(); } }
private void button1_Click(object sender, EventArgs e) { Form f1 = new ABC_CLIENTE(); f1.Show(); }