Method GetProjectReviewActions

Summary

Get Project Review Actions

Remarks

Use GetProjectReviews to get the review codes and sequence number for the project.

Input Parameters

NameTypeLengthDescription
projectNumber numeric 8 [Required] Project Number
projectYear numeric 2 [Required] Two digit Application Year - if a 4 digit year is provided, only the last two digits are used
reviewCode System.String 4 [Required] Review Cod
reviewSequence numeric 2 [Required] Review sequence number
reviewStep numeric 5 [Required] Review step number
order numeric 1 [Required] Sort order. 1=Name, 2=NameType, 3=Address, 4=ZipCode
rows numeric 4 [Required] Number of rows to return. Used for paging of records
pageNumber numeric 5 [Required] page number used for paging of records

Example

GET http://localhost/FusionServices/v3/Naviline/PlanningEngineering/ProjectReviewActions/{projectNumber}/{projectYear}/{reviewCode}/{reviewSequence}/{reviewStep}/{order}/{rows}/{pageNumber}

Return Values

NameDescription
ErrorCode 0000=Success
ErrorMessage Error message describing any error that occurred
ActionDate Action date. Format MMDDYY
ActionUser Action by user name
ActionDesc Step description
TotalTime Time spend on action
ActionHours Hours spent on action
HourlyCharge Hourly charge amount applied
TotalCharge Total Charge Amount
ActionCode Action Code
ActionByCode Action By user code
CommentYN Comments available Y/N
ROWS Number of rows returned
MOREYN More rows to return? Y/N

Sample Responses

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms)
{
    string uri = "http://localhost/FusionServices/v3/Naviline/PlanningEngineering/ProjectReviewActions/00000006/16/CY/1/100/1/10/1";
    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")
    {
        JArray jRows = (JArray)response["Rows"];
        foreach (JObject row in jRows)
        {
             string ActionDate = row["ActionDate"].ToString();
             string ActionUser = row["ActionUser"].ToString();
             string ActionDesc = row["ActionDesc"].ToString();
             string TotalTime = row["TotalTime"].ToString();
             string ActionHours = row["ActionHours"].ToString();
             string HourlyCharge = row["HourlyCharge"].ToString();
             string TotalCharge = row["TotalCharge"].ToString();
             string ActionCode = row["ActionCode"].ToString();
             string ActionByCode = row["ActionByCode"].ToString();
             string CommentYN = row["CommentYN"].ToString();
             // TODO - YOUR CODE HERE
        }
    }
}

$.get('http://localhost/FusionServices/v3/Naviline/PlanningEngineering/ProjectReviewActions/00000006/16/CY/1/100/1/10/1', function(response) {
    $('#resultDiv).html(response); 
 });

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 GetProjectReviewActions
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       [RegularExpression("[0-9]{0,8}", ErrorMessage = "Numeric values only. Must be 8 digits or less. ")]
       public string projectNumber{get; set;}

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

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

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

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

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

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

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

       public GetProjectReviewActions()
       {
           //Set any defaults here
           projectNumber = DefaultData.Get("projectNumber");
           projectYear = DefaultData.Get("projectYear");
           reviewCode = DefaultData.Get("reviewCode");
           reviewSequence = DefaultData.Get("reviewSequence");
           reviewStep = DefaultData.Get("reviewStep");
           order = DefaultData.Get("order");
           rows = DefaultData.Get("rows");
           pageNumber = DefaultData.Get("pageNumber");
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the GetProjectReviewActions 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.GetProjectReviewActions

@{
   ViewBag.Title = "GetProjectReviewActions";
   string myUrl = "http://localhost/FusionServices/v3/Naviline/PlanningEngineering/ProjectReviewActions/" + Model.projectNumber + "/" + Model.projectYear + "/" + Model.reviewCode + "/" + Model.reviewSequence + "/" + Model.reviewStep + "/" + Model.order + "/" + Model.rows + "/" + Model.pageNumber;
}

<h2>GetProjectReviewActions</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>GetProjectReviewActions</legend>
       <div class="editor-label">Use the fields below to change the values and resubmit.</div>
       <div class="editor-label">
           @Html.LabelFor(model => model.projectNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.projectNumber)
           @Html.ValidationMessageFor(model => model.projectNumber)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.projectYear)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.projectYear)
           @Html.ValidationMessageFor(model => model.projectYear)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.reviewCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.reviewCode)
           @Html.ValidationMessageFor(model => model.reviewCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.reviewSequence)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.reviewSequence)
           @Html.ValidationMessageFor(model => model.reviewSequence)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.reviewStep)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.reviewStep)
           @Html.ValidationMessageFor(model => model.reviewStep)
       </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.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/GetProjectReviewActions
public ActionResult GetProjectReviewActions()
{
   // Create a new instance of the model to pick up any default values.
   GetProjectReviewActions model =  new GetProjectReviewActions();

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

// 
// POST: /MyController/GetProjectReviewActions
[HttpPost]
public ActionResult GetProjectReviewActions(FormCollection collection)
{
   string url = "v3/Naviline/PlanningEngineering/ProjectReviewActions/{projectNumber}/{projectYear}/{reviewCode}/{reviewSequence}/{reviewStep}/{order}/{rows}/{pageNumber}";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("projectNumber", collection["projectNumber"]);
   inputParms.Add("projectYear", collection["projectYear"]);
   inputParms.Add("reviewCode", collection["reviewCode"]);
   inputParms.Add("reviewSequence", collection["reviewSequence"]);
   inputParms.Add("reviewStep", collection["reviewStep"]);
   inputParms.Add("order", collection["order"]);
   inputParms.Add("rows", collection["rows"]);
   inputParms.Add("pageNumber", collection["pageNumber"]);

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