* New features:
- New Client at estimation, ala ajax - Admins can now edit user's profiles
This commit is contained in:
parent
d9728c5998
commit
0755dd62b3
33 changed files with 634 additions and 234 deletions
|
|
@ -168,28 +168,45 @@ namespace Yavsc.Model.RolesAndMembers
|
|||
/// Gets a value indicating whether this instance has bank account.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance has bank account; otherwise, <c>false</c>.</value>
|
||||
public bool HasBankAccount { get {
|
||||
return IsBillable
|
||||
&& !string.IsNullOrWhiteSpace (BankCode)
|
||||
&& !string.IsNullOrWhiteSpace (BIC)
|
||||
&& !string.IsNullOrWhiteSpace (IBAN)
|
||||
&& !string.IsNullOrWhiteSpace (WicketCode)
|
||||
&& !string.IsNullOrWhiteSpace (AccountNumber)
|
||||
&& BankedKey != 0; } }
|
||||
public bool HasBankAccount {
|
||||
get {
|
||||
return !(
|
||||
(
|
||||
string.IsNullOrWhiteSpace (BankCode)
|
||||
|| string.IsNullOrWhiteSpace (WicketCode)
|
||||
|| string.IsNullOrWhiteSpace (AccountNumber)
|
||||
|| BankedKey == 0
|
||||
)
|
||||
&&
|
||||
( string.IsNullOrWhiteSpace (BIC)
|
||||
|| string.IsNullOrWhiteSpace (IBAN))
|
||||
); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is billable.
|
||||
/// Returns true when
|
||||
/// Name is not null and all of
|
||||
/// Address, CityAndState and ZipCode are not null,
|
||||
/// or one of Email or Phone or Mobile is not null
|
||||
///
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is billable; otherwise, <c>false</c>.</value>
|
||||
public bool IsBillable {
|
||||
get {
|
||||
// true if
|
||||
// Name is not null and
|
||||
// (
|
||||
// (Address and CityAndState and ZipCode)
|
||||
// or Email or Phone or Mobile
|
||||
// )
|
||||
return !string.IsNullOrWhiteSpace (Name)
|
||||
&& !string.IsNullOrWhiteSpace (Address)
|
||||
&& !string.IsNullOrWhiteSpace (CityAndState)
|
||||
&& !string.IsNullOrWhiteSpace (ZipCode)
|
||||
&& !string.IsNullOrWhiteSpace (Email)
|
||||
&& !(string.IsNullOrWhiteSpace (Phone) &&
|
||||
string.IsNullOrWhiteSpace (Mobile));
|
||||
&& !( (
|
||||
string.IsNullOrWhiteSpace (Address)
|
||||
|| string.IsNullOrWhiteSpace (CityAndState)
|
||||
|| string.IsNullOrWhiteSpace (ZipCode))
|
||||
&& string.IsNullOrWhiteSpace (Email)
|
||||
&& string.IsNullOrWhiteSpace (Phone)
|
||||
&& string.IsNullOrWhiteSpace (Mobile));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
71
yavscModel/RolesAndMemebers/RegisterClientModel.cs
Normal file
71
yavscModel/RolesAndMemebers/RegisterClientModel.cs
Normal file
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -55,8 +55,15 @@ namespace Yavsc.Model.RolesAndMembers
|
|||
[Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is approuved.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is approuved; otherwise, <c>false</c>.</value>
|
||||
public bool IsApprouved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.Model.RolesAndMembers.RegisterModel"/> class.
|
||||
/// </summary>
|
||||
public RegisterModel()
|
||||
{
|
||||
IsApprouved = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue