public bool Inserir(StatusPlano objeto) { using (OracleCommand c = _conn.ObterConexao().CreateCommand()) { c.CommandType = System.Data.CommandType.Text; try { c.CommandText = "insert into STATUSPLANO (CODSTATUS, DESCSTATUS) values (:CODSTATUS, :DESCSTATUS)"; c.Parameters.Add("CODSTATUS", OracleType.Number).Value = objeto.CodStatusPlano; c.Parameters.Add("DESCSTATUS", OracleType.VarChar).Value = objeto.Descricao; c.ExecuteNonQuery(); return true; } catch (OracleException ex) { throw ex; } } }
public bool InserirStatus(StatusPlano novo) { if (chamadorDao.Inserir(novo)) { return true; } return false; }