264 lines
7.8 KiB
C#
264 lines
7.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Security.Cryptography.X509Certificates;
|
|
using _0_Framework.Application;
|
|
using _0_Framework.Domain;
|
|
using Company.Domain.ContractingPartyBankAccountsAgg;
|
|
using Company.Domain.empolyerAgg;
|
|
using Company.Domain.RepresentativeAgg;
|
|
|
|
namespace Company.Domain.ContarctingPartyAgg;
|
|
|
|
public class PersonalContractingParty : EntityBase
|
|
{
|
|
//public long Id { get; private set; }
|
|
public string FName { get; private set; }
|
|
public string LName { get; private set; }
|
|
public string SureName { get; private set; }
|
|
public long RepresentativeId { get; private set; }
|
|
public string RepresentativeFullName { get; private set; }
|
|
|
|
public string Nationalcode { get; private set; }
|
|
|
|
public string IdNumber { get; private set; }
|
|
|
|
|
|
//public string LegalName { get; set; }
|
|
|
|
public string RegisterId { get; private set; }
|
|
|
|
public string NationalId { get; private set; }
|
|
|
|
public string IsLegal { get; private set; }
|
|
public string Phone { get; private set; }
|
|
|
|
public string AgentPhone { get; private set; }
|
|
|
|
public string State { get; private set; }
|
|
public string City { get; private set; }
|
|
public string Zone { get; private set; }
|
|
|
|
public string Address { get; private set; }
|
|
|
|
public int ArchiveCode { get; private set; }
|
|
|
|
public string IsActiveString { get; private set; }
|
|
public string IsBlock { get; private set; }
|
|
|
|
public int BlockTimes {get; private set; }
|
|
|
|
#region NewProps
|
|
|
|
/// <summary>
|
|
/// سری شناسنامه
|
|
/// </summary>
|
|
public string IdNumberSeri { get; private set; }
|
|
|
|
/// <summary>
|
|
/// سریال شناسنامه
|
|
/// </summary>
|
|
public string IdNumberSerial { get; private set; }
|
|
|
|
/// <summary>
|
|
/// نام پدر
|
|
/// </summary>
|
|
public string FatherName { get; private set; }
|
|
|
|
/// <summary>
|
|
/// تاریخ تولد
|
|
/// </summary>
|
|
public DateTime? DateOfBirth { get; private set; }
|
|
|
|
/// <summary>
|
|
/// آیا از طریق ای پی ای احراز هویت شده است
|
|
/// </summary>
|
|
public bool IsAuthenticated { get; private set; }
|
|
|
|
/// <summary>
|
|
/// جنسیت
|
|
/// </summary>
|
|
public Gender Gender { get; private set; }
|
|
|
|
/// <summary>
|
|
/// سمت و صاحب امضاء اوراق (فقط برای طرف حقوقی)
|
|
/// </summary>
|
|
public string LegalPosition { get; private set; }
|
|
|
|
/// <summary>
|
|
/// نام مدیر عامل (فقط برای طرف حقوقی)
|
|
/// </summary>
|
|
public string CeoFName { get; private set; }
|
|
|
|
/// <summary>
|
|
/// نام خانوادگی مدیر عامل (فقط برای طرف حقوقی)
|
|
/// </summary>
|
|
public string CeoLName { get; private set; }
|
|
|
|
#endregion
|
|
|
|
|
|
public List<Employer> Employers { get; private set; }
|
|
public Representative Representative { get; set; }
|
|
public List<ContractingPartyBankAccount> ContractingPartyBankAccounts { get; set; }
|
|
|
|
public PersonalContractingParty()
|
|
{
|
|
|
|
Employers = new List<Employer>();
|
|
}
|
|
public PersonalContractingParty(string fName, string lName, string nationalcode, string idNumber,
|
|
/*string legalName,*/ string registerId, string nationalId, string isLegal,
|
|
string phone, string agentPhone, string address,long representativeId,
|
|
string representativeFullName, int archiveCode, string state,string city,
|
|
string zone, string sureName,string ceoFName,string ceoLName,string legalPosition=null)
|
|
{
|
|
|
|
FName = fName;
|
|
LName = lName;
|
|
SureName = sureName;
|
|
Nationalcode = nationalcode;
|
|
IdNumber = idNumber;
|
|
//LegalName = legalName;
|
|
RegisterId = registerId;
|
|
NationalId = nationalId;
|
|
IsLegal = isLegal;
|
|
Phone = phone;
|
|
AgentPhone = agentPhone;
|
|
Address = address;
|
|
RepresentativeId = representativeId;
|
|
RepresentativeFullName = representativeFullName;
|
|
ArchiveCode = archiveCode;
|
|
|
|
State = state;
|
|
City = city;
|
|
Zone = zone;
|
|
SureName = sureName;
|
|
IsActiveString = "true";
|
|
IsBlock = "false";
|
|
BlockTimes = 0;
|
|
LegalPosition = legalPosition;
|
|
CeoFName = ceoFName;
|
|
CeoLName = ceoLName;
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Edit(string fName, string lName, string nationalcode, string idNumber,
|
|
string phone, string agentPhone, string address, long representativeId, string representativeFullName, int archiveCode, string state, string city, string zone, string sureName)
|
|
{
|
|
|
|
FName = fName;
|
|
LName = lName;
|
|
|
|
SureName = sureName;
|
|
Nationalcode = nationalcode;
|
|
IdNumber = idNumber;
|
|
Phone = phone;
|
|
AgentPhone = agentPhone;
|
|
Address = address;
|
|
RepresentativeId = representativeId;
|
|
RepresentativeFullName = representativeFullName;
|
|
ArchiveCode = archiveCode;
|
|
|
|
State = state;
|
|
City = city;
|
|
Zone = zone;
|
|
|
|
}
|
|
|
|
public void EditLegal(string lName, string registerId, string nationalId, string phone, string agentPhone, string address, long representativeId, string representativeFullName, int archiveCode,
|
|
string state, string city, string zone, string sureName,string legalPosition = null)
|
|
{
|
|
|
|
LName = lName;
|
|
SureName = sureName;
|
|
RegisterId = registerId;
|
|
NationalId = nationalId;
|
|
Phone = phone;
|
|
AgentPhone = agentPhone;
|
|
Address = address;
|
|
RepresentativeId = representativeId;
|
|
RepresentativeFullName = representativeFullName;
|
|
ArchiveCode = archiveCode;
|
|
|
|
State = state;
|
|
City = city;
|
|
Zone = zone;
|
|
if (legalPosition != null)
|
|
LegalPosition = legalPosition;
|
|
|
|
|
|
}
|
|
|
|
public void Edit2(string address)
|
|
{
|
|
Address = address;
|
|
}
|
|
|
|
public void Active()
|
|
{
|
|
|
|
this.IsActiveString = "true";
|
|
}
|
|
|
|
public void Block()
|
|
{
|
|
this.IsBlock = "true";
|
|
}
|
|
public void DisableBlock(int blockTimes)
|
|
{
|
|
this.BlockTimes = blockTimes;
|
|
this.IsBlock = "false";
|
|
}
|
|
|
|
public void DeActive()
|
|
{
|
|
this.IsActiveString = "false";
|
|
}
|
|
|
|
public void Authenticated()
|
|
{
|
|
IsAuthenticated = true;
|
|
}
|
|
|
|
public void Authentication(string fName, string lName, string fatherName,string idNumber,
|
|
string idNumberSeri, string idNumberSerial, string dateOfBirth, Gender gender,string phone)
|
|
{
|
|
this.FName = fName;
|
|
this.LName = lName;
|
|
this.FatherName = fatherName;
|
|
this.IdNumberSeri = idNumberSeri;
|
|
this.IdNumberSerial = idNumberSerial;
|
|
this.DateOfBirth = !string.IsNullOrWhiteSpace(dateOfBirth) ? dateOfBirth.ToGeorgianDateTime() : null;
|
|
this.IdNumber = idNumber;
|
|
this.Gender = gender;
|
|
this.IsAuthenticated = true;
|
|
Phone = phone;
|
|
}
|
|
|
|
public void LegalAuthentication(string fName, string lName, string fatherName,string idNumber, string idNumberSeri,
|
|
string idNumberSerial, string dateOfBirth, Gender gender,string phone)
|
|
{
|
|
CeoFName = fName;
|
|
CeoLName = lName;
|
|
this.FatherName = fatherName;
|
|
this.IdNumberSeri = idNumberSeri;
|
|
this.IdNumberSerial = idNumberSerial;
|
|
this.DateOfBirth = !string.IsNullOrWhiteSpace(dateOfBirth) ? dateOfBirth.ToGeorgianDateTime() : null;
|
|
this.IdNumber = idNumber;
|
|
this.Gender = gender;
|
|
this.IsAuthenticated = true;
|
|
Phone = phone;
|
|
}
|
|
|
|
public void RegisterComplete(string fatherName, string idNumberSeri, string idNumberSerial, DateTime dateOfBirth, Gender gender)
|
|
{
|
|
this.FatherName = fatherName;
|
|
this.IdNumberSeri = idNumberSeri;
|
|
this.IdNumberSerial = idNumberSerial;
|
|
this.DateOfBirth = dateOfBirth;
|
|
this.Gender = gender;
|
|
this.IsAuthenticated = true;
|
|
}
|
|
} |