using Sevomin.Models.Helpers;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Sevomin.Models
|
|
{
|
|
public class AvalinViewModel
|
|
{
|
|
public string DisplayName
|
|
{
|
|
get
|
|
{
|
|
return CompanyName;
|
|
}
|
|
}
|
|
|
|
[Required]
|
|
[DisplayName("نام شرکت")]
|
|
public string CompanyName { get; set; }
|
|
|
|
[StringLength(12)]
|
|
[DisplayName("شناسه ملی")]
|
|
public string NationalId { get; set; }
|
|
|
|
[StringLength(10)]
|
|
[DisplayName("شماره ثبت")]
|
|
public string RegisterId { get; set; }
|
|
|
|
[DisplayName("آدرس")]
|
|
public string Address { get; set; }
|
|
|
|
[DisplayName("شماره تماس")]
|
|
public string CompanyPhoneNumber { get; set; }
|
|
|
|
[RegularExpression(@"^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-zA-Z0-9]{1}[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9]{1})|[a-zA-Z])\.)+[a-zA-Z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$", ErrorMessage = "لطفا ایمیل معتبر وارد کنید.")]
|
|
[DisplayName("ایمیل")]
|
|
public string EMail { get; set; }
|
|
|
|
public AvalinViewModel(Avalin avalin)
|
|
{
|
|
CompanyName = avalin.CompanyName;
|
|
NationalId = avalin.NationalId;
|
|
RegisterId = avalin.RegisterId;
|
|
Address = avalin.Address;
|
|
CompanyPhoneNumber = avalin.CompanyPhoneNumber;
|
|
EMail = avalin.Email;
|
|
}
|
|
}
|
|
}
|