estimate to LaTeX

This commit is contained in:
2016-11-06 02:03:36 +01:00
parent 8d4eb1a9af
commit 51b4ee2286
29 changed files with 1294 additions and 148 deletions

View File

@ -87,9 +87,8 @@ namespace Yavsc.Controllers
));
}
[Produces("text/x-tex"), Authorize,
Route("estimate-{id}.tex")]
public ViewResult Estimate(long id)
[Produces("text/x-tex"), Authorize, Route("estimate-{id}.tex")]
public ViewResult EstimateTex(long id)
{
var estimate = _context.Estimates.Include(x=>x.Query)
.Include(x=>x.Query.Client)
@ -97,10 +96,21 @@ namespace Yavsc.Controllers
.Include(x=>x.Query.PerformerProfile.OrganizationAddress)
.Include(x=>x.Query.PerformerProfile.Performer)
.Include(e=>e.Bill).FirstOrDefault(x=>x.Id==id);
ViewBag.From = estimate.Query.PerformerProfile.Performer;
ViewBag.To = estimate.Query.Client;
Response.ContentType = "text/x-tex";
return View("Estimate.tex", estimate);
}
[Produces("application/x-pdf"), Authorize, Route("estimate-{id}.pdf")]
public ViewResult EstimatePdf(long id)
{
var estimate = _context.Estimates.Include(x=>x.Query)
.Include(x=>x.Query.Client)
.Include(x=>x.Query.PerformerProfile)
.Include(x=>x.Query.PerformerProfile.OrganizationAddress)
.Include(x=>x.Query.PerformerProfile.Performer)
.Include(e=>e.Bill).FirstOrDefault(x=>x.Id==id);
return View("Estimate.pdf", estimate);
}
}
}

View File

@ -105,7 +105,8 @@ namespace Yavsc.Controllers
Roles = await _userManager.GetRolesAsync(user),
PostalAddress = user.PostalAddress?.Address,
FullName = user.FullName,
Avatar = user.Avatar
Avatar = user.Avatar,
BankInfo = user.BankInfo
};
if (_dbContext.Performers.Any(x => x.PerformerId == user.Id))
{
@ -296,6 +297,21 @@ namespace Yavsc.Controllers
else return Redirect(model.ReturnUrl);
}
[HttpGet,Authorize]
public async Task<IActionResult> AddBankInfo()
{
var user = await _userManager.FindByIdAsync(User.GetUserId());
return View(new AddBankInfoViewModel(
user.BankInfo));
}
[HttpGet,Authorize]
public async Task<IActionResult> SetFullName()
{
var user = await _userManager.FindByIdAsync(User.GetUserId());
return View(user.FullName);
}
//
// POST: /Manage/ChangePassword
[HttpPost]

View File

@ -0,0 +1,15 @@
using System.Linq;
namespace Yavsc.Helpers
{
public static class TeXHelpers
{
public static string NewLinesWith(this string target, string separator)
{
var items = target.Split(new char[] {'\n'}).Where(
s=> !string.IsNullOrWhiteSpace(s) ) ;
return string.Join(separator, items);
}
}
}

View File

