117 lines
3.2 KiB
C#
117 lines
3.2 KiB
C#
using System.Collections.Generic;
|
|
using _0_Framework.Domain;
|
|
using Company.Domain.ContarctingPartyAgg;
|
|
using Company.Domain.FileEmployeeAgg;
|
|
using Company.Domain.FileEmployerAgg;
|
|
|
|
namespace Company.Domain.RepresentativeAgg;
|
|
|
|
public class Representative : EntityBase
|
|
{
|
|
public Representative(string fName, string lName,string legalName, string nationalcode, string idNumber, string registerId, string nationalId, string isLegal, string phone, string agentPhone, string address)
|
|
{
|
|
FName = fName;
|
|
LName = lName;
|
|
LegalName = legalName;
|
|
if (isLegal == "false")
|
|
{
|
|
FullName = fName + " " + lName;
|
|
}
|
|
else
|
|
{
|
|
FullName = legalName;
|
|
}
|
|
|
|
Nationalcode = nationalcode;
|
|
IdNumber = idNumber;
|
|
RegisterId = registerId;
|
|
NationalId = nationalId;
|
|
IsLegal = isLegal;
|
|
Phone = phone;
|
|
AgentPhone = agentPhone;
|
|
Address = address;
|
|
IsActive = "true";
|
|
|
|
}
|
|
|
|
public string FName { get; private set; }
|
|
public string LName { get; private set; }
|
|
|
|
public string LegalName { get; private set; }
|
|
public string FullName { get; private set; }
|
|
|
|
public string Nationalcode { get; private set; }
|
|
|
|
public string IdNumber { get; private 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 IsActive { get; private set; }
|
|
public string Address { get; private set; }
|
|
public List<FileEmployee> FileEmployeeList { get; set; }
|
|
public List<FileEmployer> FileEmployerList { get; set; }
|
|
public List<PersonalContractingParty> ContractingParties { get; set; }
|
|
|
|
public Representative()
|
|
{
|
|
FileEmployeeList = new List<FileEmployee>();
|
|
FileEmployerList = new List<FileEmployer>();
|
|
ContractingParties = new List<PersonalContractingParty>();
|
|
}
|
|
|
|
public void EditReal(string fName, string lName, string nationalcode, string idNumber,
|
|
string phone, string agentPhone, string address)
|
|
{
|
|
FName = fName;
|
|
LName = lName;
|
|
FullName = fName + " " + lName;
|
|
Nationalcode = nationalcode;
|
|
IdNumber = idNumber;
|
|
Phone = phone;
|
|
AgentPhone = agentPhone;
|
|
Address = address;
|
|
IsActive = "true";
|
|
IsLegal = "false";
|
|
LegalName = "*";
|
|
RegisterId = "*";
|
|
NationalId = "*";
|
|
}
|
|
|
|
public void EditLegal(string legalName, string registerId, string nationalId, string phone, string agentPhone, string address)
|
|
{
|
|
FName = "*";
|
|
LName = "*";
|
|
Nationalcode = "*";
|
|
IdNumber = "*";
|
|
LegalName = legalName;
|
|
FullName = legalName;
|
|
RegisterId = registerId;
|
|
NationalId = nationalId;
|
|
Phone = phone;
|
|
AgentPhone = agentPhone;
|
|
Address = address;
|
|
IsActive = "true";
|
|
IsLegal = "true";
|
|
}
|
|
|
|
public void Active()
|
|
{
|
|
|
|
this.IsActive = "true";
|
|
}
|
|
|
|
public void DeActive()
|
|
{
|
|
|
|
this.IsActive = "false";
|
|
}
|
|
} |