public Models.Lookup.PaymentReasonModel GetPaymentReasonByID(int PaymentReasonID) { BusinessLogic.Lookup.PaymentReasonManager PaymentReasonManager = new BusinessLogic.Lookup.PaymentReasonManager(); BusinessEntity.Lookup.PaymentReasonEntity PaymentReason = PaymentReasonManager.GetPaymentReasonByID(PaymentReasonID); return(new Models.Lookup.PaymentReasonModel(PaymentReason)); }
public List <Models.Lookup.PaymentReasonModel> GetPaymentReasons() { BusinessLogic.Lookup.PaymentReasonManager PaymentReasonManager = new BusinessLogic.Lookup.PaymentReasonManager(); List <BusinessEntity.Lookup.PaymentReasonEntity> PaymentReasons = PaymentReasonManager.GetPaymentReasons(); List <Models.Lookup.PaymentReasonModel> PaymentReasonModels = new List <Models.Lookup.PaymentReasonModel>(); foreach (BusinessEntity.Lookup.PaymentReasonEntity PaymentReason in PaymentReasons) { PaymentReasonModels.Add(new Models.Lookup.PaymentReasonModel(PaymentReason)); } return(PaymentReasonModels); }
public BusinessEntity.Result DeletePaymentReason(Models.Lookup.PaymentReasonModel PaymentReason) { BusinessEntity.Result result = new BusinessEntity.Result(); try { BusinessLogic.Lookup.PaymentReasonManager PaymentReasonManager = new BusinessLogic.Lookup.PaymentReasonManager(); result = PaymentReasonManager.DeletePaymentReason(PaymentReason.MapToEntity <BusinessEntity.Lookup.PaymentReasonEntity>()); return(result); } catch (Exception ex) { result.Status = false; result.Message = "PaymentReason delete failed."; return(result); } }