예제 #1
0
 public EndOfServicesVacationsBLL MapEndOfServiceVacation(EndOfServicesVacations EndOfServiceVacation)
 {
     try
     {
         EndOfServicesVacationsBLL EndOfServiceVacationBLL = null;
         if (EndOfServiceVacation != null)
         {
             EndOfServiceVacationBLL = new EndOfServicesVacationsBLL()
             {
                 EndOfServiceVacationID = EndOfServiceVacation.EndOfServiceVacationID,
                 VacationStartDate      = EndOfServiceVacation.VacationStartDate,
                 VacationEndDate        = EndOfServiceVacation.VacationEndDate
             };
             if (EndOfServiceVacation.VacationsTypes != null)
             {
                 EndOfServiceVacationBLL.VacationType = new VacationsTypesBLL().MapVacationsTypes(EndOfServiceVacation.VacationsTypes);
             }
             if (EndOfServiceVacation.EndOfServices != null)
             {
                 EndOfServiceVacationBLL.EndOfService = new EndOfServicesBLL().MapEndOfService(EndOfServiceVacation.EndOfServices);
             }
         }
         return(EndOfServiceVacationBLL);
     }
     catch
     {
         throw;
     }
 }
예제 #2
0
        public virtual EndOfServicesVacationsBLL GetByEndOfServiceVacationID(int EndOfServiceVacationID)
        {
            EndOfServicesVacations    EndOfServiceVacation      = new EndOfServicesVacationsDAL().GetByEndOfServiceVacationID(EndOfServiceVacationID);
            EndOfServicesVacationsBLL EndOfServicesVacationsBLL = new EndOfServicesVacationsBLL();

            if (EndOfServiceVacation != null)
            {
                if (EndOfServiceVacation.EndOfServiceVacationID > 0)
                {
                    return(new EndOfServicesVacationsBLL().MapEndOfServiceVacation(EndOfServiceVacation));
                }
            }
            return(null);
        }