Method PostMiscInfoUpdate

Summary

Add / Update / Delete Misc. Information on a location

Remarks

For Update and Delete, you have to use READRECORD first to lock the record.

Use the Function key to either read a record or search and loop through records.

Use the Order code to select searching for Miscellaneous codes and/or User Defined codes.

Requires

Input Parameters

NameTypeLengthDescription
Function System.String 0 [Required] READRECORD | STARTNEXT | READNEXT | DELETE | UPDATE | WRITE
Order System.String 0 [Required] LOC | APPLCODE | APPLSEQ
LocationID numeric 9 [Required] Location ID
MiscCode System.String 4 The 4 char code for the misc inforation. Required for APPLCODE
MiscCodeAppl System.String 2 The 2 char application code. Required for APPLCODE and APPLSEQ.
MiscSeqNo System.String 4 Sequence number. Example: 1.00 Required for APPLSEQ
MiscInfoText System.String 40 The information text to record
MiscInfoDateMM numeric 2 The month info was entered. Required with WRITE or UPDATE.
MiscInfoDateDD numeric 2 The day info was entered. Required with WRITE or UPDATE.
MiscInfoDateYY numeric 2 The year info was entered. Required with WRITE or UPDATE.
SpecialNote System.String 1 Note type: Blank=No special process, C=Critical, S=Special
DocumentSearch System.String 10 Note level: Blank=Address, PARCELXREF=Parcel, SUBDIVISON=Subdivision
RecordNo numeric 9 Miscellaneous file record number
Subdivision1 System.String 6 Subdivision code 1
Subdivision2 System.String 6 Subdivision code 2

Example

POST http://localhost/FusionServices/v2/NaviLine/Land/MiscInfoUpdate

Sample Responses

Sample Code

using System.Net;

string uri = "http://localhost/FusionServices/v2/NaviLine/Land/MiscInfoUpdate";
System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 

postParms.Add("Order",System.Web.HttpUtility.UrlEncode("APPLCODE"));
postParms.Add("Function",System.Web.HttpUtility.UrlEncode("UPDATE"));
postParms.Add("LocationID",System.Web.HttpUtility.UrlEncode("33950"));
postParms.Add("MiscCode",System.Web.HttpUtility.UrlEncode("CEMS"));
postParms.Add("MiscCodeAppl",System.Web.HttpUtility.UrlEncode("CE"));
postParms.Add("MiscInfoText",System.Web.HttpUtility.UrlEncode("Critical Update"));
postParms.Add("MiscInfoDateMM",System.Web.HttpUtility.UrlEncode("6"));
postParms.Add("MiscInfoDateDD",System.Web.HttpUtility.UrlEncode("12"));
postParms.Add("MiscInfoDateYY",System.Web.HttpUtility.UrlEncode("14"));
postParms.Add("SpecialNote",System.Web.HttpUtility.UrlEncode("C"));
using (WebClient req = new WebClient())
{
    byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
    string stringResult = Encoding.UTF8.GetString(responseBytes); 
    // TODO
}

