public Task <DataResponse <Dto.File> > Get(string fileName) { var resp = new DataResponse <Dto.File> { Type = ResponseType.RecordNotFound }; var id = fileName.Split("_")[0]; var file = _repository.GetById(id); if (file == null || file.OwnerId != OwnerId.ToString()) { return(Task.FromResult(resp)); } resp.Data = new Dto.File { Content = file.Content, Name = file.Name }; resp.Type = ResponseType.Success; return(Task.FromResult(resp)); }
private string GetOwnerLink() { string retval = String.Empty; if (instance == null) // new { if (!String.IsNullOrEmpty(OwnerName) && OwnerId > 0) { retval = CHelper.GetLinkObjectViewByOwnerName(OwnerName, OwnerId.ToString()); } } else { string ownerName = string.Empty; if (instance.OwnerDocumentId != null) { ownerName = WorkflowInstanceEntity.FieldOwnerDocumentId; } if (!String.IsNullOrEmpty(ownerName)) { retval = CHelper.GetLinkObjectViewByOwnerName(ownerName, instance.OwnerDocumentId.ToString()); } } return(retval); }
public Agreement Accept() { var draftAcceptedEvent = new DraftAccepted(_agreementNumber.ToString(), _ownerId.ToString(), _tenantId.ToString(), TotalPrice.ToDecimal()); var agreement = new Agreement(_ownerId, _tenantId, _apartment, _period, _pricePerDay, _agreementNumber, _deposit); _eventRegistry.Publish(draftAcceptedEvent); return(agreement); }
public override string ToString() { return(CarId.ToString() + ' ' + OwnerId.ToString() + ' ' + Model + ' ' + Vis.ToString() + ' ' + Colour + ' ' + Convert.ToDateTime(YearOfIssue).ToString("yyyy") + ' ' + BodyNumber + ' ' + EngineNumber); }
public override string ToString() { return(OwnerId.ToString() + ' ' + DriverLicense.ToString() + ' ' + FioOwner.ToString() + Adress + ' ' + Phone); }
public override string ToString() { return($"ID = {OwnerId.ToString()}, Name = {Name.ToString()}, BirthDate = {BirthDate.ToString()}, Email = {Email.ToString()},\n"); }