public static String LoadFileContentAsString(Materialien MaterialContainer) { WCFStandards DataAccess = new WCFStandards(); String SelectStatement = "select BlobContent from Materialien where ID = '" + MaterialContainer.ID.ToString() + "'"; Byte [] Result = DataAccess.GetCommonBlob (SelectStatement); if ((Result != null) && (Result.Length > 0)) using (MemoryStream Helper = new MemoryStream(Result)) { return Basics.ConvertMemoryStreamToString(Helper); } return String.Empty; }
public static String LoadFileContentAsString (Materialien MaterialContainer) { WCFStandards DataAccess = new WCFStandards(); String SelectStatement = "select BlobContent = @BlobParam from Materialien where ID = '" + MaterialContainer.ID.ToString() + "'"; using (MemoryStream Helper = new MemoryStream (DataAccess.GetCommonBlob (SelectStatement))) { return WMB.Basics.ConvertMemoryStreamToString (Helper); } }
public static Byte[] LoadFileContent(Materialien MaterialContainer) { WCFStandards DataAccess = new WCFStandards(); String SelectStatement = "select BlobContent from Materialien where ID = '" + MaterialContainer.ID.ToString() + "'"; return DataAccess.GetCommonBlob(SelectStatement); }
static public List<BitmapSource> GetAvailablePictures (DataRow ProcessingRow) { String TableName = ProcessingRow ["Tabelle"].ToString (); String TableID = ProcessingRow ["TabelleID"].ToString (); WCFStandardsNS.WCFStandards DataAccess = new WCFStandards (); DataAccess.DefaultConnectionStringName = "WPMediaAddOnDataConnectionString"; DataSet AvailablePicturesEntries = DataAccess.GetCommonDataSet ("Select ID from Materialien where Tabelle = '" + TableName + "' and TabelleID = '" + TableID + "'"); List<BitmapSource> Result = new List<BitmapSource> (); foreach (DataRow Available in AvailablePicturesEntries.Tables ["Materialien"].Rows) { String ID = Available ["ID"].ToString (); Byte [] JpegBytes = DataAccess.GetCommonBlob ("Select BlobContent from Materialien where ID = '" + ID + "'"); BitmapSource PictureData = XAMLHandling.ConvertJPegStreamToBitmapSource (JpegBytes); Result.Add (PictureData); } return Result; }