Search for location by owner name
Name | Type | Length | Description |
---|---|---|---|
ownerName | System.String | 30 | [Required] Owner name to search on |
rows | numeric | 4 | Number of rows to return |
pageNumber | numeric | 5 | Used for paging results |
POST http://localhost/FusionServices/v3/Naviline/Permit/Application/SearchLandInfo/ByOwnerName
Name | Description |
---|---|
Address | Street number and name |
Parcel | Parcel number for location |
Owner | The owner or other related party |
GenLocCode | General location code |
LocationID | Location ID |
StreetNum | Street number |
StreetDir | Street direction. I.e. N, NE, NW, E, W, S |
StreetName | Street name |
StreetSuffix | Street suffix. I.e. AVE, DR, RD, ST |
InOutCode | Inside Outside code. Indicates if address in inside city limits |
FLD11 | |
FLD12 | Y/N |
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
string uri = "http://localhost/FusionServices/v3/Naviline/Permit/Application/SearchLandInfo/ByOwnerName";
System.Collections.Specialized.NameValueCollection postParms =
new System.Collections.Specialized.NameValueCollection();
// Set paramater values
postParms.Add("ownerName",System.Web.HttpUtility.UrlEncode("CARTER TRAVIS"));
WebClient req = new WebClient();
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
wc.Headers.Set("X-APPID", "YOURID");
wc.Headers.Set("X-APPKEY", "YOURKEY");
byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
string stringResult = Encoding.UTF8.GetString(responseBytes);
JObject response = JObject.Parse(stringResult);
string error = response["OutputParms"]["ErrorCode"].ToString();
if (error == "0000")
{
JArray jRows = (JArray)response["Rows"];
foreach (JObject row in jRows)
{
string Address = row["Address"].ToString();
string Parcel = row["Parcel"].ToString();
string Owner = row["Owner"].ToString();
string GenLocCode = row["GenLocCode"].ToString();
string LocationID = row["LocationID"].ToString();
string StreetNum = row["StreetNum"].ToString();
string StreetDir = row["StreetDir"].ToString();
string StreetName = row["StreetName"].ToString();
string StreetSuffix = row["StreetSuffix"].ToString();
string InOutCode = row["InOutCode"].ToString();
string FLD11 = row["FLD11"].ToString();
string FLD12 = row["FLD12"].ToString();
// TODO - YOUR CODE HERE
}
}
}
using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;
// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
public class PostSearchLandInfoByOwnerName
{
// Add property for each input param in order to map a field to it
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,30}$).*", ErrorMessage = "Must be 30 characters or less. ")]
public string ownerName{get; set;}
[RegularExpression("[0-9]{0,4}", ErrorMessage = "Numeric values only. Must be 4 digits or less. ")]
public string rows{get; set;}
[RegularExpression("[0-9]{0,5}", ErrorMessage = "Numeric values only. Must be 5 digits or less. ")]
public string pageNumber{get; set;}
public PostSearchLandInfoByOwnerName()
{
//Set any defaults here
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostSearchLandInfoByOwnerName class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top. Replace the rest with the lines below.
@model FusionRazor.Models.PostSearchLandInfoByOwnerName
@{
ViewBag.Title = "PostSearchLandInfoByOwnerName";
}
<h2>PostSearchLandInfoByOwnerName</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>PostSearchLandInfoByOwnerName</legend>
<div class="editor-label">
@Html.LabelFor(model => model.ownerName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.ownerName)
@Html.ValidationMessageFor(model => model.ownerName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.rows)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.rows)
@Html.ValidationMessageFor(model => model.rows)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.pageNumber)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.pageNumber)
@Html.ValidationMessageFor(model => model.pageNumber)
</div>
<p>
<input type="submit" value="Submit"/>
</p>
</fieldset>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;
// NOTE: Replace 'MyController' with the name of your controller.
//
// GET: /MyController/PostSearchLandInfoByOwnerName
public ActionResult PostSearchLandInfoByOwnerName()
{
// Create a new instance of the model to pick up any default values.
PostSearchLandInfoByOwnerName model = new PostSearchLandInfoByOwnerName();
// pass model to set to default values
// NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
return View("~/Views/MyFolderPath/PostSearchLandInfoByOwnerName.cshtml", model);
}
//
// POST: /MyController/PostSearchLandInfoByOwnerName
[HttpPost]
public ActionResult PostSearchLandInfoByOwnerName(FormCollection collection)
{
string url = "v3/Naviline/Permit/Application/SearchLandInfo/ByOwnerName";
// Get the value from each input field
NameValueCollection inputParms = new NameValueCollection();
inputParms.Add("ownerName", collection["ownerName"]);
inputParms.Add("rows", collection["rows"]);
inputParms.Add("pageNumber", collection["pageNumber"]);
try
{
// Send the request
FusionServiceRequest request = new FusionServiceRequest();
FusionServiceResult result = request.Post(url, inputParms);
return View("Result", result);
}
catch(Exception e)
{
HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "PostSearchLandInfoByOwnerName");
return View("Error", info);
}
}