Exemplo n.º 1
0
 internal InsteadDeportationsBLL MapInsteadDeportation(InsteadDeportations InsteadDeportation)
 {
     try
     {
         InsteadDeportationsBLL InsteadDeportationBLL = null;
         if (InsteadDeportation != null)
         {
             InsteadDeportationBLL = new InsteadDeportationsBLL()
             {
                 InsteadDeportationID  = InsteadDeportation.InsteadDeportationID,
                 EmployeeCareerHistory = new EmployeesCareersHistoryBLL().MapEmployeeCareerHistory(InsteadDeportation.EmployeesCareersHistory),
                 DeportationDate       = InsteadDeportation.DeportationDate.Date,
                 Note          = InsteadDeportation.Note,
                 Amount        = InsteadDeportation.Amount,
                 CreatedDate   = InsteadDeportation.CreatedDate,
                 CreatedBy     = new EmployeesCodesBLL().MapEmployeeCode(InsteadDeportation.CreatedByNav),
                 LastUpdatedBy = new EmployeesCodesBLL().MapEmployeeCode(InsteadDeportation.LastUpdatedByNav)
             };
         }
         return(InsteadDeportationBLL);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 2
0
        public virtual Result Add()
        {
            Result result = new Result();

            result.EnumType = typeof(InsteadDeportationValidationEnum);
            EmployeesCareersHistoryBLL EmployeeCareerHistory = new EmployeesCareersHistoryBLL().GetActiveByEmployeeCareerHistoryID(this.EmployeeCareerHistory.EmployeeCareerHistoryID);
            InsteadDeportations        InsteadDeportation    = new InsteadDeportations();

            InsteadDeportation.EmployeeCareerHistoryID = this.EmployeeCareerHistory.EmployeeCareerHistoryID;
            InsteadDeportation.DeportationDate         = this.DeportationDate;
            InsteadDeportation.Amount      = this.Amount;
            InsteadDeportation.Note        = this.Note;
            InsteadDeportation.CreatedDate = DateTime.Now;
            InsteadDeportation.CreatedBy   = this.LoginIdentity.EmployeeCodeID;
            this.InsteadDeportationID      = new InsteadDeportationsDAL().Insert(InsteadDeportation);
            if (this.InsteadDeportationID != 0)
            {
                result.Entity     = this;
                result.EnumMember = AllowanceValidationEnum.Done.ToString();
            }
            return(result);
        }