public ActionResult ShowAreaDetails(string areaCode, string searchText, int areaTypeId)
        {
            var model = new AreaDetail();

            Area areaDetail = _coreDataRepository.GetAreaDetail(areaCode);
            model.AreaDetails = areaDetail;
            model.SearchAreaTypeId = areaTypeId;
            model.SearchText = searchText;

            return PartialView("_AreaDetail", model);
        }
        public ActionResult UpdateArea(AreaDetail model, string originalAreaCode)
        {
            var areaDetail = new Area
            {
                AreaCode = model.AreaDetails.AreaCode,
                AreaTypeId = model.AreaDetails.AreaTypeId,
                AreaName = model.AreaDetails.AreaName,
                AreaShortName = model.AreaDetails.AreaShortName,
                AddressLine1 = model.AreaDetails.AddressLine1,
                AddressLine2 = model.AreaDetails.AddressLine2,
                AddressLine3 = model.AreaDetails.AddressLine3,
                AddressLine4 = model.AreaDetails.AddressLine4,
                Postcode = model.AreaDetails.Postcode,
                IsCurrent = model.AreaDetails.IsCurrent
            };

            _coreDataRepository.UpdateAreaDetail(areaDetail, originalAreaCode, UserDetails.CurrentUser().Name);

            return RedirectToAction("SearchAreas",
                new {areaTypeId = model.SearchAreaTypeId, searchText = model.SearchText});
        }