EF7 npgsql => ko aux clients => inutile en lib [obsdnx]

This commit is contained in:
2018-05-04 17:04:19 +02:00
parent 4ae095ccb3
commit 4e3845755b
495 changed files with 206 additions and 10500 deletions

View File

@ -1,58 +0,0 @@
using System.Linq;
using Microsoft.Data.Entity;
using Microsoft.Extensions.Localization;
namespace Yavsc.Models.Messaging
{
using Interfaces.Workflow;
using Billing;
using Yavsc.Helpers;
using Yavsc.Models.Workflow;
public class EstimationEvent: IEvent
{
public EstimationEvent(ApplicationDbContext context, Estimate estimate, IStringLocalizer SR)
{
Topic = "Estimation";
Estimation = estimate;
perfer = context.Performers.Include(
p=>p.Performer
).FirstOrDefault(
p => p.PerformerId == estimate.OwnerId
);
// Use estimate.OwnerId;
ProviderInfo = new ProviderClientInfo {
Rate = perfer.Rate,
UserName = perfer.Performer.UserName,
Avatar = perfer.Performer.Avatar,
UserId = perfer.PerformerId
};
Sender = perfer.Performer.UserName;
_localizer = SR;
}
// TODO via e-mail only: Message = string.Format(
// SR["EstimationMessageToClient"],perfer.Performer.UserName, estimate.Title,estimate.Bill.Addition());
//
ProviderClientInfo ProviderInfo { get; set; }
Estimate Estimation { get; set; }
private PerformerProfile perfer;
public string Topic
{
get; set;
}
public string Sender
{
get; set;
}
private IStringLocalizer _localizer;
public string CreateBody()
{
return string.Format(_localizer["EstimationMessageToClient"], perfer.Performer.UserName, this.Estimation.Bill.Addition());
}
}
}