/// <summary> /// Update an installation in the database /// </summary> /// <param name="oldAddress"></param> /// <param name="newAddress"></param> /// <param name="telephone"></param> /// <returns>return code returned by the stored procedure</returns> public int updateHeadQuarter(String oldAddress, String newAddress, String telephone) { DataAccess.storedProcData datos = new DataAccess.storedProcData(); List <DataAccess.storedProcData> parameters = new List <DataAccess.storedProcData>(); //First parameter datos.storedProcParam = "@DireccionV"; datos.storedProcParamType = SqlDbType.VarChar; datos.userParams = oldAddress; parameters.Add(datos); //First parameter datos.storedProcParam = "@DireccionN"; datos.storedProcParamType = SqlDbType.VarChar; datos.userParams = newAddress; parameters.Add(datos); //Second parameter datos.storedProcParam = "@Telefono"; datos.storedProcParamType = SqlDbType.VarChar; datos.userParams = telephone; parameters.Add(datos); return(dataAccess.executeStoreProcedure(parameters, "actualizarInstalacion")); }
/// <summary> /// Insert one level from the database /// </summary> /// <param name="numLevel">level number</param> /// <param name="minimumAge">minimum age</param> /// <param name="maximumAge">maximum age</param> /// <returns>return code returned by the stored procedure</returns> public int insertLevel(String numLevel, String minimumAge, String maximumAge) { DataAccess.storedProcData datos = new DataAccess.storedProcData(); List <DataAccess.storedProcData> parameters = new List <DataAccess.storedProcData>(); //First parameter datos.storedProcParam = "@numero"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = numLevel; parameters.Add(datos); //Second parameter datos.storedProcParam = "@edadInicio"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = minimumAge; parameters.Add(datos); //Third parameter datos.storedProcParam = "@edadFin"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = maximumAge; parameters.Add(datos); return(dataAccess.executeStoreProcedure(parameters, "insertarNivel")); }
/// <summary> /// Remove one level from the database /// </summary> /// <param name="oldLevelNumber"> old level number</param> /// <param name="newLevelNumber"> new level number</param> /// <param name="minimumAge">minimum age</param> /// <param name="maximumAge">maximum age</param> /// <returns>return code returned by the stored procedure</returns> public int updateLevel(String oldLevelNumber, String newLevelNumber, String minimumAge, String maximumAge) { DataAccess.storedProcData datos = new DataAccess.storedProcData(); List <DataAccess.storedProcData> parameters = new List <DataAccess.storedProcData>(); //First parameter datos.storedProcParam = "@numeroV"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = oldLevelNumber; parameters.Add(datos); //First parameter datos.storedProcParam = "@numeroN"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = newLevelNumber; parameters.Add(datos); //Second parameter datos.storedProcParam = "@edadInicio"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = minimumAge; parameters.Add(datos); //Third parameter datos.storedProcParam = "@edadFin"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = maximumAge; parameters.Add(datos); return(dataAccess.executeStoreProcedure(parameters, "actualizarNivel")); }
/// <summary> /// Remove an installation from the database /// </summary> /// <param name="address"></param> /// <returns>return code returned by the stored procedure</returns> public int deleteHeadQuarter(String address) { DataAccess.storedProcData datos = new DataAccess.storedProcData(); List <DataAccess.storedProcData> parameters = new List <DataAccess.storedProcData>(); //First parameter datos.storedProcParam = "@direccion"; datos.storedProcParamType = SqlDbType.VarChar; datos.userParams = address; parameters.Add(datos); return(dataAccess.executeStoreProcedure(parameters, "eliminarInstalacion")); }
/// <summary> /// Remove one level from the database /// </summary> /// <param name="numLevel">Level number to delete</param> /// <returns>return code returned by the stored procedure</returns> public int deleteLevel(String numLevel) { DataAccess.storedProcData datos = new DataAccess.storedProcData(); List <DataAccess.storedProcData> parameters = new List <DataAccess.storedProcData>(); //First parameter datos.storedProcParam = "@numero"; datos.storedProcParamType = SqlDbType.TinyInt; datos.userParams = numLevel; parameters.Add(datos); return(dataAccess.executeStoreProcedure(parameters, "eliminarNivel")); }
/// <summary> /// Insert an installation in the database /// </summary> /// <param name="address"></param> /// <param name="telephone"></param> /// <returns>return code returned by the stored procedure</returns> public int insertHeadQuarter(String address, String telephone) { DataAccess.storedProcData datos = new DataAccess.storedProcData(); List <DataAccess.storedProcData> parameters = new List <DataAccess.storedProcData>(); //First parameter datos.storedProcParam = "@Direccion"; datos.storedProcParamType = SqlDbType.VarChar; datos.userParams = address; parameters.Add(datos); //Second parameter datos.storedProcParam = "@Telefono"; datos.storedProcParamType = SqlDbType.VarChar; datos.userParams = telephone; parameters.Add(datos); return(dataAccess.executeStoreProcedure(parameters, "Registrar_Instalacion")); }