Ejemplo n.º 1
0
        public IHttpActionResult GetAdditionalAddress(int personalID)
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var addresses        = verifyRepository.GetAdditionalAddress(personalID);

                return(Ok(addresses.Select(f =>
                                           new AddressInfoModel
                {
                    AddressDate = f.mAddressDate,
                    AddressTypeID = f.AddressTypeID,
                    Code = f.mCode,
                    CompanyName = f.mCompanyName,
                    Date = f.mDate,
                    IDNumber = f.mIDNumber,
                    Key = f.mKey,
                    PersonID = f.mPersonID,
                    POBox = f.mPOBox,
                    Residual = f.mResidual,
                    ResidualScore = f.mResidualScore,
                    Source = f.mSource,
                    Street = f.mStreet,
                    Suburb = f.mSuburb,
                    Town = f.mTown,
                    UserDetails = f.mUserDetails
                })
                          .ToList()));
            }
        }
Ejemplo n.º 2
0
        public IHttpActionResult GetFirstFishpondCase()
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var rejectReasons    = new List <VerifyRepository.sRejectReasons>();
                var cases            = new List <VerifyRepository.cFishpondInfo>();

                if (!verifyRepository.fishpondGetCases(ref rejectReasons, ref cases))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok(
                           new FirstFishpondCaseModel
                {
                    Cases = cases.Select(f =>
                                         new FishpondInfoModel
                    {
                        // TODO
                    })
                            .ToList(),
                    RejectReasons = rejectReasons.Select(f => new RejectReasonModel {
                        ID = f.mID, Description = f.mDescription
                    }).ToList()
                }));
            }
        }
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            var    repo   = new VerifyRepository(Settings.Default.ConStr);
            Member member = repo.GetByEmail(HttpContext.Current.User.Identity.Name);

            filterContext.Controller.ViewBag.name     = member != null ? member.FirstName : "";
            filterContext.Controller.ViewBag.fullName = member != null ? $"{member.FirstName} {member.LastName}"  : "";
            base.OnActionExecuting(filterContext);
        }
Ejemplo n.º 4
0
        public ActionResult Donate(int expenseId, string expenseName)
        {
            var repo = new VerifyRepository(Settings.Default.ConStr);

            ViewBag.expenseName = expenseName;
            Payment payment = new Payment
            {
                MemberId  = 1,
                ExpenseId = expenseId,
            };

            return(View(payment));
        }
Ejemplo n.º 5
0
        public IHttpActionResult UnlockSummons()
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                if (!verifyRepository.summonsUnlock())
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok());
            }
        }
Ejemplo n.º 6
0
        public IHttpActionResult UnlockFishpondCase(string ticketNumber)
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var captureTypes     = new List <VerifyRepository.sCaptureTypes>();

                if (!verifyRepository.fishpondUnlock(ticketNumber))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok());
            }
        }
Ejemplo n.º 7
0
        public ActionResult Signup(Member member, string password)
        {
            if (member.Cell == null || member.Email == null || member.FirstName == null || member.LastName == null || password == null)
            {
                return(RedirectToAction("index"));
            }
            if (member.Cell.Length > 12 || member.Email.Length > 40 || member.FirstName.Length > 40 || member.LastName.Length > 40 || password.Length > 25)
            {
                return(RedirectToAction("index"));
            }
            var repo = new VerifyRepository(Settings.Default.ConStr);

            repo.SignUp(member, password);
            TempData["Notify"] = "You successfuly signed up!";
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 8
0
        public ActionResult Login(string email, string password)
        {
            if (email == null || password == null)
            {
                return(RedirectToAction("index"));
            }
            var repo   = new VerifyRepository(Settings.Default.ConStr);
            var member = repo.Login(email, password);

            if (member == null)
            {
                return(RedirectToAction("Login"));
            }

            FormsAuthentication.SetAuthCookie(email, true);
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 9
0
        public IHttpActionResult GetPostalCode(string city, string suburb, string code, bool isPhysical)
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var postalCodes      = new List <VerifyRepository.cPostalCode>();

                if (!verifyRepository.getPostalCodes(city, suburb, code, isPhysical, postalCodes))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok(postalCodes.Select(f => new PostalCodeModel {
                    City = f.pCity, Code = f.pCode, Suburb = f.pSuburb
                }).ToList()));
            }
        }
