public IHttpActionResult GetTranscationHistoryById(int Id) { //get transcation history TransactionHistoryModel model = transactionHistoryService.GetTransactionHistoryByCartId(Id); TransactionHistoryBindingModel bindingModel = new TransactionHistoryBindingModel(); AutoMapper.Mapper.Map(model, bindingModel); //get plan info PlanModel planModel = planService.GetPlanById(bindingModel.PlanId); bindingModel.PlanName = planModel.Description; bindingModel.URFXPaymentTypeString = ((URFXPaymentType)bindingModel.URFXPaymentType).ToString(); //get job detail JobModel jobModel = new JobModel(); jobModel = jobService.GetJobById(model.JobId); bindingModel.JobDescription = jobModel.Description; return Ok(bindingModel); }
public IHttpActionResult GetReceipt(int jobId) { TransactionHistoryBindingModel transactionHistoryBindingModel = new TransactionHistoryBindingModel(); TransactionHistoryModel transactionHistoryModel = new TransactionHistoryModel(); transactionHistoryModel = transactionHistoryService.GetTransactionHistoryByJobId(jobId); AutoMapper.Mapper.Map(transactionHistoryModel, transactionHistoryBindingModel); return Ok(transactionHistoryBindingModel); }