C# Razor MVC Sample Code

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 PostMiscInfoUpdate
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       public string Function{get; set;}

       [Required(ErrorMessage = "Required")]
       public string Order{get; set;}

       [Required(ErrorMessage = "Required")]
       [RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
       public string LocationID{get; set;}

       [RegularExpression("^(?=.{0,4}$).*", ErrorMessage = "Must be 4 characters or less. ")]
       public string MiscCode{get; set;}

       [RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
       public string MiscCodeAppl{get; set;}

       [RegularExpression("^(?=.{0,4}$).*", ErrorMessage = "Must be 4 characters or less. ")]
       public string MiscSeqNo{get; set;}

       [RegularExpression("^(?=.{0,40}$).*", ErrorMessage = "Must be 40 characters or less. ")]
       public string MiscInfoText{get; set;}

       [RegularExpression("[0-9]{0,2}", ErrorMessage = "Numeric values only. Must be 2 digits or less. ")]
       public string MiscInfoDateMM{get; set;}

       [RegularExpression("[0-9]{0,2}", ErrorMessage = "Numeric values only. Must be 2 digits or less. ")]
       public string MiscInfoDateDD{get; set;}

       [RegularExpression("[0-9]{0,2}", ErrorMessage = "Numeric values only. Must be 2 digits or less. ")]
       public string MiscInfoDateYY{get; set;}

       [RegularExpression("^(?=.{0,1}$).*", ErrorMessage = "Must be 1 characters or less. ")]
       public string SpecialNote{get; set;}

       [RegularExpression("^(?=.{0,10}$).*", ErrorMessage = "Must be 10 characters or less. ")]
       public string DocumentSearch{get; set;}

       [RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
       public string RecordNo{get; set;}

       [RegularExpression("^(?=.{0,6}$).*", ErrorMessage = "Must be 6 characters or less. ")]
       public string Subdivision1{get; set;}

       [RegularExpression("^(?=.{0,6}$).*", ErrorMessage = "Must be 6 characters or less. ")]
       public string Subdivision2{get; set;}

       public PostMiscInfoUpdate()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostMiscInfoUpdate 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.PostMiscInfoUpdate

@{
   ViewBag.Title = "PostMiscInfoUpdate";
}

<h2>PostMiscInfoUpdate</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostMiscInfoUpdate</legend>
       <div class="editor-label">
           @Html.LabelFor(model => model.Function)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Function)
           @Html.ValidationMessageFor(model => model.Function)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Order)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Order)
           @Html.ValidationMessageFor(model => model.Order)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.LocationID)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.LocationID)
           @Html.ValidationMessageFor(model => model.LocationID)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MiscCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MiscCode)
           @Html.ValidationMessageFor(model => model.MiscCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MiscCodeAppl)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MiscCodeAppl)
           @Html.ValidationMessageFor(model => model.MiscCodeAppl)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MiscSeqNo)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MiscSeqNo)
           @Html.ValidationMessageFor(model => model.MiscSeqNo)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MiscInfoText)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MiscInfoText)
           @Html.ValidationMessageFor(model => model.MiscInfoText)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MiscInfoDateMM)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MiscInfoDateMM)
           @Html.ValidationMessageFor(model => model.MiscInfoDateMM)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MiscInfoDateDD)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MiscInfoDateDD)
           @Html.ValidationMessageFor(model => model.MiscInfoDateDD)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MiscInfoDateYY)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MiscInfoDateYY)
           @Html.ValidationMessageFor(model => model.MiscInfoDateYY)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.SpecialNote)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.SpecialNote)
           @Html.ValidationMessageFor(model => model.SpecialNote)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.DocumentSearch)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.DocumentSearch)
           @Html.ValidationMessageFor(model => model.DocumentSearch)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.RecordNo)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.RecordNo)
           @Html.ValidationMessageFor(model => model.RecordNo)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Subdivision1)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Subdivision1)
           @Html.ValidationMessageFor(model => model.Subdivision1)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Subdivision2)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Subdivision2)
           @Html.ValidationMessageFor(model => model.Subdivision2)
       </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/PostMiscInfoUpdate
public ActionResult PostMiscInfoUpdate()
{
   // Create a new instance of the model to pick up any default values.
   PostMiscInfoUpdate model =  new PostMiscInfoUpdate();

   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/PostMiscInfoUpdate.cshtml", model);
}

// 
// POST: /MyController/PostMiscInfoUpdate
[HttpPost]
public ActionResult PostMiscInfoUpdate(FormCollection collection)
{
   string url = "v2/NaviLine/Land/MiscInfoUpdate";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("Function", collection["Function"]);
   inputParms.Add("Order", collection["Order"]);
   inputParms.Add("LocationID", collection["LocationID"]);
   inputParms.Add("MiscCode", collection["MiscCode"]);
   inputParms.Add("MiscCodeAppl", collection["MiscCodeAppl"]);
   inputParms.Add("MiscSeqNo", collection["MiscSeqNo"]);
   inputParms.Add("MiscInfoText", collection["MiscInfoText"]);
   inputParms.Add("MiscInfoDateMM", collection["MiscInfoDateMM"]);
   inputParms.Add("MiscInfoDateDD", collection["MiscInfoDateDD"]);
   inputParms.Add("MiscInfoDateYY", collection["MiscInfoDateYY"]);
   inputParms.Add("SpecialNote", collection["SpecialNote"]);
   inputParms.Add("DocumentSearch", collection["DocumentSearch"]);
   inputParms.Add("RecordNo", collection["RecordNo"]);
   inputParms.Add("Subdivision1", collection["Subdivision1"]);
   inputParms.Add("Subdivision2", collection["Subdivision2"]);

   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", "PostMiscInfoUpdate");
       return View("Error", info);
   }
}