public int stpAlteraCategoria(int cdcategoria, string nmcategoria) { Queue<SqlParameter> qParameters = null; Database db = null; try { CreateParameters(Database.Action.Update, ref qParameters, cdcategoria, nmcategoria); db = new Database(); return db.ExecuteNonQuery("stpAlteraCategoria", ref qParameters); } catch (Exception ex) { throw ex; } finally { qParameters = null; db.Dispose(); db = null; } }
public DataSet stpConsultaCategoria(string nmcategoria) { Queue<SqlParameter> qParameters = null; Database db = null; DataSet ds = null; try { CreateParameters(Database.Action.List, ref qParameters, 0, nmcategoria); db = new Database(); ds = db.ExecuteDataSet("stpConsultaCategoria", ref qParameters); return ds; } catch (Exception ex) { throw ex; } finally { qParameters = null; db.Dispose(); db = null; } }
public int stpIncluiCategoria(string nmcategoria) { Queue<SqlParameter> qParameters = null; Database db = null; try { CreateParameters(Database.Action.Insert, ref qParameters, 0, nmcategoria); db = new Database(); return db.ExecuteNonQuery("stpIncluiCategoria", ref qParameters); } catch (Exception ex) { throw ex; } finally { qParameters = null; db.Dispose(); db = null; } }