public void localizar() { try { objDAL = new MarcasDAL(); this.mar_codigo = objDAL.localizar(this.mar_codigo); objDAL = null; } catch (Exception) { throw; } }
public DataTable localizarComRetorno(String descricao, String atributo) { try { DataTable tab; objDAL = new MarcasDAL(); tab = objDAL.localizar(descricao, atributo); objDAL = null; return(tab); } catch (Exception) { throw; } }
public void localizar(String descricao, String atributo) { try { DataTable tab; objDAL = new MarcasDAL(); tab = objDAL.localizar(descricao, atributo); if (tab.Rows.Count > 0) { this.mar_codigo = int.Parse(tab.Rows[0]["mar_codigo"].ToString()); this.mar_descricao = tab.Rows[0]["mar_descricao"].ToString(); } objDAL = null; } catch (Exception) { throw; } }