public void AlterInfoUser(usuarioDAL objaux) { try { using (OracleConnection con = new Conexion().conexion()) { OracleDataAdapter da = new OracleDataAdapter(); OracleCommand cm = new OracleCommand("alter_infouser", con); cm.BindByName = true; cm.CommandType = System.Data.CommandType.StoredProcedure; cm.Parameters.Add("p_nom", OracleDbType.Varchar2).Value = nom_usuario; cm.Parameters.Add("p_apellido", OracleDbType.Varchar2).Value = apellido_usuario; cm.Parameters.Add("p_fono", OracleDbType.Int32).Value = fono; cm.Parameters.Add("p_dir", OracleDbType.Varchar2).Value = direccion; cm.Parameters.Add("rut", OracleDbType.Int32).Value = rut; con.Open(); int num = cm.ExecuteNonQuery(); con.Close(); } } catch (Exception ex) { Console.WriteLine("" + ex); } }
public void DeleteUser(usuarioDAL objaux) { try { using (OracleConnection con = new Conexion().conexion()) { OracleDataAdapter da = new OracleDataAdapter(); OracleCommand cm = new OracleCommand("EliminarUsuario", con); cm.BindByName = true; cm.CommandType = System.Data.CommandType.StoredProcedure; cm.Parameters.Add("rut", OracleDbType.Varchar2).Value = rut; con.Open(); cm.ExecuteNonQuery(); con.Close(); } } catch (Exception ex) { Console.WriteLine("" + ex); } }