Ejemplo n.º 10
0
        public ActionResult Donate(int expenseId, string expenseName)
        {
            var    repo   = new VerifyRepository(Settings.Default.ConStr);
            Member member = repo.GetByEmail(User.Identity.Name);

            if (member == null)
            {
                return(RedirectToAction("ViewShulExpenses"));
            }
            ViewBag.expenseName = expenseName;
            Payment payment = new Payment
            {
                MemberId  = member.Id,
                ExpenseId = expenseId,
            };

            return(View(payment));
        }
Ejemplo n.º 11
0
        public ActionResult Pledge(int expenseId, string expenseName)
        {
            var    repo   = new VerifyRepository(Settings.Default.ConStr);
            Member member = repo.GetByEmail(User.Identity.Name);

            if (member == null)
            {
                return(RedirectToAction("ViewShulExpenses"));
            }
            ViewBag.expenseName = expenseName;
            Pledge pledge = new Pledge
            {
                MemberId  = member.Id,
                ExpenseId = expenseId,
                Date      = DateTime.Now,
            };

            return(View(pledge));
        }
Ejemplo n.º 12
0
        public IHttpActionResult RejectFishpondCase(CaseModel model, int reasonID, bool registrationNumberChanged, bool addressChanged, bool personChanged, int typeID, decimal typeAmount, string computerName)
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var caseInfo         = new VerifyRepository.sCaseInfo();
                caseInfo.mImage1                   = model.Image1;
                caseInfo.mImage1ID                 = model.Image1ID;
                caseInfo.mImage2                   = model.Image2;
                caseInfo.mImage2ID                 = model.Image2ID;
                caseInfo.mImage3                   = model.Image3;
                caseInfo.mImage3ID                 = model.Image3ID;
                caseInfo.mImage4                   = model.Image4;
                caseInfo.mImage4ID                 = model.Image4ID;
                caseInfo.mImageNP                  = model.ImageNP;
                caseInfo.mNatisPhysical            = model.NatisPhysical.ToEntity();
                caseInfo.mNatisPostal              = model.NatisPostal.ToEntity();
                caseInfo.mOffenceDate              = model.OffenceDate;
                caseInfo.mOffenceNewNotes          = model.OffenceNewNotes;
                caseInfo.mOffenceOldNotes          = model.OffenceOldNotes;
                caseInfo.mOnlyOneImage             = model.OnlyOneImage;
                caseInfo.mPersonID                 = model.PersonID;
                caseInfo.mPersonKey                = model.PersonKey;
                caseInfo.mPersonMiddleNames        = model.PersonMiddleNames;
                caseInfo.mPersonName               = model.PersonName;
                caseInfo.mPersonPhysicalAddressKey = model.PersonPhysicalAddressKey;
                caseInfo.mPersonPostalAddressKey   = model.PersonPostalAddressKey;
                caseInfo.mPersonSurname            = model.PersonSurname;
                caseInfo.mPersonTelephone          = model.PersonTelephone;
                caseInfo.mPrintImageNo             = model.PrintImageNo;
                caseInfo.mSystemPhysical           = model.SystemPhysical.ToEntity();
                caseInfo.mSystemPostal             = model.SystemPostal.ToEntity();

                if (!verifyRepository.fishpondCaseReject(caseInfo, reasonID, registrationNumberChanged, addressChanged, personChanged, typeID, typeAmount))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok());
            }
        }
Ejemplo n.º 13
0
        public ActionResult ViewMyActivity()
        {
            var    repo   = new VerifyRepository(Settings.Default.ConStr);
            Member member = repo.GetByEmail(User.Identity.Name);

            if (member == null)
            {
                return(RedirectToAction("ViewExpenses"));
            }
            var fr = new FinancialRepository(Settings.Default.ConStr);
            IEnumerable <Payment>         payments        = fr.GetPaymentsByMemberId(member.Id);
            IEnumerable <Pledge>          pledges         = fr.GetPledgesByMemberId(member.Id);
            IEnumerable <MonthlyPayment>  monthlyPayments = fr.GetMonthlyPaymentsByMemberId(member.Id);
            IEnumerable <PaymentWithName> pwn             = payments.Select(p => new PaymentWithName
            {
                Amount = p.Amount,
                Date   = p.Date,
                Name   = p.Expense.Name
            });
            IEnumerable <PledgeWithName> plwn = pledges.Select(p => new PledgeWithName
            {
                Id     = p.Id,
                Amount = p.Amount,
                Date   = p.Date,
                Name   = p.Expense.Name
            });
            IEnumerable <MonthlyPaymentWithName> mpwn = monthlyPayments.Select(mp => new MonthlyPaymentWithName
            {
                Amount = mp.Amount,
                Name   = mp.Expense.Name,
                Count  = mp.Count.Value
            });
            PaymentsAndPledges paps = new PaymentsAndPledges
            {
                Payments        = pwn,
                Pledges         = plwn,
                MonthlyPayments = mpwn
            };

            return(View(paps));
        }
