using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.CoreV35.Model; namespace Payroll.BO { [Serializable] public class CV : BasicBaseObject { #region Constructor public CV() { _trackNo = String.Empty; _contactAddress = String.Empty; _name = String.Empty; _emailAddress = String.Empty; _nationalId = String.Empty; _organPositionID = null; _fatherName = String.Empty; _motherName = String.Empty; _contactAddress = String.Empty; _mobileNo = String.Empty; _landPhoneNo = String.Empty; _applicationDate = DateTime.MinValue; _specialSkill = String.Empty; _expectedMinimumSalary = 0.0; _totalYearOfExperience = 0.0; _fileAddress = String.Empty; _isFresher = true; _applicationDate = DateTime.Now; _designation = null; } #endregion #region Properties private string _trackNo; private string _name; private string _emailAddress; private string _nationalId; private ID _organPositionID; private string _fatherName; private string _motherName; private string _contactAddress; private string _mobileNo; private string _landPhoneNo; private DateTime _applicationDate; private string _specialSkill; private double _expectedMinimumSalary; private double _totalYearOfExperience; private string _fileAddress; private bool _isFresher; private ID _designation; public ID Designation { get { return _designation; } set { _designation = value; } } private ObjectsTemplate _allReferences; private ObjectsTemplate _allEduQualifications; private ObjectsTemplate _allExperiences; private ObjectsTemplate _CVOrgs; public string TrackNo { get { return _trackNo; } set { _trackNo = value; } } public string Name { get { return _name; } set { _name = value; } } public string EmailAddress { get { return _emailAddress; } set { _emailAddress = value; } } public string NationalId { get { return _nationalId; } set { _nationalId = value; } } public string FatherName { get { return _fatherName; } set { _fatherName = value; } } public string MotherName { get { return _motherName; } set { _motherName = value; } } public string ContactAddress { get { return _contactAddress; } set { _contactAddress = value; } } public string MobileNo { get { return _mobileNo; } set { _mobileNo = value; } } public string LandPhoneNo { get { return _landPhoneNo; } set { _landPhoneNo = value; } } public DateTime ApplicationDate { get { return _applicationDate; } set { _applicationDate = value; } } public bool IsFresher { get { return _isFresher; } set { _isFresher = value; } } public string SpecialSkill { get { return _specialSkill; } set { _specialSkill = value; } } public double ExpectedMinimumSalary { get { return _expectedMinimumSalary; } set { _expectedMinimumSalary = value; } } public double TotalYearOfExperience { get { return _totalYearOfExperience; } set { _totalYearOfExperience = value; } } public string FileAddress { get { return _fileAddress; } set { _fileAddress = value; } } public ID OrganPositionId { get { return _organPositionID; } set { _organPositionID = value; } } public ObjectsTemplate AllReferences { get { if (_allReferences == null) { _allReferences = new ObjectsTemplate(); if (!this.ID.IsUnassigned) _allReferences = CV.GetReferredBy(this.ID); } return _allReferences; } set { _allReferences = value; } } public ObjectsTemplate CVOrgs { get { if (_CVOrgs == null) { _CVOrgs = new ObjectsTemplate(); if (!this.ID.IsUnassigned) _CVOrgs = CV.GetCVOrgByID(this.ID); } return _CVOrgs; } set { _CVOrgs = value; } } public ObjectsTemplate AllEduQualifications { get { if (_allEduQualifications == null) { _allEduQualifications = new ObjectsTemplate(); if (!this.ID.IsUnassigned) _allEduQualifications = CV.GetEducationQualifications(this.ID); } return _allEduQualifications; } set { _allEduQualifications = value; } } public ObjectsTemplate AllExperiences { get { if (_allExperiences == null) { _allExperiences = new ObjectsTemplate(); if (!this.ID.IsUnassigned) _allExperiences = CV.GetExperiences(this.ID); } return _allExperiences; } set { _allExperiences = value; } } #endregion #region Service Factory ICVService : ICVService internal static ICVService Service { get { return Services.Factory.CreateService(typeof(ICVService)); } } #endregion #region Methods #region Save() public void Save() { this.SetAuditTrailProperties(); CV.Service.Save(this); } #endregion #region GetReferredBy(ID cVID) public static ObjectsTemplate GetReferredBy(ID cVID) { return CV.Service.GetReferredBy(cVID); } #endregion #region GetCVOrgByID(ID cVID) public static ObjectsTemplate GetCVOrgByID(ID cVID) { return CV.Service.GetCVOrgByID(cVID); } #endregion #region GetExperiences(ID cVID) public static ObjectsTemplate GetExperiences(ID cVID) { return CV.Service.GetExperiences(cVID); } #endregion #region GetEducationQualifications(ID cVID) public static ObjectsTemplate GetEducationQualifications(ID id) { return CV.Service.GetEducationQualifications(id); } #endregion #region Get() public static ObjectsTemplate Get() { return CV.Service.Get(); } #endregion #region Get(ID id) public static CV Get(ID cVID) { return CV.Service.Get(cVID); } #endregion #region GenerateTrackNo() public static string GenerateTrackNo() { return CV.Service.GenerateTrackNo().ToString(); } #endregion #region Delete public void Delete() { CV.Service.Delete(this); } #endregion #region ObjectsTemplate< CV > GetByQueryString(string query) public static ObjectsTemplate GetByQuery(string query) { return CV.Service.GetByQuery(query); } #endregion #endregion } #region ICVService Service public interface ICVService { void Save(CV obCV); CV Get(ID cVID); ObjectsTemplate Get(); ObjectsTemplate GetReferredBy(ID cVID); ObjectsTemplate GetEducationQualifications(ID cVID); ObjectsTemplate GetExperiences(ID cVID); ObjectsTemplate GetCVOrgByID(ID cVID); void Delete(CV obCv); ObjectsTemplate GetByQuery(string query); int GenerateTrackNo(); } #endregion }