@ -1,7 +1,6 @@
namespace Yavsc.Interfaces
{
using System.Collections.Generic;
using Yavsc.Interfaces.Workflow;
using Yavsc.Models.Billing;
public interface IEstimate
{

View File

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

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,4 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations

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,4 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations

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,4 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations

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,4 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations

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,4 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations

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,4 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations

View File

@ -0,0 +1,833 @@
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
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20161104164949_dropEstimateStatus")]
partial class dropEstimateStatus
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
modelBuilder
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
{
b.Property<string>("Id");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasAnnotation("MaxLength", 256);
b.Property<string>("NormalizedName")
.HasAnnotation("MaxLength", 256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.HasAnnotation("Relational:Name", "RoleNameIndex");
b.HasAnnotation("Relational:TableName", "AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("Id");
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider");
b.Property<string>("ProviderKey");
b.Property<string>("ProviderDisplayName");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("LoginProvider", "ProviderKey");
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId");
b.Property<string>("RoleId");
b.HasKey("UserId", "RoleId");
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
});
modelBuilder.Entity("Yavsc.Location", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Address")
.IsRequired()
.HasAnnotation("MaxLength", 512);
b.Property<double>("Latitude");
b.Property<double>("Longitude");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("AccountNumber")
.HasAnnotation("MaxLength", 15);
b.Property<string>("BIC")
.HasAnnotation("MaxLength", 15);
b.Property<string>("BankCode")
.HasAnnotation("MaxLength", 5);
b.Property<int>("BankedKey");
b.Property<string>("IBAN")
.HasAnnotation("MaxLength", 33);
b.Property<string>("WicketCode")
.HasAnnotation("MaxLength", 5);
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Model.Chat.Connection", b =>
{
b.Property<string>("ConnectionId");
b.Property<string>("ApplicationUserId");
b.Property<bool>("Connected");
b.Property<string>("UserAgent");
b.HasKey("ConnectionId");
});
modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b =>
{
b.Property<string>("UserId");
b.Property<string>("Avatar");
b.Property<long?>("BillingAddressId");
b.Property<string>("ChatHubConnectionId");
b.Property<string>("EMail");
b.Property<string>("Phone");
b.Property<int>("Rate");
b.Property<string>("UserName");
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
{
b.Property<string>("UserId");
b.Property<long>("ContactCredits");
b.Property<decimal>("Credits");
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.Activity", b =>
{
b.Property<string>("Code")
.HasAnnotation("MaxLength", 512);
b.Property<string>("ActorDenomination");
b.Property<string>("Description");
b.Property<string>("ModeratorGroupName");
b.Property<string>("Name")
.IsRequired()
.HasAnnotation("MaxLength", 512);
b.Property<string>("Photo");
b.HasKey("Code");
});
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
{
b.Property<string>("Id");
b.Property<int>("AccessFailedCount");
b.Property<string>("Avatar")
.HasAnnotation("MaxLength", 512);
b.Property<long?>("BankInfoId");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("DedicatedGoogleCalendar");
b.Property<string>("Email")
.HasAnnotation("MaxLength", 256);
b.Property<bool>("EmailConfirmed");
b.Property<string>("FullName")
.HasAnnotation("MaxLength", 512);
b.Property<bool>("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("NormalizedEmail")
.HasAnnotation("MaxLength", 256);
b.Property<string>("NormalizedUserName")
.HasAnnotation("MaxLength", 256);
b.Property<string>("PasswordHash");
b.Property<string>("PhoneNumber");
b.Property<bool>("PhoneNumberConfirmed");
b.Property<long?>("PostalAddressId");
b.Property<string>("SecurityStamp");
b.Property<bool>("TwoFactorEnabled");
b.Property<string>("UserName")
.HasAnnotation("MaxLength", 256);
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasAnnotation("Relational:Name", "EmailIndex");
b.HasIndex("NormalizedUserName")
.HasAnnotation("Relational:Name", "UserNameIndex");
b.HasAnnotation("Relational:TableName", "AspNetUsers");
});
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
{
b.Property<string>("Id");
b.Property<bool>("Active");
b.Property<string>("DisplayName");
b.Property<string>("LogoutRedirectUri")
.HasAnnotation("MaxLength", 100);
b.Property<string>("RedirectUri");
b.Property<int>("RefreshTokenLifeTime");
b.Property<string>("Secret");
b.Property<int>("Type");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
{
b.Property<string>("Id");
b.Property<string>("ClientId")
.IsRequired()
.HasAnnotation("MaxLength", 50);
b.Property<DateTime>("ExpiresUtc");
b.Property<DateTime>("IssuedUtc");
b.Property<string>("ProtectedTicket")
.IsRequired();
b.Property<string>("Subject")
.IsRequired()
.HasAnnotation("MaxLength", 50);
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("BalanceId")
.IsRequired();
b.Property<DateTime>("ExecDate");
b.Property<decimal>("Impact");
b.Property<string>("Reason")
.IsRequired();
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<long?>("ArticleId");
b.Property<int>("Count");
b.Property<string>("Description")
.IsRequired()
.HasAnnotation("MaxLength", 512);
b.Property<long>("EstimateId");
b.Property<long?>("EstimateTemplateId");
b.Property<decimal>("UnitaryCost");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("AttachedFilesString");
b.Property<string>("AttachedGraphicsString");
b.Property<DateTime>("ClientApprouvalDate");
b.Property<string>("ClientId")
.IsRequired();
b.Property<long?>("CommandId");
b.Property<string>("CommandType");
b.Property<string>("Description");
b.Property<DateTime>("LatestValidationDate");
b.Property<string>("OwnerId")
.IsRequired();
b.Property<string>("Title");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Description");
b.Property<string>("OwnerId")
.IsRequired();
b.Property<string>("Title");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
{
b.Property<string>("SIREN");
b.HasKey("SIREN");
});
modelBuilder.Entity("Yavsc.Models.Blog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("AuthorId");
b.Property<string>("Content");
b.Property<DateTime>("Modified");
b.Property<string>("Photo");
b.Property<DateTime>("Posted")
.ValueGeneratedOnAdd()
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
b.Property<int>("Rate");
b.Property<string>("Title");
b.Property<bool>("Visible");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClientId")
.IsRequired();
b.Property<DateTime>("CreationDate")
.ValueGeneratedOnAdd()
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
b.Property<DateTime>("EventDate");
b.Property<long?>("LocationId");
b.Property<string>("PerformerId")
.IsRequired();
b.Property<decimal?>("Previsional");
b.Property<DateTime?>("ValidationDate");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Circle", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ApplicationUserId");
b.Property<string>("Name");
b.Property<string>("OwnerId");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<long>("CircleId");
b.Property<string>("MemberId")
.IsRequired();
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Contact", b =>
{
b.Property<string>("OwnerId");
b.Property<string>("UserId");
b.Property<string>("ApplicationUserId");
b.HasKey("OwnerId", "UserId");
});
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
{
b.Property<string>("DeviceId");
b.Property<DateTime>("DeclarationDate")
.ValueGeneratedOnAdd()
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
b.Property<string>("DeviceOwnerId");
b.Property<string>("GCMRegistrationId")
.IsRequired();
b.Property<string>("Model");
b.Property<string>("Platform");
b.Property<string>("Version");
b.HasKey("DeviceId");
});
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Description");
b.Property<string>("Discriminator")
.IsRequired();
b.Property<string>("Name");
b.Property<bool>("Public");
b.HasKey("Id");
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
});
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ContextId");
b.Property<string>("Description");
b.Property<string>("Name");
b.Property<bool>("Public");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
{
b.Property<string>("UserId");
b.Property<string>("AccessToken");
b.Property<DateTime>("Expiration");
b.Property<string>("ExpiresIn");
b.Property<string>("RefreshToken");
b.Property<string>("TokenType");
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
{
b.Property<long>("PostId");
b.Property<long>("TagId");
b.HasKey("PostId", "TagId");
});
modelBuilder.Entity("Yavsc.Models.Skill", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name");
b.Property<int>("Rate");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Tag", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired();
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
{
b.Property<string>("PerformerId");
b.Property<bool>("AcceptGeoLocalization");
b.Property<bool>("AcceptNotifications");
b.Property<bool>("AcceptPublicContact");
b.Property<bool>("Active");
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<int?>("MaxDailyCost");
b.Property<int?>("MinDailyCost");
b.Property<long?>("OfferId");
b.Property<long>("OrganizationAddressId");
b.Property<int>("Rate");
b.Property<string>("SIREN")
.IsRequired()
.HasAnnotation("MaxLength", 14);
b.Property<string>("WebSite");
b.HasKey("PerformerId");
});
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
{
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
b.Property<decimal>("Depth");
b.Property<decimal>("Height");
b.Property<decimal?>("Price");
b.Property<decimal>("Weight");
b.Property<decimal>("Width");
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
.WithMany()
.HasForeignKey("RoleId");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("UserId");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("UserId");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
.WithMany()
.HasForeignKey("RoleId");
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("UserId");
});
modelBuilder.Entity("Yavsc.Model.Chat.Connection", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ApplicationUserId");
});
modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b =>
{
b.HasOne("Yavsc.Location")
.WithMany()
.HasForeignKey("BillingAddressId");
});
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithOne()
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
});
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
{
b.HasOne("Yavsc.Model.Bank.BankIdentity")
.WithMany()
.HasForeignKey("BankInfoId");
b.HasOne("Yavsc.Location")
.WithMany()
.HasForeignKey("PostalAddressId");
});
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
{
b.HasOne("Yavsc.Models.AccountBalance")
.WithMany()
.HasForeignKey("BalanceId");
});
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
{
b.HasOne("Yavsc.Models.Market.BaseProduct")
.WithMany()
.HasForeignKey("ArticleId");
b.HasOne("Yavsc.Models.Billing.Estimate")
.WithMany()
.HasForeignKey("EstimateId");
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
.WithMany()
.HasForeignKey("EstimateTemplateId");
});
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
{
b.HasOne("Yavsc.Models.Booking.BookQuery")
.WithMany()
.HasForeignKey("CommandId");
});
modelBuilder.Entity("Yavsc.Models.Blog", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("AuthorId");
});
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ClientId");
b.HasOne("Yavsc.Location")
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("PerformerId");
});
modelBuilder.Entity("Yavsc.Models.Circle", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ApplicationUserId");
});
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
{
b.HasOne("Yavsc.Models.Circle")
.WithMany()
.HasForeignKey("CircleId");
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("MemberId");
});
modelBuilder.Entity("Yavsc.Models.Contact", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ApplicationUserId");
});
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
{
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("DeviceOwnerId");
});
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
{
b.HasOne("Yavsc.Models.Activity")
.WithMany()
.HasForeignKey("ContextId");
});
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
{
b.HasOne("Yavsc.Models.Blog")
.WithMany()
.HasForeignKey("PostId");
});
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
{
b.HasOne("Yavsc.Models.Activity")
.WithMany()
.HasForeignKey("ActivityCode");
b.HasOne("Yavsc.Models.Market.Service")
.WithMany()
.HasForeignKey("OfferId");
b.HasOne("Yavsc.Location")
.WithMany()
.HasForeignKey("OrganizationAddressId");
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("PerformerId");
});
}
}
}