Ejemplo n.º 14
0
        public IHttpActionResult GetFirstCase()
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var rejectReasons    = new List <VerifyRepository.sRejectReasons>();
                var captureTypes     = new List <VerifyRepository.sCaptureTypes>();
                var caseInfo         = new VerifyRepository.sCaseInfo();
                var count            = 0;

                if (!verifyRepository.caseFirst(ref rejectReasons, ref captureTypes, out count, ref caseInfo))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok(
                           new FirstCaseModel
                {
                    Case = new CaseModel
                    {
                        Image1 = caseInfo.mImage1,
                        Image1ID = caseInfo.mImage1ID,
                        Image2 = caseInfo.mImage2,
                        Image2ID = caseInfo.mImage2ID,
                        Image3 = caseInfo.mImage3,
                        Image3ID = caseInfo.mImage3ID,
                        Image4 = caseInfo.mImage4,
                        Image4ID = caseInfo.mImage4ID,
                        ImageNP = caseInfo.mImageNP,
                        NatisPhysical = caseInfo.mNatisPhysical.ToModel(),
                        NatisPostal = caseInfo.mNatisPostal.ToModel(),
                        OffenceDate = caseInfo.mOffenceDate,
                        OffenceNewNotes = caseInfo.mOffenceNewNotes,
                        OffenceOldNotes = caseInfo.mOffenceOldNotes,
                        OnlyOneImage = caseInfo.mOnlyOneImage,
                        PersonID = caseInfo.mPersonID,
                        PersonKey = caseInfo.mPersonKey,
                        PersonMiddleNames = caseInfo.mPersonMiddleNames,
                        PersonName = caseInfo.mPersonName,
                        PersonPhysicalAddressKey = caseInfo.mPersonPhysicalAddressKey,
                        PersonPostalAddressKey = caseInfo.mPersonPostalAddressKey,
                        PersonSurname = caseInfo.mPersonSurname,
                        PersonTelephone = caseInfo.mPersonTelephone,
                        PrintImageNo = caseInfo.mPrintImageNo,
                        SystemPhysical = caseInfo.mSystemPhysical.ToModel(),
                        SystemPostal = caseInfo.mSystemPostal.ToModel(),
                        TicketNo = caseInfo.mTicketNo,
                        UseGismoAddress = caseInfo.mUseGismoAddress,
                        VehicleCaptureType = caseInfo.mVehicleCaptureType,
                        VehicleColour = caseInfo.mVehicleColour,
                        VehicleMake = caseInfo.mVehicleMake,
                        VehicleModel = caseInfo.mVehicleModel,
                        VehicleRegNo = caseInfo.mVehicleRegNo,
                        VehicleRegNoConfirmed = caseInfo.mVehicleRegNoConfirmed,
                        VehicleType = caseInfo.mVehicleType,
                        IsNumberPlateCentralCaptured = verifyRepository.pNPCapturedOnCentral,
                        NumberPlateCentralPath = verifyRepository.pNPCapturePath
                    },
                    CaptureTypes = captureTypes.Select(f => new CaptureTypeModel {
                        ID = f.mID, Amount = f.mAmount, Description = f.mDescription
                    }).ToList(),
                    Count = count,
                    RejectReasons = rejectReasons.Select(f => new RejectReasonModel {
                        ID = f.mID, Description = f.mDescription
                    }).ToList()
                }));
            }
        }
