Files
Backend-Api/Company.Domain/ContarctingPartyAgg/PersonalContractingParty.cs
2025-03-16 18:45:50 +03:30

197 lines
5.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using _0_Framework.Domain;
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; }
#endregion
public List<Employer> Employers { get; private set; }
public Representative Representative { 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)
{
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;
}
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)
{
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;
}
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;
}
}