View File

@ -0,0 +1,278 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class dropEstimateStatus : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropColumn(name: "Status", table: "Estimate");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Activity_ActivityCode",
table: "PerformerProfile",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.AddColumn<int>(
name: "Status",
table: "Estimate",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
table: "BookQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
table: "BookQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Activity_ActivityCode",
table: "PerformerProfile",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

View File

@ -372,8 +372,6 @@ namespace Yavsc.Migrations
b.Property<string>("OwnerId")
.IsRequired();
b.Property<int?>("Status");
b.Property<string>("Title");
b.HasKey("Id");

View File

@ -1,13 +1,14 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
namespace Yavsc.Models.Billing
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Yavsc.Interfaces;
using Yavsc.Interfaces.Workflow;
using Yavsc.Models.Booking;
using Interfaces;
using Models.Booking;
public partial class Estimate : IEstimate
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]

View File

@ -209,6 +209,7 @@
<data name="ExistantDB"><value>Base de données éxistante</value></data>
<data name="External Logins"><value>Inscriptions externes</value></data>
<data name="FillInAFutureDate"><value>Veuillez, s'il vous plait, utiliser une date future.</value></data>
<data name="Fill in your Bank Info"><value>Saisir vos coordonées bancaires</value></data>
<data name="Fill in your book query"><value>Saisissez votre demande de rendez-vous</value></data>
<data name="Forbidden"><value>Contenu à accès restreint</value></data>
<data name="Forgot your password?"><value>Mot de passe perdu?</value></data>

