/// <summary> /// This method deletes a Vendor record /// <returns>The return value from the stored procedure.</returns> public int DeleteAll(DBOFactoryTransaction objTransaction) { GetResultsDataSetDelegate objGetResultsMethod = null; FillCommandParamsDelegate objFillParamsMethod = null; QueryController objQueryController = new QueryController(null, $"DELETE {Table}", objFillParamsMethod, objGetResultsMethod); int intReturnCode = PerformQuery(objQueryController, "GetByName", null); return(intReturnCode); }
/// <summary> /// This method deletes a Vendor record /// <returns>The return value from the stored procedure.</returns> public DataObjects.ImageFileInfoList GetMultiples(DBOFactoryTransaction objTransaction) { GetResultsDataSetDelegate objGetResultsMethod = new GetResultsDataSetDelegate(GetSelectResultsDataSet); FillCommandParamsDelegate objFillParamsMethod = new FillCommandParamsDelegate(delegate(SqlCommand objSQLCommand) { objSQLCommand.Parameters.AddWithValue("@IsMoved", IsMoved); }); QueryController objQueryController = new QueryController(null, $"SELECT {AllColumnsString} FROM {Table} WHERE FileName IN ( SELECT FileName FROM {Table} GROUP BY FileName HAVING COUNT(1) > 1 ) AND IsMoved = @IsMoved", objFillParamsMethod, objGetResultsMethod); int intReturnCode = PerformQuery(objQueryController, "GetSingledtons", null); DataObjects.ImageFileInfoList objectList = GetObjectListFromDataset(this.ResultDataSet); return(objectList); }
/// <summary> /// This method deletes a Vendor record /// <returns>The return value from the stored procedure.</returns> public DataObjects.ImageFileInfo GetByName(DBOFactoryTransaction objTransaction) { GetResultsDataSetDelegate objGetResultsMethod = new GetResultsDataSetDelegate(GetSelectResultsDataSet); FillCommandParamsDelegate objFillParamsMethod = new FillCommandParamsDelegate(delegate(SqlCommand objSQLCommand) { objSQLCommand.Parameters.AddWithValue("@FileFullPath", FileFullPath); }); QueryController objQueryController = new QueryController(null, $"SELECT {AllColumnsString} FROM {Table} WHERE FileFullPath = @FileFullPath", objFillParamsMethod, objGetResultsMethod); int intReturnCode = PerformQuery(objQueryController, "GetByName", null); DataObjects.ImageFileInfoList objectList = GetObjectListFromDataset(this.ResultDataSet); this.ResultDataSet = null; return(objectList.FirstOrDefault()); }