Ejemplo n.º 15
0
        public IHttpActionResult RejectCase(CaseModel model, int reasonID, bool registrationNumberChanged, bool addressChanged, bool personChanged, int typeID, decimal typeAmount, string computerName)
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var captureTypes     = new List <VerifyRepository.sCaptureTypes>();
                var count            = 0;
                var caseInfo         = new VerifyRepository.sCaseInfo();
                caseInfo.mImage1                   = model.Image1;
                caseInfo.mImage1ID                 = model.Image1ID;
                caseInfo.mImage2                   = model.Image2;
                caseInfo.mImage2ID                 = model.Image2ID;
                caseInfo.mImage3                   = model.Image3;
                caseInfo.mImage3ID                 = model.Image3ID;
                caseInfo.mImage4                   = model.Image4;
                caseInfo.mImage4ID                 = model.Image4ID;
                caseInfo.mImageNP                  = model.ImageNP;
                caseInfo.mNatisPhysical            = model.NatisPhysical.ToEntity();
                caseInfo.mNatisPostal              = model.NatisPostal.ToEntity();
                caseInfo.mOffenceDate              = model.OffenceDate;
                caseInfo.mOffenceNewNotes          = model.OffenceNewNotes;
                caseInfo.mOffenceOldNotes          = model.OffenceOldNotes;
                caseInfo.mOnlyOneImage             = model.OnlyOneImage;
                caseInfo.mPersonID                 = model.PersonID;
                caseInfo.mPersonKey                = model.PersonKey;
                caseInfo.mPersonMiddleNames        = model.PersonMiddleNames;
                caseInfo.mPersonName               = model.PersonName;
                caseInfo.mPersonPhysicalAddressKey = model.PersonPhysicalAddressKey;
                caseInfo.mPersonPostalAddressKey   = model.PersonPostalAddressKey;
                caseInfo.mPersonSurname            = model.PersonSurname;
                caseInfo.mPersonTelephone          = model.PersonTelephone;
                caseInfo.mPrintImageNo             = model.PrintImageNo;
                caseInfo.mSystemPhysical           = model.SystemPhysical.ToEntity();
                caseInfo.mSystemPostal             = model.SystemPostal.ToEntity();


                if (!verifyRepository.caseReject(ref caseInfo, reasonID, registrationNumberChanged, addressChanged, personChanged, typeID, typeAmount, ref captureTypes, out count))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok(
                           new FirstCaseModel
                {
                    Case = new CaseModel
                    {
                        Image1 = caseInfo.mImage1,
                        Image1ID = caseInfo.mImage1ID,
                        Image2 = caseInfo.mImage2,
                        Image2ID = caseInfo.mImage2ID,
                        Image3 = caseInfo.mImage3,
                        Image3ID = caseInfo.mImage3ID,
                        Image4 = caseInfo.mImage4,
                        Image4ID = caseInfo.mImage4ID,
                        ImageNP = caseInfo.mImageNP,
                        NatisPhysical = caseInfo.mNatisPhysical.ToModel(),
                        NatisPostal = caseInfo.mNatisPostal.ToModel(),
                        OffenceDate = caseInfo.mOffenceDate,
                        OffenceNewNotes = caseInfo.mOffenceNewNotes,
                        OffenceOldNotes = caseInfo.mOffenceOldNotes,
                        OnlyOneImage = caseInfo.mOnlyOneImage,
                        PersonID = caseInfo.mPersonID,
                        PersonKey = caseInfo.mPersonKey,
                        PersonMiddleNames = caseInfo.mPersonMiddleNames,
                        PersonName = caseInfo.mPersonName,
                        PersonPhysicalAddressKey = caseInfo.mPersonPhysicalAddressKey,
                        PersonPostalAddressKey = caseInfo.mPersonPostalAddressKey,
                        PersonSurname = caseInfo.mPersonSurname,
                        PersonTelephone = caseInfo.mPersonTelephone,
                        PrintImageNo = caseInfo.mPrintImageNo,
                        SystemPhysical = caseInfo.mSystemPhysical.ToModel(),
                        SystemPostal = caseInfo.mSystemPostal.ToModel(),
                        TicketNo = caseInfo.mTicketNo,
                        UseGismoAddress = caseInfo.mUseGismoAddress,
                        VehicleCaptureType = caseInfo.mVehicleCaptureType,
                        VehicleColour = caseInfo.mVehicleColour,
                        VehicleMake = caseInfo.mVehicleMake,
                        VehicleModel = caseInfo.mVehicleModel,
                        VehicleRegNo = caseInfo.mVehicleRegNo,
                        VehicleRegNoConfirmed = caseInfo.mVehicleRegNoConfirmed,
                        VehicleType = caseInfo.mVehicleType,
                        IsNumberPlateCentralCaptured = verifyRepository.pNPCapturedOnCentral,
                        NumberPlateCentralPath = verifyRepository.pNPCapturePath
                    },
                    CaptureTypes = captureTypes.Select(f => new CaptureTypeModel {
                        ID = f.mID, Amount = f.mAmount, Description = f.mDescription
                    }).ToList(),
                    Count = count
                }));
            }
        }