View File

@ -0,0 +1,24 @@
namespace Yavsc.ViewModels.Manage
{
using Model.Bank;
public class AddBankInfoViewModel
{
public BankIdentity Data{get; private set; }
public AddBankInfoViewModel(BankIdentity data)
{
this.Data = data;
}
public bool IsValid { get {
return ByIbanBIC || ByAccountNumber ;
}}
public bool ByIbanBIC { get { 
return (Data.BIC != null && Data.IBAN != null) ;
}}
public bool ByAccountNumber { 
get { 
return (Data.BankCode != null && Data.WicketCode != null && Data.AccountNumber != null && Data.BankedKey >0);
}
}
}
}

View File

@ -1,5 +1,6 @@
using System.Collections.Generic;
using Microsoft.AspNet.Identity;
using Yavsc.Model.Bank;
using Yavsc.Models;
namespace Yavsc.ViewModels.Manage
@ -35,5 +36,7 @@ namespace Yavsc.ViewModels.Manage
public string FullName { get; set; }
public string PostalAddress { get; set; }
public BankIdentity BankInfo { get; set; }
}
}

View File

@ -35,6 +35,10 @@
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
<a asp-action="Edit" asp-route-id="@Model.Id">@SR["Edit"]</a> |
<a asp-action="Index">@SR["Back to List"]</a> |
@{ var filenametex = $"estimate-{Model.Id}.tex" ;
var filenamepdf = $"estimate-{Model.Id}.pdf" ;}
<a href="~/do/@filenametex" >Export au format LaTeX</a>
<a href="~/do/@filenamepdf" >Export au format LaTeX</a>
</p>

