public List<Parameter> GetParametersForStoredProcedure(string storedProcedureName) { List<Parameter> parameters = null; using (IDBManager dbManager = new DBManager(DataProvider.SqlServer)) { try { dbManager.Open(); dbManager.CreateParameters(1); dbManager.AddParameters(0, "@SPName", storedProcedureName); IDataReader reader = dbManager.ExecuteReader(System.Data.CommandType.StoredProcedure, "storeProcedure_getParameters"); while (reader.Read()) { if (parameters == null) parameters = new List<Parameter>(); parameters.Add(new Parameter(reader.GetInt32(0), reader.GetString(1), reader.GetString(2), !Convert.IsDBNull(reader[3]) ? reader.GetInt32(3) : -1)); } //dbManager.Close(); } catch (System.Data.SqlClient.SqlException ex) { throw new DLException("Could not load parameters for stored procedure: " + storedProcedureName, ex); } } return parameters; }
public ProtocolModel GetProtocol() { IDBManager manager = new DBManager(); return manager.GetProtocol(); }
public MyDataAccess(string ConnName) { dbManager = new DBManager(ConnName); }
public IEnumerable<EstateModel> GetEstates() { IDBManager manager = new DBManager(); return manager.GetEstates(); }
internal IEnumerable<TreeInventoryModel> GetTreeInventoryByEstateName(int name) { IDBManager manager = new DBManager(); return manager.GetTreeInventoryByEstateName(name); }
public HttpStatusCode SaveInventory(TreeInventoryModel inventory) { IDBManager manager = new DBManager(); return manager.SaveInventory(inventory); }