Inheritance: PaymentRequestPOCO
Example #1
0
 public bool Update(PaymentRequest item)
 {
     if (item == null) return false;
     _unitOfWork.PaymentRequestRepository.Edit(item);
     _unitOfWork.Save();
     return true;
 }
        public ActionResult Create(PaymentRequest request)
        {
            if (ModelState.IsValid)
            {
                   int BP_PR = _ApplicationSettingService.getPaymentRequestWorkflow();

                   if (BP_PR != 0)
                    {
                        BusinessProcessState createdstate = new BusinessProcessState
                        {
                            DatePerformed = DateTime.Now,
                            PerformedBy = "System",
                            Comment = "Created workflow for Payment Request"

                        };
                        //_PaymentRequestservice.Create(request);

                        BusinessProcess bp = _BusinessProcessService.CreateBusinessProcess(BP_PR,request.PaymentRequestID,
                                                                                           "PaymentRequest", createdstate);
                        request.BusinessProcessID = bp.BusinessProcessID;
                        request.RequestedDate = DateTime.Now;
                        _PaymentRequestservice.Create(request);
                        //_PaymentRequestservice.Update(request);
                        return RedirectToAction("Index");
                    }
                    ViewBag.ErrorMessage1 = "The workflow assosiated with Payment Request doesnot exist.";
                    ViewBag.ErrorMessage2 = "Please make sure the workflow is created and configured.";
                }
                LoadLookups();
                ModelState.AddModelError("Errors", @"Could not create Request Plan.");
                return View(request);
        }
Example #3
0
 public bool Create(PaymentRequest item)
 {
     _unitOfWork.PaymentRequestRepository.Add(item);
     _unitOfWork.Save();
     return true;
 }