public DataSet GetListBodega(ClsBodega bodega, String pACCION) { DataSet DtsBodega = new DataSet(); try { AbrirBaseDatos(); DtsBodega.Clear(); DtsBodega.EnforceConstraints = false; Cmd = new OracleCommand(); Cmd.Connection = conexion; Cmd.CommandText = "package_supermercados.stp_mantenimiento_bodega"; Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.Add(new OracleParameter("p_empresa", OracleDbType.Varchar2)).Value = bodega.aEMPRESA; Cmd.Parameters.Add(new OracleParameter("p_sucursal", OracleDbType.Varchar2)).Value = bodega.aSUCURSAL; Cmd.Parameters.Add(new OracleParameter("p_bodega", OracleDbType.Varchar2)).Value = bodega.aBODEGA; Cmd.Parameters.Add(new OracleParameter("p_inventario", OracleDbType.Int32)).Value = bodega.aINVENTARIO; Cmd.Parameters.Add(new OracleParameter("p_nombre", OracleDbType.Varchar2)).Value = bodega.aNOMBRE; Cmd.Parameters.Add(new OracleParameter("p_ubicacion", OracleDbType.Varchar2)).Value = bodega.aUBICACION; Cmd.Parameters.Add(new OracleParameter("p_accion", OracleDbType.Varchar2)).Value = pACCION; Cmd.Parameters.Add(new OracleParameter("p_recordset", OracleDbType.RefCursor)).Direction = ParameterDirection.Output; OracleDataAdapter DataAdapter = new OracleDataAdapter(Cmd); DataAdapter.Fill(DtsBodega); cerrar_base(); } catch (Exception Ex) { cerrar_base(); throw new Exception(Ex.Message); } return(DtsBodega); }
public String MaintenanceBodega(ClsBodega bodega, String pACCION) { String Menssage = ""; try { Cmd = new OracleCommand(); Cmd.Connection = conexion; AbrirBaseDatos(); Cmd.CommandText = "package_supermercados.stp_mantenimiento_bodega"; Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.Add(new OracleParameter("p_empresa", OracleDbType.Varchar2)).Value = bodega.aEMPRESA; Cmd.Parameters.Add(new OracleParameter("p_sucursal", OracleDbType.Varchar2)).Value = bodega.aSUCURSAL; Cmd.Parameters.Add(new OracleParameter("p_bodega", OracleDbType.Varchar2)).Value = bodega.aBODEGA; Cmd.Parameters.Add(new OracleParameter("p_inventario", OracleDbType.Int32)).Value = bodega.aINVENTARIO; Cmd.Parameters.Add(new OracleParameter("p_nombre", OracleDbType.Varchar2)).Value = bodega.aNOMBRE; Cmd.Parameters.Add(new OracleParameter("p_ubicacion", OracleDbType.Varchar2)).Value = bodega.aUBICACION; Cmd.Parameters.Add(new OracleParameter("p_accion", OracleDbType.Varchar2)).Value = pACCION; Cmd.Parameters.Add(new OracleParameter("p_recordset", OracleDbType.RefCursor)).Direction = ParameterDirection.Output; Cmd.ExecuteNonQuery(); Menssage = "Ejecutado con exito"; cerrar_base(); } catch (Exception Ex) { Menssage = Ex.Message; cerrar_base(); throw new Exception(Ex.Message); } return(Menssage); }