This commit is contained in:
2017-01-16 15:34:05 +01:00
parent 2a64f2dc84
commit da08bc5368
16 changed files with 113 additions and 11 deletions

View File

@ -101,11 +101,13 @@ namespace Yavsc.Controllers
_context.Estimates
.Add(estimate);
_context.SaveChanges();
var query = _context.BookQueries.FirstOrDefault(
q=>q.Id == estimate.CommandId
);
var perfomerProfile = _context.Performers
.Include(
perpr => perpr.Performer).FirstOrDefault(
x=>x.PerformerId == estimate.Query.PerformerId
x=>x.PerformerId == query.PerformerId
);
var command = _context.BookQueries.FirstOrDefault(
cmd => cmd.Id == estimate.CommandId

View File

@ -120,5 +120,30 @@ namespace Yavsc.Controllers
throw new Exception("No data");
return View("Estimate.pdf",estimate);
}
[Authorize]
public IActionResult EstimateProValidation()
{
throw new NotImplementedException();
}
[Authorize]
public IActionResult EstimateClientValidation()
{
throw new NotImplementedException();
}
[Authorize]
public IActionResult BillValidation()
{
throw new NotImplementedException();
}
[Authorize]
public IActionResult BillAcquitment()
{
throw new NotImplementedException();
}
}
}

View File

@ -46,10 +46,10 @@ namespace Yavsc
}
if (culture != null) {
#if DNX451
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
// System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
#else
CultureInfo.CurrentCulture = new CultureInfo(culture);
// CultureInfo.CurrentCulture = new CultureInfo(culture);
CultureInfo.CurrentUICulture = new CultureInfo(culture);
#endif
}

View File

@ -19,7 +19,8 @@ namespace Yavsc.Helpers
EventDate = query.EventDate,
Location = query.Location,
Id = query.Id,
Reason = query.Reason
Reason = query.Reason,
ActivityCode = query.ActivityCode
};
return yaev;
}

View File

@ -1,7 +1,6 @@
using System;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Yavsc.Models;

View File

@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations

View File

@ -1,8 +1,6 @@
using System;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Yavsc.Models;
namespace Yavsc.Migrations

View File

@ -15,6 +15,8 @@ namespace Yavsc.Model
public decimal? Previsional { get; set; }
public string Reason { get; set; }
public string ActivityCode { get; set; }
}
}

View File

@ -323,6 +323,10 @@
<data name="XHasBeenNotified"><value>{0} has been notified of your query, you should be fast contacted</value></data>
<data name="Xshouldbeavailable"><value>regarding his calendar,
{0} should be available for this booking</value></data>
<data name="Yavsc.Models.Booking.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Booking.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Booking.Profiles.GeneralSettings"><value>Paramètres généraux: une couleur musicale</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>You need to be authenticated in order to
contact a performer</value></data>
<data name="younotadmin"><value>You're not administrator</value></data>

View File

@ -358,6 +358,7 @@
<data name="Title"><value>Titre</value></data>
<data name="to"><value>à</value></data>
<data name="TwoFactorAuthentication"><value>Double identification</value></data>
<data name="UserActivity"><value>Activité Utilisateur</value></data>
<data name="Unitary_cost"><value>Coût unitaire</value></data>
<data name="Unregister"><value>Se désinscrire</value></data>
<data name="Use a local account to log in"><value>Utiliser un compte local pour se connecter</value></data>
@ -374,7 +375,7 @@
<data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data>
<data name="Xshouldbeavailable"><value>Au vu de son calendrier,
{0} devrait être disponible pour ce rendez-vous</value></data>
<data name="Yavsc.Models.Booking.MusicianSettings"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Booking.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Booking.Profiles.GeneralSettings"><value>Paramètres généraux: une couleur musicale</value></data>

View File

@ -0,0 +1,45 @@
@model BookQuery
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.EventDate)
</dt>
<dd>
@Html.DisplayFor(model => model.EventDate)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Client)
</dt>
<dd>
@Html.DisplayFor(model => model.Client.UserName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Location.Address)
</dt>
<dd>
@Html.DisplayFor(model => model.Location.Address)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PerformerProfile)
</dt>
<dd>
@Html.DisplayFor(model => model.PerformerProfile.Performer.UserName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ValidationDate)
</dt>
<dd>
@if (Model.ValidationDate==null) {
@SR["NotValidated"]
}
else {
@Html.DisplayFor(model => model.ValidationDate)
}
</dd>
</dl>

View File

@ -0,0 +1,27 @@
@model Estimate
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Title)
</dt>
<dd>
@Html.DisplayFor(model => model.Title)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Description)
</dt>
<dd>
@Html.DisplayFor(model => model.Description)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Bill)
</dt>
<dd>
@foreach (var cl in Model.Bill) {
@await Html.PartialAsync("BillingLine", cl);
}
</dd>
</dl>
</div>
@await Component.InvokeAsync("Estimate",Model.Id)