View File

@ -1,9 +1,14 @@
@model Estimate
@using Yavsc.Helpers
@{
Layout = null;
var pro = Model.Query.PerformerProfile;
var from = Model.Query.PerformerProfile.Performer;
var to = Model.Query.Client;
var PostalAddress = (to.PostalAddress!=null) ? to.PostalAddress.Address.Replace("\n","\\\\\n") : null ;
var proaddr = Model.Query?.PerformerProfile.OrganizationAddress.Address;
var proaddrn = (proaddr!=null) ? proaddr.NewLinesWith("\\\\\n") : null ;
var proaddrm = (proaddr!=null) ? proaddr.NewLinesWith(" - ") : null ;
}
\documentclass[french,11pt]{article}
\usepackage{babel}
@ -62,7 +67,7 @@
\def\FactureNum {@Model.Id.ToString()} % Numéro de facture
\def\FactureAcquittee {non} % Facture acquittée : oui/non
\def\FactureLieu {@Model.Query.PerformerProfile.OrganizationAddress} % Lieu de l'édition de la facture
\def\FactureLieu {@proaddrn} % Lieu de l'édition de la facture
\def\FactureObjet {Facture : @Model.Title} % Objet du document
% Description de la facture
\def\FactureDescr {
@ -70,18 +75,16 @@
}
% Infos Client
\def\ClientNom{@ViewBag.To.UserName} % Nom du client
\def\ClientNom{@to.UserName} % Nom du client
\def\ClientAdresse{
% Adresse du client
@if (ViewBag.To.PostalAddress!=null) {
@ViewBag.To.PostalAddress.Address.Replace("\n","\\\\\n")
}
@if (!string.IsNullOrWhiteSpace(ViewBag.To.PhoneNumber)) {<text>
\\ Téléphone fixe: @ViewBag.To.PhoneNumber
@if (!string.IsNullOrWhiteSpace(PostalAddress)) {
<text> @PostalAddress\\</text> }
@if (!string.IsNullOrWhiteSpace(to.PhoneNumber)) {<text>
@to.PhoneNumber <text>\\</text>
</text>}
@if (!string.IsNullOrWhiteSpace(ViewBag.To.Email)) {<text>
\\ E-mail: @ViewBag.To.Email </text>}
E-mail: @to.Email
}
% Liste des produits facturés : Désignation, prix
@ -106,12 +109,10 @@
\setlength{\parindent}{0pt}
\renewcommand{\headrulewidth}{0pt}
\cfoot{
@if (!string.IsNullOrWhiteSpace(ViewBag.From.UserName)) { @ViewBag.From.UserName }
@if (!string.IsNullOrWhiteSpace(ViewBag.From.PostalAddress)) { <text> - @ViewBag.From.PostalAddress.Address </text> } } \newline
\small{
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { <text> E-mail: @ViewBag.From.Email </text> }
@if (!string.IsNullOrWhiteSpace(ViewBag.From.PhoneNumber)) { <text> - Téléphone fixe: @ViewBag.From.PhoneNumber </text> }
\cfoot{ @if (!string.IsNullOrWhiteSpace(from.UserName)) { @from.UserName }
@if (!string.IsNullOrWhiteSpace(proaddrm)) { <text> - @proaddrm </text> } \newline
\small{ E-mail: @from.Email
@if (!string.IsNullOrWhiteSpace(from.PhoneNumber)) { <text> - Téléphone fixe: @from.PhoneNumber </text> }
}
}
@ -125,7 +126,7 @@
}
% Nom et adresse de la société
@from.UserName \\
@pro.OrganizationAddress.Address
@proaddrn
Facture n°\FactureNum

View File

@ -1,91 +0,0 @@
\geometry{verbose,tmargin=4em,bmargin=8em,lmargin=6em,rmargin=6em}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\thispagestyle{fancy}
\pagestyle{fancy}
\setlength{\parindent}{0pt}
\renewcommand{\headrulewidth}{0pt}
\cfoot{
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Name)) { @ViewBag.From.Name }
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Address)) { <text> - @ViewBag.From.Address </text> }
@if (!string.IsNullOrWhiteSpace(ViewBag.From.CityAndState)) { <text> - @ViewBag.From.CityAndState </text> } \newline
\small{
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Email)) { <text> E-mail: @ViewBag.From.Email </text> }
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Mobile)) { <text> - Téléphone mobile: @ViewBag.From.Mobile </text> }
@if (!string.IsNullOrWhiteSpace(ViewBag.From.Phone)) { <text> - Téléphone fixe: @ViewBag.From.Phone </text> }
}
}
\begin{document}
% Logo de la société
%\includegraphics{logo.jpg}
% Nom et adresse de la société
from.Name \\
from.Address \\
from.ZipCode from.CityAndState\\
Facture n°\FactureNum
{\addtolength{\leftskip}{10.5cm} %in ERT
\textbf{\ClientNom} \\
\ClientAdresse \\
} %in ERT
\hspace*{10.5cm}
\FactureLieu, le \today
~\\~\\
\textbf{Objet : \FactureObjet \\}
\textnormal{\FactureDescr}
~\\
\begin{center}
\begin{tabular}{lrrr}
\textbf{Désignation ~~~~~~} & \textbf{Prix unitaire} & \textbf{Quantité} & \textbf{Montant (EUR)} \\
\hline
\AfficheResultat{}
\end{tabular}
\end{center}
\begin{flushright}
\textit{Auto entreprise en franchise de TVA}\\
\end{flushright}
~\\
\ifthenelse{\equal{\FactureAcquittee}{oui}}{
Facture acquittée.
}{
À régler par chèque ou par virement bancaire :
\begin{center}
\begin{tabular}{|c c c c|}
if (!string.IsNullOrWhiteSpace(from.BankCode) && !string.IsNullOrWhiteSpace(from.WicketCode)
&& !string.IsNullOrWhiteSpace(from.AccountNumber) ) {
\hline \textbf{Code banque} & \textbf{Code guichet} & \textbf{N° de Compte} & \textbf{Clé RIB} \\
from.BankCode & from.WicketCode & from.AccountNumber & from.BankedKey \\
}
if (!string.IsNullOrWhiteSpace(from.IBAN) && !string.IsNullOrWhiteSpace(from.BIC)) {
\hline \textbf{IBAN N°} & \multicolumn{3}{|l|}{ from.IBAN } \\
\hline \textbf{Code BIC} & \multicolumn{3}{|l|}{ from.BIC }
} \\
\hline
\end{tabular}
\end{center}
}
\end{document}

