* New features:
- New Client at estimation, ala ajax - Admins can now edit user's profilesvnext
parent
d9728c5998
commit
0755dd62b3
Binary file not shown.
After Width: | Height: | Size: 172 B |
@ -1,8 +1,25 @@
|
||||
<%@ Page Title="My estimates" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Estimate>>" %>
|
||||
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<% foreach (Estimate estim in Model) { %>
|
||||
<%= Html.ActionLink(estim.Id.ToString(),"Estimate",new {Id=estim.Id}) %>
|
||||
<% if (((int)ViewData["ResponsibleCount"])>0) { %>
|
||||
<div>
|
||||
Les estimations que vous avez faites (<%=ViewData["ResponsibleCount"]%>):<br>
|
||||
<%
|
||||
foreach (Estimate estim in Model) {
|
||||
if (string.Compare(estim.Responsible,(string) ViewData["UserName"])==0) { %>
|
||||
|
||||
<%= Html.ActionLink("Titre:"+estim.Title+" Client:"+estim.Client+" Id:"+estim.Id.ToString(),"Estimate",new {Id=estim.Id}) %>
|
||||
<br>
|
||||
<% }}%>
|
||||
</div>
|
||||
<% } %>
|
||||
</asp:Content>
|
||||
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
|
||||
<div>
|
||||
Vos estimations <% if (((int)ViewData["ResponsibleCount"])>0) { %>
|
||||
en tant que client
|
||||
<% } %> (<%=ViewData["ClientCount"]%>):<br>
|
||||
<% foreach (Estimate estim in Model) {
|
||||
if (string.Compare(estim.Client,(string)ViewData["UserName"])==0) { %>
|
||||
<%= Html.ActionLink("Titre:"+estim.Title+" Responsable:"+estim.Responsible+" Id:"+estim.Id.ToString(),"Estimate",new {Id=estim.Id}) %>
|
||||
<br>
|
||||
<% }} %>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
@ -0,0 +1,72 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<RegisterClientModel>" %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<% using(Html.BeginForm("Register")) %>
|
||||
<% { %>
|
||||
<h1>Nouvel utilisateur</h1>
|
||||
<table class="layout">
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.Name) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "Name" ) %>
|
||||
<%= Html.ValidationMessage("Name", "*", new { @id="Err_ur_Name", @class="error" }) %></td></tr>
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.UserName) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "UserName" ) %>
|
||||
<%= Html.ValidationMessage("UserName", "*", new { @id="Err_ur_UserName", @class="error" }) %></td></tr>
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.Password) %>
|
||||
</td><td>
|
||||
<%= Html.Password( "Password" ) %>
|
||||
<%= Html.ValidationMessage("Password", "*", new { @id="Err_ur_Password", @class="error" }) %>
|
||||
</td></tr>
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.Email) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "Email" ) %>
|
||||
<%= Html.ValidationMessage("Email", "*", new { @id="Err_ur_Email", @class="error" }) %>
|
||||
</td></tr>
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.Address) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "Address" ) %>
|
||||
<%= Html.ValidationMessage("Address", "*", new { @id="Err_ur_Address", @class="error" }) %></td></tr>
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.CityAndState) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "CityAndState" ) %>
|
||||
<%= Html.ValidationMessage("CityAndState", "*", new { @id="Err_ur_CityAndState", @class="error" }) %>
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.ZipCode) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "ZipCode" ) %>
|
||||
<%= Html.ValidationMessage("ZipCode", "*", new { @id="Err_ur_ZipCode", @class="error" }) %></td></tr>
|
||||
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.Phone) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "Phone" ) %>
|
||||
<%= Html.ValidationMessage("Phone", "*", new { @id="Err_ur_Phone", @class="error" }) %></td></tr>
|
||||
|
||||
<tr><td align="right">
|
||||
<%= Html.LabelFor(model => model.Mobile) %>
|
||||
</td><td>
|
||||
<%= Html.TextBox( "Mobile" ) %>
|
||||
<%= Html.ValidationMessage("Mobile", "*", new { @id="Err_ur_Mobile", @class="error" }) %></td></tr>
|
||||
|
||||
</table>
|
||||
<input type="button" id="btnnewuser" class="actionlink" value="Enregistrer">
|
||||
<% } %>
|
||||
|
||||
|
||||
|
||||
|
@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
/// <summary>
|
||||
/// Register page.
|
||||
/// </summary>
|
||||
public class RegisterPage : System.Web.Mvc.ViewPage<RegisterViewModel>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.RegisterPage"/> class.
|
||||
/// </summary>
|
||||
public RegisterPage ()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// The createuserwizard1.
|
||||
/// </summary>
|
||||
public CreateUserWizard Createuserwizard1;
|
||||
/// <summary>
|
||||
/// Raises the register send mail event.
|
||||
/// </summary>
|
||||
/// <param name="sender">Sender.</param>
|
||||
/// <param name="e">E.</param>
|
||||
public void OnRegisterSendMail(object sender, MailMessageEventArgs e)
|
||||
{
|
||||
// Set MailMessage fields.
|
||||
e.Message.IsBodyHtml = false;
|
||||
e.Message.Subject = "New user on Web site.";
|
||||
// Replace placeholder text in message body with information
|
||||
// provided by the user.
|
||||
e.Message.Body = e.Message.Body.Replace("<%PasswordQuestion%>", Createuserwizard1.Question);
|
||||
e.Message.Body = e.Message.Body.Replace("<%PasswordAnswer%>", Createuserwizard1.Answer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
//
|
||||
// RegisterClientModel.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Register client model.
|
||||
/// </summary>
|
||||
public class RegisterClientModel : RegisterModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the full name.
|
||||
/// </summary>
|
||||
/// <value>The full name.</value>
|
||||
[DisplayName("Nom complet")]
|
||||
[Required(ErrorMessage="S'il vous plait, saisissez le nom complet")]
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the address.
|
||||
/// </summary>
|
||||
/// <value>The address.</value>
|
||||
[DisplayName("Addresse")]
|
||||
public string Address { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the state of the city and.
|
||||
/// </summary>
|
||||
/// <value>The state of the city and.</value>
|
||||
[DisplayName("Ville")]
|
||||
public string CityAndState { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the zip code.
|
||||
/// </summary>
|
||||
/// <value>The zip code.</value>
|
||||
[DisplayName("Code postal")]
|
||||
public string ZipCode { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the phone.
|
||||
/// </summary>
|
||||
/// <value>The phone.</value>
|
||||
[DisplayName("Téléphone fixe")]
|
||||
public string Phone { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the mobile.
|
||||
/// </summary>
|
||||
/// <value>The mobile.</value>
|
||||
[DisplayName("Téléphone mobile")]
|
||||
public string Mobile { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue