public void alter_infoplato(PlatoDAL plato) { try { using (OracleConnection con = new Conexion().conexion()) { OracleDataAdapter da = new OracleDataAdapter(); OracleCommand cm = new OracleCommand("alter_infoplato", con); cm.BindByName = true; cm.CommandType = System.Data.CommandType.StoredProcedure; cm.Parameters.Add("p_nom", OracleDbType.Varchar2).Value = Nombre_plato; cm.Parameters.Add("p_precio", OracleDbType.Int32).Value = Precio; cm.Parameters.Add("p_categoria", OracleDbType.Varchar2).Value = Categoria; cm.Parameters.Add("p_habilitado", OracleDbType.Varchar2).Value = Habilitado; cm.Parameters.Add("p_descripcion", OracleDbType.Varchar2).Value = descripcion; cm.Parameters.Add("id_", OracleDbType.Int32).Value = Id_plato; con.Open(); cm.ExecuteNonQuery(); con.Close(); } } catch (Exception ex) { Console.WriteLine("" + ex); } }
public static PlatoDAL Getinstancia() { if (instance == null) { instance = new PlatoDAL(); } return(instance); }
public void Eliminar_Ing(PlatoDAL objaux) { try { using (OracleConnection con = new Conexion().conexion()) { OracleDataAdapter da = new OracleDataAdapter(); OracleCommand cm = new OracleCommand("Eliminar_Ing", con); cm.BindByName = true; cm.CommandType = System.Data.CommandType.StoredProcedure; cm.Parameters.Add("ide", OracleDbType.Varchar2).Value = Id_plato; con.Open(); cm.ExecuteNonQuery(); con.Close(); } } catch (Exception ex) { Console.WriteLine("" + ex); } }