예제 #1
0
        public Models.Lookup.PaymentPeriodModel GetPaymentPeriodByID(int PaymentPeriodID)
        {
            BusinessLogic.Lookup.PaymentPeriodManager PaymentPeriodManager = new BusinessLogic.Lookup.PaymentPeriodManager();
            BusinessEntity.Lookup.PaymentPeriodEntity PaymentPeriod        = PaymentPeriodManager.GetPaymentPeriodByID(PaymentPeriodID);

            return(new Models.Lookup.PaymentPeriodModel(PaymentPeriod));
        }
예제 #2
0
        public List <Models.Lookup.PaymentPeriodModel> GetPaymentPeriods()
        {
            BusinessLogic.Lookup.PaymentPeriodManager PaymentPeriodManager = new BusinessLogic.Lookup.PaymentPeriodManager();

            List <BusinessEntity.Lookup.PaymentPeriodEntity> PaymentPeriods      = PaymentPeriodManager.GetPaymentPeriods();
            List <Models.Lookup.PaymentPeriodModel>          PaymentPeriodModels = new List <Models.Lookup.PaymentPeriodModel>();

            foreach (BusinessEntity.Lookup.PaymentPeriodEntity PaymentPeriod in PaymentPeriods)
            {
                PaymentPeriodModels.Add(new Models.Lookup.PaymentPeriodModel(PaymentPeriod));
            }

            return(PaymentPeriodModels);
        }
예제 #3
0
        public BusinessEntity.Result DeletePaymentPeriod(Models.Lookup.PaymentPeriodModel PaymentPeriod)
        {
            BusinessEntity.Result result = new BusinessEntity.Result();
            try
            {
                BusinessLogic.Lookup.PaymentPeriodManager PaymentPeriodManager = new BusinessLogic.Lookup.PaymentPeriodManager();
                result = PaymentPeriodManager.DeletePaymentPeriod(PaymentPeriod.MapToEntity <BusinessEntity.Lookup.PaymentPeriodEntity>());

                return(result);
            }
            catch (Exception ex)
            {
                result.Status  = false;
                result.Message = "PaymentPeriod delete failed.";

                return(result);
            }
        }