user name in the notification
This commit is contained in:
@ -6,6 +6,7 @@ namespace Yavsc.Helpers
|
|||||||
using Models.Messaging;
|
using Models.Messaging;
|
||||||
using Yavsc.Models.Haircut;
|
using Yavsc.Models.Haircut;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
public static class EventHelpers
|
public static class EventHelpers
|
||||||
{
|
{
|
||||||
@ -41,21 +42,23 @@ namespace Yavsc.Helpers
|
|||||||
string evdate = query.EventDate?.ToString("dddd dd/MM/yyyy à HH:mm")??"[pas de date spécifiée]";
|
string evdate = query.EventDate?.ToString("dddd dd/MM/yyyy à HH:mm")??"[pas de date spécifiée]";
|
||||||
string address = query.Location?.Address??"[pas de lieu spécifié]";
|
string address = query.Location?.Address??"[pas de lieu spécifié]";
|
||||||
var p = query.Prestation;
|
var p = query.Prestation;
|
||||||
decimal total = query.GetBillItems().Addition();
|
string total = query.GetBillItems().Addition().ToString("C",CultureInfo.CurrentUICulture);
|
||||||
string strprestation = $@"Coupe: {p.Cut}, Total: {total}";
|
string strprestation = query.Description;
|
||||||
string bill = string.Join("\n", query.GetBillItems().Select(
|
string bill = string.Join("\n", query.GetBillItems().Select(
|
||||||
l=> $"{l.Name} {l.Description} {l.UnitaryCost} {l.Count}"));
|
l=> $"{l.Name} {l.Description} {l.UnitaryCost} {l.Count}"));
|
||||||
|
|
||||||
var yaev = new HairCutQueryEvent
|
var yaev = new HairCutQueryEvent
|
||||||
{
|
{
|
||||||
Sender = query.ClientId,
|
Sender = query.Client.UserName,
|
||||||
Message = $@"{head}: {query.Client.UserName},
|
Message = $@"{head} pour {query.Client.UserName},
|
||||||
{evdate},
|
Date: {evdate},
|
||||||
{address}
|
Adresse: {address}
|
||||||
-----
|
-----
|
||||||
{strprestation}:
|
{strprestation}:
|
||||||
|
|
||||||
{bill}
|
{bill}
|
||||||
|
|
||||||
|
{total}
|
||||||
--
|
--
|
||||||
{query.AdditionalInfo}
|
{query.AdditionalInfo}
|
||||||
" ,
|
" ,
|
||||||
|
Reference in New Issue
Block a user