View File

@ -0,0 +1,65 @@
@model Yavsc.ViewModels.Manage.AddBankInfoViewModel
@{
ViewData["Title"] = SR["Fill in your Bank Info"];
}
<h2>@ViewData["Title"].</h2>
<form asp-controller="Manage" asp-action="AddBankInfo" method="post" class="form-horizontal" role="form">
<h4>Vous pouvez valider vos coordonnée bancaire ci après.</h4>
<hr />
<div asp-validation-summary="ValidationSummary.All" class="text-danger"></div>
<fieldset>
<div class="form-group">
<label asp-for="Data.BIC" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Data.BIC" class="form-control" />
<span asp-validation-for="Data.BIC" class="text-danger"></span>
</div>
<label asp-for="Data.IBAN" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Data.IBAN" class="form-control" />
<span asp-validation-for="Data.IBAN" class="text-danger"></span>
</div>
</div>
</fieldset>
<fieldset>
<div class="form-group">
<label asp-for="Data.AccountNumber" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Data.AccountNumber" class="form-control" />
<span asp-validation-for="Data.AccountNumber" class="text-danger"></span>
</div>
<label asp-for="Data.BankCode" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Data.BankCode" class="form-control" />
<span asp-validation-for="Data.BankCode" class="text-danger"></span>
</div>
<label asp-for="Data.WicketCode" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Data.WicketCode" class="form-control" />
<span asp-validation-for="Data.WicketCode" class="text-danger"></span>
</div>
<label asp-for="Data.BankedKey" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Data.BankedKey" class="form-control" />
<span asp-validation-for="Data.BankedKey" class="text-danger"></span>
</div>
</div>
</fieldset>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<button type="submit" class="btn btn-default">Enregistrer ces informations bancaires</button>
</div>
</div>
</form>
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}

View File

@ -28,12 +28,11 @@
else
{<a asp-controller="Manage"
asp-action="SetPassword">@SR["Create"]</a>}]</dd>
<dt>@SR["External Logins"]:</dt>
<dd>
@Model.Logins.Count [<a asp-controller="Manage" asp-action="ManageLogins">@SR["Manage"]</a>]
</dd>
<dt>@SR["Full name"]:</dt>
<dd>@Model.FullName [<a asp-controller="Manage" asp-action="SetFullName"
@ -56,7 +55,11 @@
[<a asp-controller="Manage" asp-action="SetActivity"
>@SR[@Model.Activity==null?"Set":"Modify settings"]</a>]
</dd>
<dt>@SR["Bank info"]:</dt>
<dd>@Html.DisplayFor(m => m.BankInfo) [<a asp-controller="Manage" asp-action="AddBankInfo"
>@SR[@Model.BankInfo==null?"Set":"Modify"]</a>]</dd>
<dt>@SR["YourPosts"]:</dt>
<dd>@Model.PostsCounter
[<a asp-controller="Blogspot" asp-action="UserPosts"