Ejemplo n.º 16
0
        public IHttpActionResult CheckAddress([FromBody] CaseModel model, bool isSummons)
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);
                var caseInfo         = new VerifyRepository.sCaseInfo();

                caseInfo.mImage1                   = model.Image1;
                caseInfo.mImage1ID                 = model.Image1ID;
                caseInfo.mImage2                   = model.Image2;
                caseInfo.mImage2ID                 = model.Image2ID;
                caseInfo.mImage3                   = model.Image3;
                caseInfo.mImage3ID                 = model.Image3ID;
                caseInfo.mImage4                   = model.Image4;
                caseInfo.mImage4ID                 = model.Image4ID;
                caseInfo.mImageNP                  = model.ImageNP;
                caseInfo.mNatisPhysical            = model.NatisPhysical.ToEntity();
                caseInfo.mNatisPostal              = model.NatisPostal.ToEntity();
                caseInfo.mOffenceDate              = model.OffenceDate;
                caseInfo.mOffenceNewNotes          = model.OffenceNewNotes;
                caseInfo.mOffenceOldNotes          = model.OffenceOldNotes;
                caseInfo.mOnlyOneImage             = model.OnlyOneImage;
                caseInfo.mPersonID                 = model.PersonID;
                caseInfo.mPersonKey                = model.PersonKey;
                caseInfo.mPersonMiddleNames        = model.PersonMiddleNames;
                caseInfo.mPersonName               = model.PersonName;
                caseInfo.mPersonPhysicalAddressKey = model.PersonPhysicalAddressKey;
                caseInfo.mPersonPostalAddressKey   = model.PersonPostalAddressKey;
                caseInfo.mPersonSurname            = model.PersonSurname;
                caseInfo.mPersonTelephone          = model.PersonTelephone;
                caseInfo.mPrintImageNo             = model.PrintImageNo;
                caseInfo.mSystemPhysical           = model.SystemPhysical.ToEntity();
                caseInfo.mSystemPostal             = model.SystemPostal.ToEntity();


                if (!verifyRepository.checkAddress(ref caseInfo, isSummons))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }


                return(Ok(
                           new CaseModel
                {
                    Image1 = caseInfo.mImage1,
                    Image1ID = caseInfo.mImage1ID,
                    Image2 = caseInfo.mImage2,
                    Image2ID = caseInfo.mImage2ID,
                    Image3 = caseInfo.mImage3,
                    Image3ID = caseInfo.mImage3ID,
                    Image4 = caseInfo.mImage4,
                    Image4ID = caseInfo.mImage4ID,
                    ImageNP = caseInfo.mImageNP,
                    NatisPhysical = caseInfo.mNatisPhysical.ToModel(),
                    NatisPostal = caseInfo.mNatisPostal.ToModel(),
                    OffenceDate = caseInfo.mOffenceDate,
                    OffenceNewNotes = caseInfo.mOffenceNewNotes,
                    OffenceOldNotes = caseInfo.mOffenceOldNotes,
                    OnlyOneImage = caseInfo.mOnlyOneImage,
                    PersonID = caseInfo.mPersonID,
                    PersonKey = caseInfo.mPersonKey,
                    PersonMiddleNames = caseInfo.mPersonMiddleNames,
                    PersonName = caseInfo.mPersonName,
                    PersonPhysicalAddressKey = caseInfo.mPersonPhysicalAddressKey,
                    PersonPostalAddressKey = caseInfo.mPersonPostalAddressKey,
                    PersonSurname = caseInfo.mPersonSurname,
                    PersonTelephone = caseInfo.mPersonTelephone,
                    PrintImageNo = caseInfo.mPrintImageNo,
                    SystemPhysical = caseInfo.mSystemPhysical.ToModel(),
                    SystemPostal = caseInfo.mSystemPostal.ToModel(),
                    IsNumberPlateCentralCaptured = verifyRepository.pNPCapturedOnCentral,
                    NumberPlateCentralPath = verifyRepository.pNPCapturePath
                }));
            }
        }
