Method PostMiscInfoParcelDelete

Summary

Delete a Parcel Misc. Information from a location

Remarks

Delete a Parcel Misc Info from a location record.

Requires

Input Parameters

NameTypeLengthDescription
LocationID numeric 9 [Required] Location ID
MiscCode System.String 4 [Required] The 4 char code for the misc inforation.
MiscCodeAppl System.String 2 [Required] The 2 char application code.

Example

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

Sample Responses

Sample Code

using System.Net;

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

postParms.Add("LocationID",System.Web.HttpUtility.UrlEncode("33950"));
postParms.Add("MiscCode",System.Web.HttpUtility.UrlEncode("CRMS"));
postParms.Add("MiscCodeAppl",System.Web.HttpUtility.UrlEncode("OL"));
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 PostMiscInfoParcelDelete
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       [RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
       public string LocationID{get; set;}

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

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

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

@{
   ViewBag.Title = "PostMiscInfoParcelDelete";
}

<h2>PostMiscInfoParcelDelete</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostMiscInfoParcelDelete</legend>
       <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>
       <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/PostMiscInfoParcelDelete
public ActionResult PostMiscInfoParcelDelete()
{
   // Create a new instance of the model to pick up any default values.
   PostMiscInfoParcelDelete model =  new PostMiscInfoParcelDelete();

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

// 
// POST: /MyController/PostMiscInfoParcelDelete
[HttpPost]
public ActionResult PostMiscInfoParcelDelete(FormCollection collection)
{
   string url = "v2/NaviLine/Land/MiscInfoParcelDelete";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("LocationID", collection["LocationID"]);
   inputParms.Add("MiscCode", collection["MiscCode"]);
   inputParms.Add("MiscCodeAppl", collection["MiscCodeAppl"]);

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