Get Application Type Codes available for online user
The return values indicate if online submission and payment is allowed for the application type.
Name | Type | Length | Description |
---|---|---|---|
nameType | System.String | 2 | [Required] 2 letter name type code. See GetNameTypeCodes |
rows | System.String | 4 | [Required] row number used for paging. Use 0010 as default. Value is ignored on input. |
GET http://localhost/FusionServices/v3/Naviline/Permit/Application/ApplTypeCodesSpecific/{nameType}/{rows}
Name | Description |
---|---|
AppTypeCode | Applciaiton type code used internally. 4-char code |
AppTypeDesc | Applciaiton type description displayed to user |
SubmitNonLogin | Y/N - Allow submitting an application by a non-logged in Click2Gov user? If N, they have to be logged in to Click2Gov3. |
OnlineSubmitPaymt | 1-4 - Allow online submittal and payments for this application type. 1=None. Don't allow user to use this type online. 2=Submit only. User can submit an applicaiton of this type online, but cannot make payments. 3=Submit and Pay. User can submit and pay for this application online. 4=Submit, pay and auto-approve. User can submit, pay, and be auto-approved for this application online |
using System.Net;
using Newtonsoft.Json.Linq;
public void MethodName(parms)
{
string uri = "http://localhost/FusionServices/v3/Naviline/Permit/Application/ApplTypeCodesSpecific/CT/0010";
WebClient wc = new WebClient();
wc.Headers.Set("X-APPID", "YOURID");
wc.Headers.Set("X-APPKEY", "YOURKEY");
string stringResult = wc.DownloadString(new Uri(uri));
JObject response = JObject.Parse(stringResult);
string error = response["OutputParms"]["ErrorCode"].ToString();
if (error == "0000")
{
// TODO - YOUR CODE HERE
}
}
$.get('http://localhost/FusionServices/v3/Naviline/Permit/Application/ApplTypeCodesSpecific/CT/0010', function(response) {
$('#resultDiv).html(response);
});
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 GetApplTypeCodesSpecific
{
// Add property for each input param in order to map a field to it
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
public string nameType{get; set;}
[Required(ErrorMessage = "Required")]
[RegularExpression("^(?=.{0,4}$).*", ErrorMessage = "Must be 4 characters or less. ")]
public string rows{get; set;}
public GetApplTypeCodesSpecific()
{
//Set any defaults here
nameType = DefaultData.Get("nameType");
rows = DefaultData.Get("rows");
}
}
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetApplTypeCodesSpecific 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.GetApplTypeCodesSpecific
@{
ViewBag.Title = "GetApplTypeCodesSpecific";
string myUrl = "http://localhost/FusionServices/v3/Naviline/Permit/Application/ApplTypeCodesSpecific/" + Model.nameType + "/" + Model.rows;
}
<h2>GetApplTypeCodesSpecific</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>GetApplTypeCodesSpecific</legend>
<div class="editor-label">Use the fields below to change the values and resubmit.</div>
<div class="editor-label">
@Html.LabelFor(model => model.nameType)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.nameType)
@Html.ValidationMessageFor(model => model.nameType)
</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>
<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/GetApplTypeCodesSpecific
public ActionResult GetApplTypeCodesSpecific()
{
// Create a new instance of the model to pick up any default values.
GetApplTypeCodesSpecific model = new GetApplTypeCodesSpecific();
// pass model to set to default values
// NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
return View("~/Views/MyFolderPath/GetApplTypeCodesSpecific.cshtml", model);
}
//
// POST: /MyController/GetApplTypeCodesSpecific
[HttpPost]
public ActionResult GetApplTypeCodesSpecific(FormCollection collection)
{
string url = "v3/Naviline/Permit/Application/ApplTypeCodesSpecific/{nameType}/{rows}";
// Get the value from each input field
NameValueCollection inputParms = new NameValueCollection();
inputParms.Add("nameType", collection["nameType"]);
inputParms.Add("rows", collection["rows"]);
try
{
// Send the request
FusionServiceRequest request = new FusionServiceRequest();
FusionServiceResult result = request.Get(url, inputParms);
return View("Result", result);
}
catch(Exception e)
{
HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "GetApplTypeCodesSpecific");
return View("Error", info);
}
}