Ejemplo n.º 17
0
        public IHttpActionResult AcceptSummons([FromBody] CaseModel model, bool addressChanged, bool personChanged, string computerName)
        {
            using (var dbContext = new DataContext())
            {
                var verifyRepository = new VerifyRepository(dbContext, SessionModel.CredentialID, SessionModel.UserName);

                var caseInfo = new VerifyRepository.sCaseInfo();
                caseInfo.mImage1                   = model.Image1;
                caseInfo.mImage1ID                 = model.Image1ID;
                caseInfo.mImage2                   = model.Image2;
                caseInfo.mImage2ID                 = model.Image2ID;
                caseInfo.mImage3                   = model.Image3;
                caseInfo.mImage3ID                 = model.Image3ID;
                caseInfo.mImage4                   = model.Image4;
                caseInfo.mImage4ID                 = model.Image4ID;
                caseInfo.mImageNP                  = model.ImageNP;
                caseInfo.mNatisPhysical            = model.NatisPhysical.ToEntity();
                caseInfo.mNatisPostal              = model.NatisPostal.ToEntity();
                caseInfo.mOffenceDate              = model.OffenceDate;
                caseInfo.mOffenceNewNotes          = model.OffenceNewNotes;
                caseInfo.mOffenceOldNotes          = model.OffenceOldNotes;
                caseInfo.mOnlyOneImage             = model.OnlyOneImage;
                caseInfo.mPersonID                 = model.PersonID;
                caseInfo.mPersonKey                = model.PersonKey;
                caseInfo.mPersonMiddleNames        = model.PersonMiddleNames;
                caseInfo.mPersonName               = model.PersonName;
                caseInfo.mPersonPhysicalAddressKey = model.PersonPhysicalAddressKey;
                caseInfo.mPersonPostalAddressKey   = model.PersonPostalAddressKey;
                caseInfo.mPersonSurname            = model.PersonSurname;
                caseInfo.mPersonTelephone          = model.PersonTelephone;
                caseInfo.mPrintImageNo             = model.PrintImageNo;
                caseInfo.mSystemPhysical           = model.SystemPhysical.ToEntity();
                caseInfo.mSystemPostal             = model.SystemPostal.ToEntity();

                if (!verifyRepository.summonsAccept(ref caseInfo, addressChanged, personChanged))
                {
                    return(this.BadRequestEx(Error.PopulateMethodFailed(verifyRepository.Error)));
                }

                return(Ok(
                           new CaseModel
                {
                    Image1 = caseInfo.mImage1,
                    Image1ID = caseInfo.mImage1ID,
                    Image2 = caseInfo.mImage2,
                    Image2ID = caseInfo.mImage2ID,
                    Image3 = caseInfo.mImage3,
                    Image3ID = caseInfo.mImage3ID,
                    Image4 = caseInfo.mImage4,
                    Image4ID = caseInfo.mImage4ID,
                    ImageNP = caseInfo.mImageNP,
                    NatisPhysical = caseInfo.mNatisPhysical.ToModel(),
                    NatisPostal = caseInfo.mNatisPostal.ToModel(),
                    OffenceDate = caseInfo.mOffenceDate,
                    OffenceNewNotes = caseInfo.mOffenceNewNotes,
                    OffenceOldNotes = caseInfo.mOffenceOldNotes,
                    OnlyOneImage = caseInfo.mOnlyOneImage,
                    PersonID = caseInfo.mPersonID,
                    PersonKey = caseInfo.mPersonKey,
                    PersonMiddleNames = caseInfo.mPersonMiddleNames,
                    PersonName = caseInfo.mPersonName,
                    PersonPhysicalAddressKey = caseInfo.mPersonPhysicalAddressKey,
                    PersonPostalAddressKey = caseInfo.mPersonPostalAddressKey,
                    PersonSurname = caseInfo.mPersonSurname,
                    PersonTelephone = caseInfo.mPersonTelephone,
                    PrintImageNo = caseInfo.mPrintImageNo,
                    SystemPhysical = caseInfo.mSystemPhysical.ToModel(),
                    SystemPostal = caseInfo.mSystemPostal.ToModel(),
                    TicketNo = caseInfo.mTicketNo,
                    UseGismoAddress = caseInfo.mUseGismoAddress,
                    VehicleCaptureType = caseInfo.mVehicleCaptureType,
                    VehicleColour = caseInfo.mVehicleColour,
                    VehicleMake = caseInfo.mVehicleMake,
                    VehicleModel = caseInfo.mVehicleModel,
                    VehicleRegNo = caseInfo.mVehicleRegNo,
                    VehicleRegNoConfirmed = caseInfo.mVehicleRegNoConfirmed,
                    VehicleType = caseInfo.mVehicleType,
                    IsNumberPlateCentralCaptured = verifyRepository.pNPCapturedOnCentral,
                    NumberPlateCentralPath = verifyRepository.pNPCapturePath
                }));
            }
        }