1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
| @model LivDevis.Models.CustomerModel
@using LivDevis.Helpers
@using LivDevis.Models
@{
ViewBag.Title = "Create";
Layout = "~/Views/Shared/_Authentificated/Layout.cshtml";
List<CountryModel> Countries = ViewBag.Countries;
List<CultureModel> Cultures = ViewBag.Cultures;
}
@section css {
@Styles.Render("~/Content/_Authentificated/Customer/Create")
}
@section jquery {
@Scripts.Render("~/bundles/jqueryval")
}
@section Scripts {
@Scripts.Render("~/bundles/_Authentificated/Customer/Create")
}
@section featured {
}
<section id="info">
@using (Html.BeginForm("Create", "Customer", FormMethod.Post, new { autocomplete = "off", @id = "CreateCustomer" })) {
@Html.ValidationSummary(true)
<fieldset>
<legend>Sélectionner une société</legend>
<div class="editor-field">
@Html.TextBox("Company", null, new { PlaceHolder = LivDevis.Resources.Models.AccountModel.DisplayCompany })
@Html.HiddenFor(model => model.Company.CompanyID)
<button id="AddCompanyButton" class="action"></button>
<button id="ResetCompanyButton" class="action"></button>
</div>
</fieldset>
<div id="AddCompanyForm">
<fieldset>
<legend>Ajouter les informations sur la société</legend>
<article>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.CompanyName, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayCompanyName })
@*@Html.ValidationMessageFor(model => model.Company.CompanyName)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.Address1, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayAddress1 })
@*@Html.ValidationMessageFor(model => model.Company.Address1)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.Address2, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayAddress2 })
@*@Html.ValidationMessageFor(model => model.Company.Address2)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.Address3, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayAddress3 })
@*@Html.ValidationMessageFor(model => model.Company.Address3)*@
</div>
</article>
<article>
<div class="editor-label">
@Html.LabelFor(model => model.Company.Country)
</div>
<div class="editor-field">
@Html.DropDownListFor(model => model.Company.CountryID, new SelectList(Countries, "CountryID", "Flag", null))
</div>
<div class="editor-field">
@Html.TextBox("Localization", null, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayLocalization })
@Html.HiddenFor(model => model.Company.LocalizationID)
@*@Html.ValidationMessageFor(model => model.Company.Localization)*@
</div>
</article>
</fieldset>
<fieldset>
<legend>Ajouter les informations complémentaires</legend>
<article>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.Type, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayType })
@*@Html.ValidationMessageFor(model => model.Company.Type)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.ShareCapital, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayShareCapital })
@*@Html.ValidationMessageFor(model => model.Company.ShareCapital)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.TVANumber, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayTVANumber })
@*@Html.ValidationMessageFor(model => model.Company.TVANumber)*@
</div>
</article>
<article>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.Siret, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplaySiret })
@*@Html.ValidationMessageFor(model => model.Company.Siret)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.NafCode, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayNafCode })
@*@Html.ValidationMessageFor(model => model.Company.NafCode)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Company.RCS, new { PlaceHolder = LivDevis.Resources.Models.CompanyModel.DisplayRCS })
@*@Html.ValidationMessageFor(model => model.Company.RCS)*@
</div>
</article>
</fieldset>
</div>
<fieldset>
<legend>Ajouter les informations sur le client</legend>
<article>
<div class="editor-field">
<div id="Civility">
@{
int i = 0;
foreach (Enum c in Enum.GetValues(typeof(Civility)))
{
string _id = string.Concat("civility-", c);
string _description = c.Description();
switch (i == 0)
{
case true:
@Html.RadioButtonFor(model => model.Civility, c, new { id = _id, @checked = "checked" })
break;
case false:
@Html.RadioButtonFor(model => model.Civility, c, new { id = _id })
break;
}
@Html.LabelFor(model => model, _description, new { @for = _id })
i++;
}
}
</div>
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.FirstName, new { placeholder = LivDevis.Resources.Models.AccountModel.DisplayFirstName })
@*@Html.ValidationMessageFor(model => model.FirstName)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.LastName, new { placeholder = LivDevis.Resources.Models.AccountModel.DisplayLastName })
@*@Html.ValidationMessageFor(model => model.LastName)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Email, new { placeholder = LivDevis.Resources.Models.AccountModel.DisplayEmail })
@*@Html.ValidationMessageFor(model => model.Email)*@
</div>
<div class="editor-field">
@Html.PasswordFor(model => model.Password, new { placeholder = LivDevis.Resources.Models.AccountModel.DisplayPassword })
@*@Html.ValidationMessageFor(model => model.Password)*@
</div>
</article>
<article>
<div class="editor-field">
@Html.TextBoxFor(model => model.Phone, new { placeholder = LivDevis.Resources.Models.AccountModel.DisplayPhone })
@*@Html.ValidationMessageFor(model => model.Phone)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.MobilePhone, new { placeholder = LivDevis.Resources.Models.AccountModel.DisplayMobilePhone })
@*@Html.ValidationMessageFor(model => model.MobilePhone)*@
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.Fax, new { placeholder = LivDevis.Resources.Models.AccountModel.DisplayFax })
@*@Html.ValidationMessageFor(model => model.Fax)*@
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Culture)
</div>
<div class="editor-field">
@Html.DropDownListFor(model => model.Culture.CultureID, new SelectList(Cultures, "CultureID", "CultureID", null))
</div>
</article>
<p>
<input type="submit" value="@LivDevis.Resources.Views.Account.SignUp.ButtonCreateAccount" class="button blue" />
</p>
</fieldset>
}
</section> |