put in new ui and backend store image to table
This commit is contained in:
@@ -283,7 +283,7 @@ public partial class PersonRepository : IPerson
|
||||
node.Key = item.Id.ToString();
|
||||
node.Type = type;
|
||||
if (item.Image != null)
|
||||
node.Data.Image = await LoadPersonImage(item.Id,item.Image);
|
||||
node.Data.Image = await LoadPersonImage(item.Id, (int) enumPhotoType.Profile, item.Image);
|
||||
|
||||
node.Icon = "T";
|
||||
node.StyleClass = getStyleClass(node.Icon);
|
||||
@@ -392,7 +392,7 @@ public partial class PersonRepository : IPerson
|
||||
citem.Data = new();
|
||||
citem.Label = pName;
|
||||
if (image != null)
|
||||
citem.Data.Image = await LoadPersonImage(personId,image);
|
||||
citem.Data.Image = await LoadPersonImage(personId, (int) enumPhotoType.Profile, image);
|
||||
|
||||
citem.Icon = "P";
|
||||
|
||||
@@ -413,7 +413,7 @@ public partial class PersonRepository : IPerson
|
||||
child.Type = type;
|
||||
image = dto.Image;
|
||||
if (image != null)
|
||||
child.Data.Image = await LoadPersonImage(dto.Id,image);
|
||||
child.Data.Image = await LoadPersonImage(dto.Id,(int) enumPhotoType.Profile, image);
|
||||
child.Icon = "C";
|
||||
child.StyleClass = getStyleClass(child.Icon);
|
||||
child.Label = dto.FirstName;
|
||||
@@ -750,13 +750,13 @@ public partial class PersonRepository : IPerson
|
||||
return result;
|
||||
}
|
||||
|
||||
private async Task<string> LoadPersonImage(int personId,string filename)
|
||||
private async Task<string> LoadPersonImage(int personId, int photoType, string filename)
|
||||
{
|
||||
string result = "";
|
||||
|
||||
// DownloadFileCriteria criteria = new() { FileName = filename };
|
||||
|
||||
var resultModel = await _personPhoto.DownloadPersonPhoto(personId, filename);
|
||||
var resultModel = await _personPhoto.DownloadPersonPhoto(personId, photoType , filename);
|
||||
//if (resultModel.Data.Content)
|
||||
string base64String = Convert.ToBase64String(resultModel.Data.Content);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user